Sylvain Wallez dijo: > Ugo Cei wrote: > >> Sylvain Wallez wrote: >> >>> This is a good idea when you need to use the JavaBean for some >>> business logic. But there are many cases where you just want to >>> populate a database after successful validation, and the average >>> Cocoon user quickly becomes reluctant to writing Java code, even for >>> storing data in a database ;-) >>> >>> Sylvain >> >> >> I'm wondering how writing *very* simple Java code (mostly classes with >> a handful of private data fields with getters and setters, and even >> this step can largely be automated using Hibernate), is worse than >> writing SQL code, forever tieing your presentation layer to the >> implementation of your storage layer. > > > Read my answer to Oliver. Note that I'm not trying to push bad software > engineering practices, as I've been advocating separation of domains for > a very, very long time. I'm just reporting what I've seen several > times. > > Cocoon allows to "forget" the underlying Java code by the power of its > architecture and the available components. And sometimes it hurts when > you have to go back to "raw" Java code for something as simple as > populating a few values in a DB.
I agree in this point.... First, I think the use of beans is OK. The question here is how to make the "glue" between Beans and XMLForm in an easy way to everybody. The SQL approach is not good. It tie your application to a concrete Database Implementation (please read PostgreSQL, MySQL, etc.). I think we need to find an easy way to create the Beans from the XMLForm or another XML document. I builded my first Cocoon webapp using the traditional cycle suggested for Cocoon 2.0x. When I was writing the code I felt like something is missing, because the FormValidator files are a very repetitive task. Always I write almost the same code again and again. There was a lack of datatype, etc. For example: The constrains for a email field is always the same regarless is this is a email field for a customer table or a email field for a user table or a provider table. I hope you can get my point. Then I started thinking that maybe the answer is a little away from Cocoon... Maybe an IA application that can be smart enough to build the Database based on all the XMLForm you create. Then it will create the SQL implementation for the Database you need to do. Maybe this is a crazy idea, but I saw some software implementation that use this approach. What about this? :-) Of course all will be described in a XMLForm. I hope it will help. Best Regards, Antonio Gallardo. > > An important point to notice also, is that Cocoon can be used > efficiently by people that have a very low Java knowledge but know very > well how to manipulate XML data and assemble smart pipelines. Yes, It must be automatic. :-) > > Sylvain --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]