Cocoon 2.2 – A long Journey (CocoonGT 2007 Keynote)

This year I had the honour of doing my second keynote presentation for a Cocoon GetTogether. On popular demand I was talking about Cocoon 2.2 and the developer’s motivations behind all the new stuff:

  • Spring 2.0 as component container
  • the Servlet-Service framework that establishes contracts in modular web applications
    (no dependency on Cocoon core – easily resuseable outside the Cocoon world)
  • Easier configuration using the Spring Configurator. There is no need for patching XML configuration files.
    (no dependency on Cocoon core – easily resuseable outside the Cocoon world)
  • Easier development
    • three Maven 2 archetypes available to give  your Cocoon 2.2 project a jump start
    • run any Cocoon 2.2  block using the Cocoon Maven plugin which allows reload of any resources, also Java classes and Spring bean defintions

Here is my presentation as a PDF.


Cocoon 2.2: A new architecture

Last week the vote for Cocoon 2.2-RC2 passed and I’m happy to announce the release of it. Actually Cocoon 2.2 isn’t the big monolith that you might know from the 2.1.x or 2.0.x series. We have been working hard to make Cocoon more modular:

Apache Cocoon 2.2 Architecture

From a first glance the most significant change has been that since version 2.2 Cocoon is based on the Spring 2 framework. We also introduced two new subprojects:

Both can be easily used without Cocoon Core.

Cocoon Core has been put on top of those two frameworks and “only” provides pipelines, sitemaps, out-of-the-box caching support and the most important sitemap components. Everything that goes beyond that has been moved into its own block. Also custom Cocoon applications are build as blocks.

So what’s a block in Cocoon 2.2? You might be familiar with the term block from Cocoon 2.1. In 2.1 a block was a unit to modularize the build system. Starting with 2.2 a block has become more: A block has become the unit of modularization (Eclipse uses the term plugins, OSGi bundles) in Cocoon and can provide the following services:

  • general servlet services (any servlet can be managed by the Cocoon servlet-service framework),
  • special services that provide pipelines as services,
  • component services (Spring beans, Avalon services/components),
  • a container for classes and resources (e.g. sitemaps, templates, images, etc.).

A block is packaged as a Java archive (jar) following certain conventions concerning the directory structure. So adding a block to your Cocoon application only means adding it as a dependency and all the services (see above), Java classes and recourses become available automatically.

Are you curious? There are a bunch of tutorials that help you to get started!