cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <Ralph.Go...@dslextreme.com>
Subject [OT]DTO Pattern (was Re: [RT] Attribute Rendering and CForms Convertors)
Date Sun, 07 Nov 2004 19:57:55 GMT
Leszek Gawron wrote:

> There is one big difference when using Hibernate(d) model: You do not 
> have to use DTOs so it's easier to scale the system but harder to 
> enhance particular views with some specially rendered data.
>
> I try to avoid DTO pattern as much as I can.

This is completely off topic. 

My guess is that your system has a presentation tier and a database?  We 
want to have all our business logic in a separate tier from 
presentation. In our case this happens to be an EJB container.  Thus our 
database structure, our entity model and what is actually returned to 
the presentation tier might be very different things. I don't see how 
you can do that if you are going straight to Hibernate.

I'm not saying we couldn't use Hibernate. However, if we did it would be 
in the business tier as a way to persist our entities. Converting to do 
that would have no impact at all on our DTOs.  Even if we combined the 
presentation tier and business tier, I'd probably still use the pattern 
just to keep the clean line between the presentation logic and business 
logic.


Mime
View raw message