On Mon, 12 Nov 2001 16:35:05 +0100, Stefano Mazzocchi <[EMAIL PROTECTED]> wrote:
> Ovidiu Predescu wrote: > > > The two models are more like a "pull" model in the Avalon case, as > > opposed to a "push" model in the Ant case. > > > > Personally I prefer the push model (the Ant way), as it's much easier > > to write and maintain over a longer period of time. The code that > > deals with the loading and instantiation of the right classes is > > centralized, thus you have to write it once and for all only in the > > engine. > > For ant it makes perfect sense to have such a way of configuring things > (i.e. fully inerted, a-la javabeans). But for more general frameworks, I > disagree since, just like for beans, this forces you to have flat > configuration files or very complex data2method mapping schemes. I don't think you're forced to use a flat configuration file. Again the Ant engine builds a hierarchy of Java objects that mimics exactly the XML document which is parsed. It does this by using not only set<Attribute>() methods, but also add<Element>() methods. The later are used to have instance variable point to arbitrary objects, not only simple data types. For more information on this, please go to: http://jakarta.apache.org/ant/manual/develop.html I think the model applies to a generic framework as well. It's also a very simple thing to understand, and easy to maintain. Regards, -- Ovidiu Predescu <[EMAIL PROTECTED]> http://orion.nsr.hp.com/ (inside HP's firewall only) http://sourceforge.net/users/ovidiu/ (my SourceForge page) http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]