From: Arnold C. <arn...@ya...> - 2003-03-26 21:12:57
|
I've taken a look at the code and example application. Good stuff! I have a question however... why were the forward and form objects discarded? They provided a useful abstraction that could be extended (if required) as opposed to passing primitives. It seems as though we've taken a few steps back in some areas and leaps forward in others. Looking forward to hearing your ideas. Arnold --- Tony Bibbs <to...@to...> wrote: > On Sat, 22 Mar 2003, Jason Sweat wrote: > > require_once('config.php'); > > require is a directive, not a function, so > > require_once 'config.php'; > > is better form, mentioned in the PEAR coding > conventions as acceptable either > > way, but I have been dinged in professional > writing elsewhere for including the > > parens. > > I made this change, thanks for pointing it out. > > > > > $_CONF is a bad name for a variable. It looks > like a superglobal, but clearly > > is note. It also ad-hears to the PEAR coding > conventions definititions of a > > define, not a global variable. > > Actually PEAR says globals should start with > underscore, followed by > package name followed by variable name. Since the > use of $_CONF was not > specific to the MVC package, rather, for use in the > app itself, I renamed > it to $gConf for now. > > > > > If you have these constants defined: > > // General configuration settings > > define('_BASE_URL', 'baseurl'); > > define('_MVC_BASE', 'dirbase'); > > Per PEAR coding standards all _<varname> constants > are now named > MVC_<varname> > > > in Controller::Controller() > > $_SESSION['MVC_message'] = ''; > > Should 'MVC_message' also be a define? I tend to > like to use defines for all > > "magic" indexes, that way there is less risk of me > mis-typing an assignment > > index. > > Good point, I have added MVC_MESSAGE and MVC_ERRORS > as constants > > > > > I would move the $configData initialization into > the config.php script. This > > makes the "bootstrap" (index.php) file more > understandable, and it is after > > all, configuration, which seems like it belongs in > the "config" script. > > Ok, what I have done is I have moved all the config > data to mvcconfig.php. > In preparation for XML support I have also created a > mvcconfig.xml. > Individual apps can name these file what ever they > want. Point here is > you are right, the config data should be pulled. I > also refactored a few > things so that the ArrayLoader and XMLLoader work > the same. The way I had > before required unique logic in the LoaderFactory > which , obviously, > doesn't make much sense. > > > The discussion of the $var[foo][bar] vs $var = > array('foo'=>array('bar'=>...)); > > came up on the Phrame list earlier. I said I was > ambivilent then, but looking > > at it: > > I too am ambivilent. I think in the end the XML > configuration will be the > default as it is easier to read and easier for > developers to learn. > > I will repost the updated code here as soon as the > XML configuration is > working. > > -- > Tony Bibbs "I guess you have to remember > that those who don't > to...@to... hunt or fish often see those of > us who do as > harmlessly strange and sort of > amusing. When you > think about it, that might be a > fair assessment." > --Unknown > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |