[dev] Seamless/streamlined configuring/upgrading Horde/apps

Jan Schneider jan at horde.org
Tue Oct 19 16:08:40 UTC 2010


Zitat von Josh Endries <josh at endries.org>:

> Hello,
>
> I was planning on mentioning this anyway, but a search turned up the  
> "Setup, Configuration, Options, Preferences" thread pushed me more  
> towards actually subscribing to the list (my vote would be for  
> "System/User <something>"). :)
>
> Chuck's comment about DB config seemed to be in jest (from an  
> outsider's POV), but I would suggest it be considered seriously. I'm  
> a big fan of separating one's data from operation, and custom files  
> from distributed. It makes a lot of things easier, and I really wish  
> Horde did this. My main issue is upgrading. I've never, ever had an  
> upgrade go smoothly...it's never as simple as "copy some files over"  
> like it is in other apps. I've lost config files, messied up the  
> hierarchy, had old stuff laying around, DB problems...it's just not  
> an elegant process IMO. It's much easier to slap in some files and  
> forget about it. Wordpress is beautiful with this. To upgrade, I  
> simply unzip or copy the files over, log in, and poof! Either I  
> click a button to upgrade the DB or it Just WorksTM. phpBB is  
> finally doing this fairly well; they have some good  
> pre-install/upgrade checks for various things before doing anything.
>
> The reason this works (well, one of a few) is that the  
> "configuration" is (1) in the database, independent of the app, and  
> (2) all contained in one config file, which mainly just has the DB  
> connection info in it. Personally with my apps, I reference a  
> separate "site-specific" area and completely separate the app from  
> anything else, so one just has to delete and overwrite the app and  
> it works.
>
> Another reason this works is that upgrades are detected and somewhat  
> managed un the UI (DB schema changes, for example). This would  
> probably be complicated for Horde, but shouldn't be too difficult,  
> even a hierarchical solution might work for apps...
>
> I think Horde would benefit significantly from moving all the conf/  
> stuff into the DB, having the DB (or DBs) be defined in one central  
> file, and possibly have that file by default be located outside the  
> downloaded/distributed Horde files. Has this been discussed before?  
> Is anyone open to this? I'm guessing H4 is too far along for  
> something like this?
>
> I did search for this topic but didn't find anything; hopefully I'm  
> not fanning some old flames or applying repeated force to a  
> non-living equine.

While I see the beauty of this approach, I also see a few problems:

- Until now, it's perfectly possible to run Horde without a database.  
Requiring a database for configuration would break this. Granted,  
there won't be many people out there still using Horde without a DB,  
since they will miss a lot of features, but still.

- One of Horde's strengths and a major selling point are the great  
customization capabilities. These are closely tied to the fact that  
all configuration files are PHP scripts that you can fill with any  
logic you want.

Regarding upgrade detection: we already have database migration  
scripts in Horde 4, and detecting required upgrades and starting them  
from the UI is easy to implement now. And we already offer this for  
the main configuration files for years.

A few of the upgrade problems will also be solved with switching to  
pear/pyrus as the installer for Horde 4.

Maybe different storage backends for configurations are an option, so  
you can pick between storing the configuration in db vs. php files.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list