Google Summer of Code Proposal - Cocoon Block Migration Guide & Case Examples

Migration (Springification) of broken blocks and development of new examples.

by Lukas Lang


The Cocoon project is a quite popular and ongoing XML-based web pipe-lining framework. The community invented technologies like the eXtensible Server Pages (XSP). Cocoon is based on core libraries and more than 60 various blocks, which could be seen as extensions. Several blocks belong together and won't work detached due to service and library dependencies. Since the last release great work has been done, but some blocks yet don't work on the current branch. This project tends to migrate a set of non-working blocks from Avalon to the Springframework, make them and related examples work, build integration tests and develop new samples to lower inhibition threshold for beginners. Being very interested in messaging, repositories and caching, I tried to pick an atomic selection, within its "springification" the entire project and the community would benefit from: Cocoon-JMS (Java Messaging Service), Cocoon-WebDAV (Web-based Distributed Authoring and Versioning), Cocoon-Eventcache and Cocoon-Linkrewriter. Due to the event cache block, small response latencies are achieved. Cocoon's WebDAV connection is a fantastic way to connect file and content repositories to web applications. As an important part of the documentation-deliverables a block migration-guide from Avalon to the Springframework, based on the experiences I gained, will be included.

Benefits to the project and it's community

Apart from the fact that four heavily used blocks will be fixed and migrated, a general migration guide, active developers requested, containing migration expertise from Avalon to Spring will result. Spring is a well known technology and future developers will encounter reduced beginners-hurdles to jump over, caused by better documentation. Loose coupling of components and independency of implementations is the way to go. The projects achievement will be an enhancement in value for Cocoon and it's developers.


Four (fixed & "springified") blocks will be part of the deliverables:

Each block includes:

  1. Fixed examples
  2. Integration and module tests written in JUnit
  3. Spring XML configuration and documentation
  4. One new example containing documentation

Further a general migration guide from Avalon to Spring respective Cocoon blocks is written.

Project details

Spring is an open source framework developed by Spring Source (former Interface 21). The Spring IoC (Inversion of Control) container is part of the framework and aims at injecting dependencies. Target objects neither know about implementations of injected beans (and use interfaces only), nor care about bean instantiation. Principal part of the project is the "springification" (in this case replacing Avalon by Spring) in which bean definitions and injection configurations will be set up for each block in XML (as long as Java 5 is not used in Cocoon and common annotations are not supported).

In iterations lasting between 7 and 14 days every block will be migrated as described below.

Migration approach

A systematic and generic migration approach will be established to ensure good working order. First a test environment containing ActiveMQ and Apache with WebDAV has to be set up. As already mentioned, integration tests and module tests, if not satisfactory present, will be written in JUnit. As soon as the specific block and related examples work on the current branch, migration from Avalon to the Springframework will be proceeded and documented within Maven Site. When successfully finished, a simple and small example (including documentation) within the respective block will be developed to emphasize it's functionality outside test driven development.

Project schedule

Till June 23th: Getting into Cocoon/Hands-on.

June 23th - July 7th

The JMS part will work as described above.

July 7th - July 21th

The WebDAV will be completed.

July 21th - August 11th

The Eventcache and Linkrewriter blocks will be fixed.

August 11th - August 18th

Further testing, bug fixes and documentation, if required.

Comment: Due to exams at the end of June I have to start a bit later.


My name is Lukas Lang and I am a 23 year old undergraduate student from Vienna, Austria. Since 2005 I am enrolled at the Technical University of Vienna, majoring in Software & Information Engineering and estimating BSc degree in spring 2009. I started programming 10 years ago and focused on object oriented programming languages during graduation from a higher vocational-technical school (HTL) in upper Austria, but I'm also very into other paradigms. I think I am an open-minded, communicative and determined person with main interests in web frameworks, open source software technologies, software development processes (especially test driven development) and best practices. Aside from studying, I work freelance for a couple of companies to extend my practical skills beyond perfect worlds (additional business will be stopped during Summer of Code). In my free time I do a lot of sports, traveling and playing music. For more information about me take a look at my CV.

In terms of educational as well as vocational projects, open source software became part of my life. To my mind it would be a great opportunity getting involved in open source development, being part of the community and furthermore I already got very positive feedback from the community, which assured full support (Reinhard Poetz agreed mentoring). And finally I'm eager to contribute!

If you have further questions, please feel free to contact me!

Best regards, Lukas Lang