cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist ...@wrinkledog.com>
Subject Re: Action Vs Logicsheet
Date Tue, 01 Aug 2006 18:14:45 GMT

On Aug 1, 2006, at 9:54 AM, Martijn C. Vos wrote:

>
> Mark Lundquist [mailto:ml@wrinkledog.com] wrote:
>>
>> Note: I would avoid a design that called for any kind of custom
>> transformer that's meant to be used for its side effects... that
>> probably indicates an abuse of the sitemap.  Pipelines should be for
>> generating data.
>
> Why?

Good question :-)  I started asking myself that, right after I posted 
that opinion.

In Cocoon everything is mediated by the sitemap.  So there's always a 
pipeline, so what difference does it make whether that pipeline invokes 
a transformer or dispatches a flow function?  It's just one "tag" 
(<transform>) vs. another (<call>), so who cares?

To me, some things feel declarative and some things feel imperative.  
Declarative things feel like they belong in the sitemap, and imperative 
things feel like they belong in flow (or below, in the model layer).  
Shoehorning imperative-feeling things into the sitemap feels wrong to 
me... so does imperative processing for things that feel like they 
should be in the sitemap (or to get rid of the sitemap or make it less 
declarative, e.g. "why can't the sitemap just be a script, it would be 
so much more flexible"?).

> There are lots of popular transformers that exist almost
> entirely for their side effects: the sql, sendmail, sourcewriting and
> dasl transformers all exist entirely for their side effects;

Indeed.  But notably,

1) Those are all pre-flow solutions that were created before it was 
figured out that flow was needed;

2) I don't use 'em... I use Hibernate for all DB stuff, and for sending 
mail I use either the Spring mail component, or the Cocoon MailSender 
component, called directly from flowscript or from Java (in the model 
layer).

3) Just because something exists, doesn't mean much... XSP exists too, 
but I wouldn't touch it w/ a ten foot pole (that's 3.048 meters for the 
rest of the world :-)

Anyway, like I said that's just what feel right for me, not trying to 
be dogmatic...

cheers,
—ml—


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


Mime
View raw message