cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ovidiu Predescu <ovi...@cup.hp.com>
Subject Re: Interpreted sitemap
Date Wed, 14 Nov 2001 05:53:05 GMT
On Mon, 12 Nov 2001 16:35:05 +0100, Stefano Mazzocchi <stefano@apache.org> 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 <ovidiu@cup.hp.com>
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: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message