cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <gkossakow...@apache.org>
Subject Re: Archetypes, blocks, webapps ...
Date Mon, 16 Apr 2007 19:17:21 GMT
Andrew Savory napisaƂ(a):
> Hi folks,
> 
> I'm trying to understand the difference between the two archetypes,
> cocoon-22-archetype-webapp and cocoon-22-archetype-block.
> 
> From the names, I'd guess cocoon-22-archetype-webapp is where I should
> start if I want to build a simple c2.2-based site with sitemaps, xml,
> xslt and so on. I'd assume cocoon-22-archetype-block is where I should
> start if I want to create some custom code, to be used within my webapp.

Apparently, it's different, webapp is used to... assembly a webapp, run a webapp etc. However,
in C2.2 every Cocoon webapp consists of set
of blocks. Webapp gives you infrastructure to assembly your blocks into WAR file, it also
gives you infrastructure to run (with help of
jetty) your application.

> ... but if I create a simple cocoon-22-archetype-webapp application, I
> can't run it - which is what I somehow "expect" coming from c2.1.

Yes, it can be somehow confusing for someone coming from 2.1 but I think current situation
is much cleaner and all we have to do is to
provide some docs.

> There's no sitemap, and on jetty startup there's errors like "Could not
> instantiate listener
> org.springframework.web.context.ContextLoaderListener". Only the block
> archetype contains the necessary stuff to run - and so I have to create
> a block as well.

That's right. Thinking about it further, I wonder if we could provide more meaningful message
that webapp is empty so it cannot do any thing
useful and one has to create block and start hacking there?

> This seems a little confusing. There's quite a difference between what
> cocoon-22-archetype-webapp creates and what is in core/cocoon-webapp.
> Are we expecting our users to do more work, or should we extend the
> webapp archetype? Or do we need a short document on what "new" cocoon
> web apps look like? (In which case, if you explain it, I'll write it!)

I think that webapp archetype should not be extended in any way. All we have to do is to say
user's that application's code should be put in
one or more blocks. See also: http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1159.html

I'll be happy seeing you documenting this. You will do it much better, because you are newcomer
and documentation is targeted at newcomer :-)

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Mime
View raw message