Hi Stephen,

I do something similar as Dan and I keep the domain data and logic together 
in the model objects.

My impression is that keeping data and logic apart is often just a legacy 
architecture that was introduced in the time before EJB3 and JPA (but often 
still used with EJB3 and JPA). Before EJB3 the persistency layer was so 
separate and limited that it was a technical requirement to do it this way. 
But that's no longer the case as JPA comes very close to making your plain 
old objects (POJO's) persistent. So this way of working is now much closer 
to regular object oriented design.

This kind of design of course integrates the model and database design. The 
database schema becomes part of you're projects development. That means that 
this kind of architecture does not seem to work well with (static of 
external) legacy database models that are not part of you're project.

Regards,
Karen

"dan06" <[email protected]> wrote in 
message news:[email protected]...
>
>
> Stephen Nelson-7 wrote:
>>
>> Hi Dan
>>
>> I always try to keep as much domain/business logic in the domain
>> objects themselves. Otherwise you've [probably] gone through the pain
>> of O/R mapping for no tangible benefit. I generally use a service
>> layer for co-ordinating things e.g. calling a service; parsing a
>> result; storing a value in the data layer. It is then very easy to
>> wrap a transactional around it - and even easier if you're using
>> Spring. This kind of architecture is flexible without being overly so
>> and is clearly defined so you know where to go when bug fixing or
>> adding functionality.
>>
>> Regards,
>> --
>> Stephen
>>
>
> Hi Stephen,
>
> do you keep both the domain data and logic in the same domain object - 
> i.e.
> the ORM object maps to a table and has domain logic? Or do you have one
> domain "data"/ORM object and another domain logic object?
>
> Best,
> Dan
> -- 
> View this message in context: 
> http://old.nabble.com/Where-to-put-the-logic--tp26271911p26312551.html
> Sent from the stripes-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 
> 30-Day
> trial. Simplify your report design, integration and deployment - and focus 
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july 




------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to