[dev] Re: [cvs] cvs commit: imp/lib/Maintenance IMP.php imp.php
Michael M Slusarz
slusarz@bigworm.colorado.edu
Thu, 15 Nov 2001 11:25:12 -0700
Quoting Jan Schneider <jan@horde.org>:
> Zitat von Chuck Hagenbuch <chuck@horde.org>:
>
> > Quoting Jan Schneider <jan@ammma.de>:
> >
> > > Added files:
> > > lib/Maintenance imp.php
> > > Removed files:
> > > lib/Maintenance IMP.php
> > > Log:
> > > Oops. This really has to be lower case.
> >
> > Why?
>
> Because the file path is build from appName(). Michael's file was lowercase
>
> initially but I changed it to uppercase because I asked myself the same
> question. ;-)
>
> Jan.
>
My reasons for doing this -
There was no other way for the main Maintenance class to dynamically load the
file unless it matches the app name. This app name must be the same as the app
name located in registry.php. Doing auto-capitalization would *really* screw
things up - although it would work for IMP ('imp' is actually IMP), something
like Turba wouldn't work ('turba' is not TURBA, it is 'Turba'). If that makes
any sense. I tried to design the maintenance stuff so that someone
implementing it in a new app would have to know the least amount possible about
the actual library to get it to work (this is the purpose of modularization,
right? KISS at its finest :) ). The only parameter passed if you load the
maintenance page is the module name so I needed an easy way to figure out the
name of the module to load in the maintenance page.
I guess this could be resolved by adding another field to the registry, but I
don't know if that is really necessary. Also, this explanation may be
overkill, but better safe than sorry :) Finally if anyone can think of a
better way of doing this (this is the best solution I could come up with - and
this was the single toughest design element I dealt with) that would be great.
michael
______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder