First, about forms. Cocoon has standardized on woody as its forms framework. It is currently being renamed to "cocoon forms". There is also a FormValidatorAction and SimpleFormsTransformer. Use them if they meet all your needs. Otherwise, use woody.
Cocoon does not directly support calling business delegates. In my application I have written a BusinessDelegateAction and a BusinessDelegate component. Instances of the BusinessDelegate component can be configured to call "real" business delegates by specifying the class name, constructor parameters, the method name to call and any parameters it takes. The BusinessDelegateAction then calls a business delegate using the BusinessDelegate component. All our Business Delegates return a Data Transfer object that extends a base class that allows the EJB container to return validation error information which we integrate into the pipeline for the SimpleFormsTransformer to process. If the business delegate call was successful we pass the DTO via a request attribute to a generator that uses Betwixt to convert it to XML (this generator is unbelievably simple). After that, yes it is pretty much a matter of performing transformations, although we use a lot of aggregated pipelines to generate the page layout. This all sounds more complicated than it actually is. Ralph -----Original Message----- From: Los Morales [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 10:39 AM To: [EMAIL PROTECTED] Subject: RE: new to cocoon question 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! -los >From: Ralph Goers <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> >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 >in >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 >acting >as a director. > >Ralph > > -----Original Message----- >From: Derek Hohls [mailto:[EMAIL PROTECTED] >Sent: Thursday, March 11, 2004 8:57 AM >To: [EMAIL PROTECTED] >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 >Struts >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 >towards >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...) > >Derek > >D Hohls >Environmental Systems Developer >CSIR Environmentek >PO Box 17001 >Kwa-Zulu Natal >South Africa >4013 >www.csir.co.za > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ Frustrated with dial-up? Lightning-fast Internet access for as low as $29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
