Sylvain,

I had asked this question myself about 6 months ago.
A few things happened since then, and Cocoon now has a new component: 
XMLForm. It tightly integrades with Cocoon and provides all features of 
Struts which I am aware of or at least I ever used.

Your document will be a valuable contribution. Please try to keep it 
factual so that it does not trigger any negative cross project 
reactions. Taking a few typical problems usually solved with Struts and 
showing how they can be solved with XMLForm would be a good approach.

Struts is a very successful MVC framework. It works great for 
applications based on JSP.
XMLForm was designed from the ground up to be a native part of Cocoon,
which separates form content from presentation and allows reuse for REST 
style Web Services.


An experienced Struts developer will be able to answer many of the 
questions you pose by looking at the XMLForm HOWTO.
http://xml.apache.org/cocoon/howto/xmlform-wizard/howto-xmlform-wizard.html


Regards,

Ivelin


Sylvain Wallez wrote:
> Hi folks,
> 
> In less than 10 days, (potential) customers asked "how does Cocoon 
> compare to Struts and JSP ?" This isn't the first time this question is 
> asked, but it's becoming more and more frequent. So in turn I ask you 
> this question, since my knowledge of Struts is limited to the docs at 
> the Jakarta site.
> 
> My impression is that Struts is targetted at web applications (opposed 
> to content publication) in HTML (no PDF, SVG, WML) and that Cocoon has 
> equivalent components (form validation stuff, actions, some XSP taglibs) 
> but can do much, much more.
> 
> The aim of this discussion not to start a Cocoon vs Struts flame, but to 
> build a document that will go into Cocoon docs to help us to promote 
> Cocoon when such questions arise.
> 
> The points to address are :
> 1 - how does Cocoon implement Struts features ?
> 2 - what does Struts do that Cocoon can't ?
> 3 - what does Cocoon do that Struts can't ?
> 4 - can we integrate Struts and Cocoon ?
> 5 - other items ?
> 
> 
> Here's my view on these items :
> 
> 1 - how does Cocoon implement Struts features ?
> -----------------------------------------------
> The main purpose of Struts is to provide a MVC framework in JSP. MVC is 
> about separating application concerns, which is something that is 
> naturally built in and enforced by Cocoon.
> 
> In Cocoon, the model is some presentation-independent XML produced by 
> generators from almost any kind of source (database, beans, EJB, xml 
> files, etc.), the view is defined by the transformation pipeline (XSL 
> stylsheets, I18N transformer, etc), and the controller is defined by 
> actions. Form validation and flow engine implement the equivalent 
> features in Struts.
> 
> Struts also offers internationalization features that are fullfilled by 
> Cocoon's I18N transformer and locale management.
> 
> 
> 2 - what does Struts do that Cocoon can't ?
> -------------------------------------------
> Mmmh... got an idea, someone ? ;)
> 
> 
> 3 - What does Cocoon do that Struts can't ?
> -------------------------------------------
> Struts in intrinsically limited to what can be done with JSPs, which is 
> producing text output such as HTML or WML. Moreover, it's JSP taglib is 
> very tied to HTML.
> 
> Cocoon, on the other hand, has a flexible serializer mechanism that 
> allows it to produce any kind of output such as (but not limited to) 
> PDF, JPEG, RTF.
> 
> The flow engine in Cocoon (in 2.1), by using a real programming language 
> and continuations (the ability to suspend a program), is far more 
> powerful than the action mapping definition in Struts.
> 
> Finally, Cocoon offers a very flexible and extensible framework that can 
> integrate almost anything, and comes with a lot of features that aren't 
> built into Struts. To name a few : browser selector, flexible form 
> validation, database manipulation actions and XSP taglibs (add other 
> important features here).
> 
> 
> 4 - Can we integrate Stuts and Cocoon ?
> --------------------------------------
> The JSP part of Struts can certainly be integrated into Cocoon using the 
> JSPGenerator. What about the controller part (i.e. the servlets) ?
> 
> 
> 
> Thanks for your input,
> Sylvain
> 



-- 

-= Ivelin =-


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to