<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Danilo Gurovich &#187; Cocoon vs Struts</title>
	<atom:link href="http://gurovich.com/site/tag/cocoon-vs-struts/feed/" rel="self" type="application/rss+xml" />
	<link>http://gurovich.com/site</link>
	<description>Strategic eCommerce Technology and Architecture</description>
	<lastBuildDate>Mon, 25 Sep 2023 14:32:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Struts vs. Cocoon:  Why Cocoon lost the battle.</title>
		<link>http://gurovich.com/site/2007/11/09/struts-vs-cocoon-why-cocoon-lost-the-battle/</link>
		<comments>http://gurovich.com/site/2007/11/09/struts-vs-cocoon-why-cocoon-lost-the-battle/#comments</comments>
		<pubDate>Fri, 09 Nov 2007 20:30:47 +0000</pubDate>
		<dc:creator>Danilo Gurovich</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[Cocoon]]></category>
		<category><![CDATA[Cocoon vs Struts]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Struts]]></category>
		<category><![CDATA[Struts2]]></category>

		<guid isPermaLink="false">http://danilogurovich.wordpress.com/2007/11/09/struts-vs-cocoon-why-cocoon-lost-the-battle/</guid>
		<description><![CDATA[Cocoon has been around for years with an active development community. I tried to work with it in 2002 using the books and resources available at the time, but I was using Windows at that point and the books really focused more on a Unix/Linux deployment, and at the time I didn&#8217;t have the chops [...]]]></description>
			<content:encoded><![CDATA[<p>Cocoon has been around for years with an active development community.  I tried to work with it in 2002 using the books and resources available at the time, but  I was using Windows at that point and the books really focused more on a Unix/Linux deployment, and at the time I didn&#8217;t have the chops to really transfer this knowledge cleanly and was really never able to set up a coherent development environment for it.  Struts, on the other hand, had the resources available to get up and running.  Although the documentation wasn&#8217;t that great, I could &#8220;get home&#8221; on most issues, and when the level of frustration on completing some of the things that I needed to get done was at a boiling point, I did something about it and wrote a book with George Franciscus to share what I had learned with the larger community.  I wasn&#8217;t alone with this either; many great books on the subject came out.  As the framework diversified and solved many problems, so did the available web and print documentation from many wonderful people.</p>
<p>Step forward to today.  Struts 1 is ubiquitous; nearly every Java Web Application Programmer has had some experience with Struts, building upon the base and working to create other Frameworks as well extend Struts1 into Struts2. Lately, I&#8217;ve been working with projects that consume a great deal of XML services and need to be available to many different viewing platforms in a coherent manner.  Not only that, but there is a tremendous amount of conditional logic that must be matched depending upon input.  Cocoon handles these things very well &#8212; it&#8217;s dispatch system allows for various URL matching which gives it&#8217;s configurations a very similar feel to a lightweight Business Rule engine.  I decided to give it another shot and go through the tutorials and documentation &#8212; trying to evaluate whether or not it could fit into the way that my company does business.</p>
<p>I proceeded to find tutorials on the Cocoon Site, DeveloperWorks and other places.  What I found was at best adequate, but at worst quite disappointing.   The Cocoon Community insists that you download their source code and use their scripts to<span id="more-40"></span>build it.  Further, they don&#8217;t publish ANYWHERE what or how a file structure should be, and the various examples I found showed them to have no &#8220;best practices&#8221; within the community, let alone publish what these are.  Further, all of the examples I found used Eclipse as the IDE and gave no information as to what to do in case you happen to use another favorite platform, say, IntelliJ.  The best example I found used Maven/Jetty/Eclipse.  It incorporated Spring and the latest build of Cocoon extremely well.  Unfortunately if you&#8217;re not a Maven/Jetty/Eclipse house, it leaves no idea as to how to build your own system (YES, I DID use mvn idea:idea, still didn&#8217;t get what I wanted, in fact the mvn war:exploded didn&#8217;t help either).</p>
<p>I looked around for examples of how to build Cocoon from a root folder.  I want to build it from the ground up, placing files, etc where they should be &#8220;in my opinion&#8221; so that I can integrate them with the way we do things around here (we still use Ant, for instance, and have our own way of creating projects for Idea that works for integrating builds with our platforms).  Nothing exists, nowhere.  The Cocoon mailing list goes so far as to say that they specifically WONT do this because they want people to get a deep dive into the entire project and all the available blocks.  You can build a basic app from source at the Cocoon Site, but the war tasks to me were inadequate and I didn&#8217;t see the cool Spring Integration that the one really useful example offered.  10 days go by and still I&#8217;ve really never had a good debugger going in my IntelliJ with Cocoon, and the real, under-the-hood stuff that I seek just isn&#8217;t forthcoming.</p>
<p>I&#8217;ve even seen talk on the Cocoon Mailing lists that they plan to abandon Java and build the whole thing in Perl.  Super, although I don&#8217;t know if this is real or just a few persons blowing off some steam.</p>
<p>Contrast this with Struts and Struts2.  There are very clear road maps for both.  Although I don&#8217;t agree with a lot of the integrations (<em>especially JSF!!</em>), Struts is, and continues to be, very easy to pick up, understand, extend and integrate with existing processes, software and builds.  Although the Struts2 tutorials at this point are limited, and the number of books on Struts2 can be counted by a five-year-old, everything looks to be good going forward.  I admire the WebWork integration and the way that the configurations have been cleaned up.  I will definitely keep it in my Toolkit.</p>
<p>What do I think is better?  Well, for it&#8217;s ability to match URLS, pass parameters, allow for non-reboot redeployments and presentation-agnostic capabilities, I would really feel that Cocoon, in a purist sense, is a superior platform.  I can easily see complex integrations with A/B testing, Rule Engines and various view platforms working much easier in the Cocoon environment over Struts.  I also believe that Cocoon offers some superior capabilities in the consumption of Web Services and other XML sources.  I believe that REST is a better proposition with Cocoon.  But I can&#8217;t recommend it for use in an ongoing Enterprise Environment because:</p>
<ul>
<li>There is too little documentation, and this documentation shrinks with newer releases.</li>
<li>The Cocoon community is too fragmented and insulated.</li>
<li>The Documentation is all over the place.</li>
<li>There are no published &#8220;Best Practices&#8221;.</li>
<li>It doesn&#8217;t easily integrate with disparate IDEs</li>
<li>Nobody seems to want to share information to outsiders.</li>
</ul>
<p>The Struts Community seems to be the opposite; Books are in several languages, plugins for the framework ship with most IDEs out of the box, and the community shares lovingly with anyone that wants to learn it.  There is great documentation and many, many different answers for the same questions, allowing development organizations to pick and choose what&#8217;s right for them.</p>
<p>Cocoon is insular.  There are many different plug-in &#8220;blocks&#8221; with solutions for problems, but the basics just aren&#8217;t covered well, and the &#8220;you must do it this way with these tools&#8221; attitude doesn&#8217;t play nice with organizations looking at their framework for long-term use.  Resourcing is a big deal, and when I saw that my book had been published in India, I knew that Struts had won hands down over Cocoon, which really is, in my opinion, a better, but less organization-friendly, platform.</p>
<p>If I can finally figure out how to build Cocoon with Spring from a basic root folder without all the baggage that the Cocoon Developers&#8217; Group insists on everyone using, I&#8217;ll share it because it might be worthwhile. If you don&#8217;t see it here after awhile, you know that I&#8217;ve moved on and found further investigation a waste of my time.</p>
]]></content:encoded>
			<wfw:commentRss>http://gurovich.com/site/2007/11/09/struts-vs-cocoon-why-cocoon-lost-the-battle/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>
