From: alex b. <en...@tu...> - 2001-07-08 18:27:53
|
> Thanks Odysseas for making this "official". I did > go in and var_dump() stuff in Page to see what was really > happening before and after uasort() and the added ksort(). > There is still that lingering aspect of > "easy" confusion between "load_order" really meaning, > for me, "instantiation order", and having nothing to > to with "loading order" into the output buffer. I think "load" is not the appropriate verb to describe output caught in the outputBuffer - in any case, I suppose we could change the array ket to inst_order or something, but to be honest I think load_order is clear once the concept is explained. > So, in any case, rendering will take place in > appearance order, unless you specifically change it > with a layout template. Exactly. > Still, WHAT I CONSIDER UNACCEPTABLE, in the current > state of affairs, is the near-complete loss of generality > of writing modules if you wish to communicate with > other modules. If you do not put things into I've dealt with that elsewhere, (i.e. yesterday) in other messages. All in good time, there will be an efficient, elegant means of doing module communication. > global scope, one must know, apriori, for any > module, what the appearance order in $bc_page > is for the other module to communicate with since > the suggested idiom is: I suggest for the moment that you use Global variables as a replacement for a manager class, which I will build at some point (after more of core is completed) That is both convenient and conspicuous in your code: $GLOBALS['moo'] is easy to grep for. > According to Alex, some kind of Manager is contemplated > to reduce this intercommunication set of problems to > something simple... Correct. > In the mean time, I want to continue writing modules, > and I am depending on intercommunication, so I may just > hack something to allow me to keep on a-goin'. Or, > just sin, and put things in global scope, and keep on > a-goin'. $GLOBALS all the way. You can do that, and still write good code (each instance of the module would first check to see if a $GLOBALS['stuff'] exists, and use it instead of doing all those queries. A module communication manager is in the pipeline, but other things need to happen first. :) > PS: I find it interesting that youse guys are into this > with a kind of mindset that a module is a_kind_of_standalone_application > and Jason and I went into this with a kind of mindset of > a module is an itty-bitty piece of Lego_which_has_to_communicate... > We are atomic physicists, and you are molecular biologists ;) Ah, but the cool thing about the system is that you can build whatever you like. I actually view modules as Legos, not complete applications. I like to build sets of very simple applications, and connect them to create more complex applications. My dislike for monolithic code is part of the impetus for binarycloud. _alex |