Now it’s official: Corona, the reimplementation of Cocoon which is currently available in the Cocoon whiteboard has been accepted by the Cocoon PMC and will become Apache Cocoon 3, the next major version of Cocoon!
When Steven and I started with the reimplementation, we had two main goals:
- Have a clean and simple Java Pipeline API that isn’t bound to any particular content (SAX, StAX etc).
- Make Cocoon 3 a great fundament for RESTful webservices.
These goals are more focused than the goals of Cocoon 2 because, as Stefano pointed out in [RT] Is Cocoon Obsolete, things have changed a lot and web applications are developed very differently than 10 or even 3 years ago:
- RubyOnRails has taught us that simple things should become simple again and many things in the Java world feel like Cargo Cult programming.
- Apart from Flash, using the Mozilla platform directly, the heavy Java applets or the propriatory ActiveX components, other alternatives like Silverlight and JavaFX become available.
- Apache Wicket successfully applies object-oriented sotware development principles on web applications.
- Many web applications are mash-ups of many internally and externally available web services (Google Maps, Flickr, YouTube etc.)
Cocoon 3 has been optimized to live in such a changed world:
- Cocoon 3 doesn’t provide a stateful forms framework. Nowadays, you either develop a rich browser client or you use a really advanced server-side frameworks like Apache Wicket or GWT which hide a lot of the complexity that comes with web applications.
This polarization will make many established web frameworks like JSF, Struts, Spring WebFlow becoming obsolete if they don’t decide for one of the two paths.
- XML, XHTML and HTML5 are (still) important technologies in the development of web applications. Cocoon 3 that provides some default implementations of SAX-based components, still has a strong point when it comes to the generation, transformation and serialization of XML.
- Cocoon 3 has a layered architecture: The fundament is a pipeline module that doesn’t have any dependencies except Java 5 and Apache Commons Logging. On top of it there is a sitemap language interpreter. The current implementation uses Spring 2.5 but this dependency is hidden behind an interface and the implementation is only one! class. This means that you can easily integrate the pipeline and/or the sitemap module into your own Java application.
As you might have noticed, there is no dependency on the Java Servlet API so far. If you want to run Cocoon 3 as web application, there is a third module that provides a servlet for that purpose.