cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Los Morales" <>
Subject RE: new to cocoon question
Date Thu, 11 Mar 2004 18:38:49 GMT
Well, in essence, struts actions do return a "forward".  However, the 
page/action to forward to is agnostic in practice, i.e. the actual page or 
action to forward next is defined separately in a config file called 
struts-config.xml (I think this is similar to the sitemap).  So really the 
configuration where struts  does its forwarding is outside of the action 

In theory, the struts actions are extensions of the controller (or model, 
depending on how you interpret it) in the MVC paradigm.  They can represent 
the actual business logic, but in practice they are used as 
delegates--calling business objects to do the work.  Hence struts actions 
are like a service layer for the front-end, interacting with the business 
layer.   Looking at cocoon actions, they return a Map containing information 
used for display purposes.  This can be done in struts actions by explicitly 
putting the information into the request (usually encapsulated as a bean) 
that can be easily manipulated with struts or jstl tags.

Therefore my understanding thus far about cocoon when comparing it to struts 
is that the cocoon actions are "similar" to struts actions.  Do you use 
cocoon actions more often then the *traditional* pipeline for doing MVC 
applications?  I really don't see anywhere else in the cocoon framework 
where there is an explicit class that handles requests, calls services from 
the business layer and returns a response.  Everything else in cocoon seems 
to be all transformations of some sort.

Also, struts has a neat thing with declaring forms.  There is the 
traditional way of creating POJOs via ActionForms and there is the 
declarative way defined in the struts-config called DynaForms.  In cocoon, I 
see something called "woody" and "xforms".  I have no clue how these forms 
are used within the cocoon framework, particular with cocoon actions.  In 
struts, the form used for submission is explicitly passed to the action 
handling the form.  In cocoon actions, I don't see any woody form being 
passed in...

Any more suggestions would be appreciated!  Thanks!


>From: Ralph Goers <>
>To: "''" <>
>Subject: RE: new to cocoon question
>Date: Thu, 11 Mar 2004 09:11:31 -0800
>Pardon my ignorance on Struts as I haven't used it extensively either, but
>my recollection is that Struts invokes Actions which then return a forward 
>in essence telling the controller what to do next based upon what the
>business logic for the action did.  This, in essence and IMO, makes the
>Action more knowledgeable than it should be.
>Cocoon's notion of an action is somewhat different, although it can be
>subverted to behave very similarly to a Struts action.  Typically actions 
>Cocoon simply return information in a Map object.  The pipeline is
>configured to operate upon that data in any manner it sees fit.  Thus, the
>action is in the business of simply returning information rather than 
>as a director.
>  -----Original Message-----
>From: 	Derek Hohls []
>Sent:	Thursday, March 11, 2004 8:57 AM
>Subject:	Re: new to cocoon question
>Interesting question - in brief, actions are primarily used *inside*
>pipelines to act as logic "switches" between different choices; or to
>allow easy handling of case failures. I am not sure how this corresponds
>to what Struts does - I actually would like to find out more about
>as there a number of developers I know that use it, to whom I'd like to
>relate a little better - if there is any reading you can point me
>to grasp that framework's approaches, I'd be happy to share any
>comparisons I find (as this is something I want to do anyway...)
>D Hohls
>Environmental Systems Developer
>CSIR Environmentek
>PO Box 17001
>Kwa-Zulu Natal
>South Africa
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Frustrated with dial-up? Lightning-fast Internet access for as low as 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message