« Song to Say Goodbye | Main | Song to Say Goodbye - Part Two »

March 13, 2006

More on Spring and the Cocoon Portal

As Cocoon 2.2 is now using Spring for the component container, I'm thinking of moving the Cocoon portal to Spring which means cutting most of the dependencies to Avalon interfaces.
There is one major disadvantage in this approach, though: the spring bean configuration is imho not as clean and nice as the Avalon based configuration. For example, in Avalon you can separate the definition of the available components from their configuration: first you define all available roles which is similar to the Spring bean name. In Avalon you can now associate a default implementation to the role. In a different configuration file, you just configure this component by just using the role name. So, the developer responsible for configuring the application does not need knowledge about implementation details.
While you can do similar things with Spring and templates or abstract beans, the Spring way is not as clean and flexible. In addition Avalon provides a way of passing a structured configuration into the component (which can be compared to a DOM). This allows a very flexible configuration approach. I know that all of this can be done with Spring, but it would require some code to write :(
Other aspects I'm currently looking at, is to use Acegi security for authentication and authorization within the portal. Ah, and then there is spring-ws which could be used for profile loading/saving - although the current interfaces are not rich enough for the Cocoon portal. So many stuff to look at and try out :) Hmm, so where can I buy time?

Posted by cziegeler at March 13, 2006 06:56 PM