cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@odoko.co.uk>
Subject Re: AW: CForms and Modular Database Actions
Date Wed, 15 Jun 2005 11:58:14 GMT
WHIRLYCOTT wrote:
> Askild Aaberg Olsen wrote:
> 
>>
>> Why is tightly coupling my data access code to Hibernate so much 
>> better then, isn't this yet another framework (like EJBs)?
>> What if I don't have the need to reuse this code?
>> What if I'm just a newbie trying to get some data into my webapp?
> 
> 
> I should clarify that I'm not necessarily advocating Hibernate or OJB, 
> because those two particular solutions come with baggage.
> 
> What I would recommend is wrapping all of those implementation details 
> behind DAOs.  This way, you're not coupling your application logic to 
> anything but your own DAOs.
> 
> How does one does this in a reusable way while using modular database 
> actions or the SQL transformer?  The answer is that you can't.  And that 
> makes it a bad idea.

Take someone who has a small database of products, and just wants to put
that online. No ecommerce, just a simple publication, maybe with the
option to select some items and send an email with the chosen items listed.

And they're doing it as a favour to their mum.

Now, are you saying that they need to wrap that small database with
DAOs, and then embed hibernate or OJB into those DAOs, and set up all of
the database mappings, and so on, just for this small site? I think
they'll be using PHP pretty quickly at that rate.

>> I never argued Hibernate/OJB wrong or bad practive, I just outlined an 
>> alternative method to get a simple db-driven app up and running using 
>> a stock Cocoon, without the need to write a single line of Java-code 
>> (not using modular db actions, by the way...).
> 
> I'm not sure what the value of this is.  This approach seems like it 
> will get you 20% of the way to something useful really quickly.

The point is, there are different people using Cocoon for different
things. We need a lightweight way to integrate SQL and Cocoon forms. And
on the documentation about it it should say "this is only suitable for
_very_ small sites, and will become impractial quickly. You are
recommended to look at hibernate, or OJB (see the OJB block) and use
Java code to create more scalable and maintainable applications".

As I see it, there's a case for both approaches. Just that we only cater
for the heavyweight approach right now.

Regards, Upayavira


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message