cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linden H van der (MI)" <>
Subject RE: "Apache Cocoon in Action" suggestion and call for opinions
Date Wed, 13 Apr 2005 13:28:33 GMT

just a quick hack/overview of what I have in mind. All this can be
added/modified etc. This is more or less how I did it. Note: I'm not in
favor of making this tutorial a "showcase" of all things possible. That
would make the tutorial either too large and too complex.
Another idea: once finished (documentation and such) I think the final
result should be available as sample as well.

I think what I've outlined below is enough to give an impression of what
(and how) to do with Cocoon. Other tutorials should follow focusing on
other aspects. E.g. a tutorial that expands the one below with a public
and a private part. E.g. the info below is public, after logging in the
private data is a photogallery (using the DirectoryGenerator) or a set
of MP3 songs. This tutorial also shows how to handle typing in a
"private" URL when not logged in.


1. get Eclipse or another editor that you feel confortable with when
writing XML. Use an editor, rather than a word processor because you'll
be looking at ASCII most of the time.

2. Read YourCocoonBasedProjectAnt16, download the xml file and run it.

3. If you're using Eclipse, set up a project [link to HOWTO here?] or
setup a similar project in your favorit environment. Using a project
keeps all related files together.

4. Get Cocoon

5. Run ant cocoon:get to "seed" your project with the necessary libs

7. Create a dir for your new cocoonapp (e.g. myapp)

6. Create a set of dirs under src/cocoon/webapp/myapp to separate pure
content files from e.g. images and scripts etc.

7. Put in the sitemap [sample sitemap.xmap to download here] in

Discussion of the various parts of the sitemap. It already has pipelines
for resources etc. It aligns with the dirs created in step 6.

8. Create first XML file in src/cocoon/webapp/myapp/content (e.g.
home.xml). Fixed name, because redirection is already added to sitemap.
Discussion of redirection in sitemap either here or in separate link
(further reading)

9. run ant webapp to copy over all the files in src to tools.

10. run ant cocoon:run to start up Jetty

11. goto localhost:8888/myapp/welcome.html (default pipeline *.html ->

This should show the first page, with info of user.

12. Expand by adding images and CSS

13. Expand by adding a menu (e.g. included using CInclude)

14. Expand by adding more pages, e.g. a CV which can be turned into a
PDF file. (adding pipeline and such for this)

15. Expand by adding a Contact Form. The result is a page containing the
information entered. Adding a print.css to the file gives a pretty print
preview. And a button can be added to actually mail the info with a CC
to the user of the form.

Discussion of how to build the various form files, the flow script to
handle it, the necessary pipelines to handle this, etc.
Discussion of adding print.css and discussion of enabling emailing.

Side note: how to debug pipelines, flow script etc.

16. Expand by adding i18n support (messages files, adding in of i18n
transformers in sitemap, adding i18n tags to your content, what to do
with larger chunks of text)

17. Expand by adding Apache configuration + handling of error pages
(either by Apache or by Cocoon)

{wish to know the latter myself ;-))

Scripts to start/restart Jetty?

18. deployment info? 

NOTE: we might as well add some "parental guidance" by ALSO mentioning
the advantages/HOWTO of:

- setting up and frequently using some kind of CVS
- working on producing valid (X)HTML and (if relevant) CSS -> also info
on stripping of namespaces
- using/producing UTF-8
- note on how to avoid spiders from harvesting email addresses etc.
- take the time to provide proper error documents, rather than showing
the default Cocoon error page.
- frequent testing on various browsers and screen resolutions

I realise the above is still a lot for a tutorial to work through, so we
can use the advantage of the web by providing "in depth" info through

I also realise this is a big chunk of work to write. ;-)


Bye, Helma

> -----Original Message-----
> From: Sebastien Arbogast [] 
> Sent: Wednesday, 13 April, 2005 12:04
> To:
> Subject: Re: "Apache Cocoon in Action" suggestion and call 
> for opinions
> > Sounds great. At some point, we've got to come up with a 
> list of the 
> > sort of tutorials and walk-throughs we want, so that we can have 
> > comprehensive coverage. In the meantime, I'd say just go ahead and 
> > write it!
> .... or let's try to see if it can't be part of sort of a 
> bigger complete tutorial. BTW if anyone has such an 
> application built upon Cocoon and that could be used as a 
> complete case study application, it would be welcome. What I 
> mean is that one can find many small howto's and tutorials 
> about Cocoon but maybe we could concentrate the efforts on 
> getting fewer documentation pieces but with more coherence 
> and entropy in it. I think that's what Bertrand meant by 
> "keep the number of documents to the minimum" and I totally 
> agree with that : the current Cocoon learning path is too 
> much jumping between different articles, sources, tutorials, 
> websites... whereas it could be a "sliding path"... if we 
> could concentrate the energy of the documentation community 
> on a common effort.
> I know it seems like I'm willing to start a whole new branch 
> of documentation, breaking the "common effort" idea but I 
> really think that's what Cocoon misses to be known and used 
> as it deserves it : We already have a few good getting 
> started guides (that just need to be updated a little bit), 
> with the new documentation effort from Reinhard and Upayavira 
> there will be a complete, accurate and coherent cocoon 
> reference and with that kind of intermediate level doc there 
> could be a straight link between both of them.
> But I think that the key to get all of this working is to 
> concentrate our energies...
> -- 
> Sebastien ARBOGAST

View raw message