cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject [RT] Modernizing CForms
Date Sat, 17 Mar 2007 17:40:04 GMT
Grzegorz Kossakowski skrev:
> Daniel Fagerstrom napisaƂ(a):
>> Grzegorz Kossakowski skrev:
>> A modern form framework
>> =======================
>> Being a little bit provocative I'm starting to find CForms rather old 
>> fashioned in style. Why so much server side stuff wouldn't it be 
>> better with a form framework where most of the form framework is 
>> client side and invokes REST style web services for the CRUD 
>> operations on the server side resource that the form updates.
> Yes, you are provocative here and to be honest not really convince me 
> but I think it wasn't your goal to do so. I really prefer having good, 
> stable, documented and powerful form framework than new, shiny and 
> fashionable form framework :-)
> I think that it must be provided a long sequence of good arguments to 
> throw out one of the best Cocoon's block and start implementing new one...

[And from earlier in the thread]
>> Also we could need some "convention before configuration" and
 >> "don't repeat yourself" in our forms framework. JBoss Seam
 >> (,
 >> does some cool stuff that we could imitate. Especially it uses Hibernate
 >> annotations for form validation

I don't propose that we should throw out the current Forms framework. 
What I do propose is that it could be improved so that it would require 
less work to use and so that it would support AJAX+REST style webapps 

Don't repeat yourself

As an alternative to using XML configurations for form definition and 
binding both the form definition object and the binding object could be 
configured from annotations in the model bean. With some decent set of 
conventions, people who follow the conventions would be able to connect 
forms to the business model with considerably less code writing. JBoss 
Seam is a good example of what I have in mind.

AJAX+REST friendliness

IMHO the preferred webapp architecture will move from MVC model 2 
towards the kind of architecture described in figure 2 in
and in

One way to support such a architectural style with our forms framework 
would be to refactor it so that it allows for a more RESTish 
communication style. Think about the form instance as a resource that 
can have JSON (or XML) representation that you can GET, PUT, POST or 
DELETE. One could also have support for letting the client ask for tthe 
data types of the form for supporting client side validation.


View raw message