From: Andrew T. <ajt...@hi...> - 2006-01-28 18:05:07
|
I didn't realize the config stuff was already in CVS. I was wondering on the progress of that. I agree that config options should be addable without having to modify the actual database structure. Using Key->Value coding seems like the best option, and the ability then use 'namepspaces' or whatever is very nice for any plugin, feed, subsection to be able to write and retrieve config options. A very important one to add as a "global" is going to be the current db schema version, and perhaps even the FoFRedux version. This can at least be queried for the future in upgrades. Rails now uses a similar scheme to this. Any updates on tagging? :) Andy On 1/28/06, Kevin <ke...@dr...> wrote: > > I had a peek at the config table format. I disagree with the way it is > implemented, what happens if we want another config option? We have to > add a column to the table? That smells bad to me. > > What about something that just stores key -> value pairs? > > The key could use format like java properties to avoid name clashes and > keep things logically grouped together. > > global.items.sort.column =3D publish_time > global.items.sort.order =3D DESC > feed.33.show_image =3D false > global.language =3D 'DE' > feed.33.update_interval =3D 3600 > plugin.mycoolplugin.make_cool =3D true > > If one piece of code just cares about a subset of the config options, > say for a feed, we can use the LIKE comparision operator in the query: > > select * from config_table where name LIKE 'global.items.%' > or > select * from config_table where name LIKE 'feed.33.%' > > default config options should probably go in a php file instead of the > database. That will make it easier to handle upgrades, just overwrite > the file. The db of course will override anything in the default file. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat= =3D121642 > _______________________________________________ > Fofredux-devel mailing list > Fof...@li... > https://lists.sourceforge.net/lists/listinfo/fofredux-devel > -- Andrew Turner ajt...@hi... 42.4266N x 83.4931W http://highearthorbit.com Northville, Michigan, USA |