Well, this is my first blog post ever, so I apologize for bad grammar because, you know, english isn't my mother tongue.
I've been using Cocoon at my workplace for over a year now, and I feel like writing down a sum up of this experience, in case it may help someone yet unfamiliar with this project.
For starters, Cocoon is a open source web application framework with strong XML and Java foundations, being developped by the Apache Foundation : the project homepage is here
This may sound very abstract and buzzwordlike, so in short terms it means that if you have to (or want to) deal with concrete volumes of XML data (that is reading it, parsing it, producing it and generating multiformats representations of it), and you have basic Java skills, and you don't wan't to spend money on this, then Cocoon is probably the best choice as of today.
Cocoon is like a huge toolbox filled with tons of handy components, you glue them together in XML matrices
, sometimes without writing a single line of "pure" code, and the final result is a web application with a proper separation between data, interface and obviously, presentation. And if there's no component to fit your needs, you can still write them from scratch, or you can simply plug already written company components written with other frameworks, because Cocoon doesn't tie you to its own core.
This is a powerfull framework, with very cool pieces like full internationalisation support
, or the Control Flow
which lets you write interactive and dynamic cross-browsers forms, which will soon fully support this "new" buzzthing called Ajax
. It's a mature framework, used in fields from XML hobbyists to complex applications
This is all fair and well, but IMHO this toolbox suffers from a "can do everything" duality syndrom. First, as Peter Parker was once told, "with great powers comes great responsibility", second, as every perl monk was told, "there is more than one way to do it". Forgive me for these easy quotes, but this is what comes to my mind to describe the current state.
Too much is better than nothing at all, but carrying a crusade to look for this "way to do it" is a plague : the biggest drawback of Cocoon isn't that it does too many things (fact is : it does them well !), it's that right now its documentation is scattered all over the web. I know a real life situation doesn't always reflect a global problem, but here you go : at my workplace there are two students, who weren't taught Cocoon at their uni, so they are trully starters. We don't have much time left to help them (this is the IT world where projects deadlines are always set up for yesterday, and where paying for training is the lesser of company priorities), and when we do have spare time to solve their Cocoon problems, it's now common to tell "just google for a similar problem", because I know that only the almighty Google can crawl through the vast amount of Cocoon stuff to find trails (or answers within articles, at best).
You have the official documentation
and a wiki
, but parts are either obsolete or undocumented. You have an unofficial resources site
, promising but lacking content. You have a demo site
, with real content (the demo, the Supersonic Tour), but lacking docs. You have books
from three years ago lacking up-to-date samples or informations.
Right now, the best resource is the Cocoon Users mailing-list
, where one can perhaps find every answer, which is a Good Thing (c), but is great and sad at the same time, given the work that's being done on this project by fantastic people.
That's all for this first post, and I hope it can introduce people to this great framework. If you want to learn swimming and are not afraid of the dark, you should probably give Cocoon a try
It's worth it.