• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Has someone used Cocoon

 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
read about it in apache's web site. Is it simple to use?..does not seem so :-(
Has someone played around it as a part of learning / projects?
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We use Cocoon in production. What exactly are your concerns? Perhaps I can help you if you are more specific.
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
picked up oreilly's books yesterday
Java and XML
Java and XSLT.
THere is a chapter on web publishing frameworks..seems to be good.
I was just wondering if we can develop a whole application using Cocoon OR as the name suggests it's a web "publishing" framework. I mean you have some data in XML format which needs to be presented in different forms.
Shall post more specific questions once am up and running with cocooon.
If possible can you just briefly describe your project which uses cocoon and whether the project is entirely based on it?
thanks!
karthik
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We use Cocoon to generate presentation, exactly what it is designed for.
The following describes the architecture in brief -
  • Cocoon is registered as the Servlet to handle all web requests matching a specific URL pattern in the web.xml file.
  • Stand-alone custom Java classes called "producers" are registered with Cocoon.
  • Cocoon intercepts user requests and delegates them to producers.
  • Producers generate XML documents, after doing some business processing by communicating with the business facades. The XML document is generated on the fly using DOM. Many chunks of the document produced by many components called by the producer are finally assembled into one big document and passed back to Cocoon.
  • Cocoon looks at the document, extracts the stylesheet( stored as a resource somewhere ), applies the transformation and produces a presentable format such as HTML, WML, VoiceXML etc.
  • Another pluggable layer of stand-alone custom Java classes called "processors" intercept the transformation process to amend the transformed document when necessary.


  • The cool thing about Cocoon is its support for truly dynamic content generation using producers and processors. The latest version of Cocoon 2 has a lot more to offer both in terms of interoperability and performance( such as use of DOM instead of SAX ).
    If you are really into it, I suggest that you checkout the Cocoon 2 tutorial on IBM's DeveloperWorks website. Also expect a lot more Cocoon titles to hit the bookshelves in the next six months.
    Cheers!
     
    Author and all-around good cowpoke
    Posts: 13078
    6
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    The statement

    The XML document is generated on the fly using DOM.


    does not apply to Cocoon2.
    Cocoon 2 did a major re-architecting to use SAX generation as much as possible. This avoids assembling huge documents in memory as DOM. We now have Generators (of SAX events) instead of producers.
    The Cocoon developers are set to release a new version (2.02 I think it will be called) in the next week or so.
    Bill (Writing one of those Cocoon books...)
     
    Ajith Kallambella
    Sheriff
    Posts: 5782
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Nope, we are still with 1.8
     
    William Brogden
    Author and all-around good cowpoke
    Posts: 13078
    6
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    From what I see on the mailing list, changing from Cocoon 1 to the architecture of Cocoon 2 is a major hassle! Version 2.0.2 was released today.
    How big is your site?
     
    Ajith Kallambella
    Sheriff
    Posts: 5782
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Significantly big - about 300 stylesheets, 7 major subsystems each having 15-20 producers.
    We haven't had major performance bottlenecks. Moving to Cocoon 2.0 will happen only for a compelling reason.
    Given the number of people who have production systems using Cocoon 1.8, I'm hope someone will soon come up with a work around such as adapter classes. Till such time, we'll wait
     
    There are 10 kinds of people in this world. Those that understand binary get this tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic