cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: [c2] simple sitemap question
Date Mon, 16 Apr 2001 20:08:50 GMT
On Mon, 16 Apr 2001, Berin Loritsch wrote:

> > No, your java code does not need to generate java source code........Please take
a look at
> > LangSelect.java. I think you need an Action not a Matcher.
>
> There are three methods of doing conditional processing:
>
> 1) Creating a Matcher (Compnent that implements Matcher interface)
> 2) Creating a CodeFactory (a matcher that is embedded in the sitemap)
> 3) Creating an Action (Component that implements Action interface)
>
> There are pluses and minuses to each of the approaches.
>
> A Matcher Component is better for complex tests based on URI only that
> are not really embeddable.  It has the overhead of being a distinct
> object, but sometimes the encapsulation is worth it.
>
> A Matcher Factory is better for simple tests based on URI only that
> are easily embeddable. It is more difficult to debug, but usually has
> little overhead associated with it.
>
> An Action is best when you have multiple criteria and complex tests.
> Such a solution is heavier than either the Matcher solutions, but much
> more flexible.  There is some overlap between a Matcher Component and
> an Action, but the key difference is that Matchers are not
> Parameterizable.

well, from where i'm sitting, it looks like Actions are going to be the
new agents of the supposedly dreaded (too much) Flexibility Syndrome...
thankfully, i can do what i wanted to with the ResourceExistsAction which
i just checked in. i stole the URLFactory code from the confusingly-named
AbstractComplimentaryConfigurableAction but i seem to recall some
discussion debating which class we should use to resolve urls - is this
the right one or not? also, when the URLFactory is asked to resolve a URL
which does not exist, in addition to throwing a RuntimeException, it logs
an ERROR to the cocoon log - perhaps that should be downgraded to an INFO
or a WARN?

- donald


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message