A Web Page For Configuration
Posted 20 January 2013 - 01:26 PM
I think we need a web interface to quickly change the fields in /protected/config/main.php
like accessing Gii (http://localhost/index.php?r=gii), it will result into something like http://localhost/index.php?r=config
Also why don't you use a DBA file (key-value database file) instead ?
Posted 20 January 2013 - 03:23 PM
Posted 20 January 2013 - 09:39 PM
With that said you need the same level of access in order to be able to use gii so I guess it doesn't really make a lot of difference in the dev environment.
It would have the potential advantage that configuration options could be validated & include documentation on the same page.
It does seem that using php for the configuration file is a bit of overkill.
Something like yaml might make things a little clearer however this would then add in another dependency for a yaml-processor.
Posted 21 January 2013 - 08:04 AM
However, I don't understand the motivation behind having a web interface for the configuration?
Firstly, there is little to prevent you from having (some of) the app settings stored in a database.
I mean: do you want to edit the actual files in the browser too?
Posted 22 January 2013 - 12:24 PM
And, I have to confess that I don't like it very much myself, although I enjoyed its functionality for a while ... yeah, you have to believe me, it worked great. But I had to discard it.
After all, when you are not using a CMS but constructing a web application, the system configurations should be stored much more handy in a text file (i.e. a PHP source file). When you consider the needs for version controlling and documentation, a plain text file is much more preferable than a db table. And, do we need a web interface for a text configuration file? No, I don't think so.
Posted 22 January 2013 - 01:56 PM
Yes, but sometimes you build a CMS
Posted 23 January 2013 - 04:29 AM
Extensions like EConfig http://www.yiiframew...xtension/config allows to get/set settings to the database, however:
1) It's not made to change Yii settings (i.e. medium of cache storage, website name etc. etc.)
2) A built-in mechanism would be nice
However this was already discussed: http://www.yiiframew...4465-db-config/
As I've already said, it looks like people prefer to use text files (with permission issues etc.)
Posted 23 January 2013 - 11:16 AM
Except from the ability to modify cache engine, site name and other more or less fixed parameters, I don't really see the need to have the app config stored in a database.
I can't think of a framework which does this.
Maybe it could be done using a sqlite db, separate from the main db configuration?
Posted 27 January 2013 - 05:33 AM
- Settings that rarely change (database, cache. etc) and are managed by a developer
- Webapplication settings that can change over time depending on what the business wants. Params for example. These would be managed by an Application Manager. (Not totally sure if that's the name in english..)
For the first, a file can be better. For a second, a database config is better. Why not have both? They serve different purposes. The EConfig extension is a nice example of #2.
Posted 27 January 2013 - 07:32 AM