cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@apache.org>
Subject Re: [SHRT] Cocoon on Rails Application Component Kernel (CRACK)
Date Sat, 08 Oct 2005 07:42:59 GMT
Le 7 oct. 05, à 17:09, Berin Loritsch a écrit :

> ...As to the sample apps--I agree to a point.  If you don't have the 
> convention to build the sample app with, how is the potential user 
> going to know what they are looking at?  In other words what are they 
> going to walk away with when the look at a sample app?...

I've been thinking about this after the discussions at the GT 
yesterday, and generating an app like bricks-cms from a data model 
could be very helpful.

Starting from a database schema (or our own schema definition maybe, 
more flexible and easier to parse), here's what you'd need to generate 
(not talking about views at this point, so this covers only part of 
what you're after):

-Java data objects (1:1 mapping with name conventions)
-OJB repository.xml file (same)
-For each object, the CForms model, binding and template files
-A menu of available CRUD forms

The slightly tricky bit is to manage relations between objects, but at 
least for simple relations it shouldn't be too hard.

This would create a plain CRUD form on the available objects, on which 
we can easily plug "customizers" using the resource-selector trick that 
Sylvain showed: if there is a foo-form-customizer.xsl in a given 
directory, it is applied to the foo object form.

This customizer pattern could also be used at any stage of the code 
generation, to allow various customizations - assuming the generation 
would be done by Cocoon itself running in CLI mode.

I'm not saying I'll implement this today, but it really looks like we 
have all the tools to do it. Would be a cool project for a next GSoC 
(if there's a next one), unless we can do it before.

About the name: sorry I don't have a worse proposal than you guys at 
this point ;-)

-Bertrand

Mime
View raw message