-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Domain model different from persistent model. Good practice?
PostPosted: Tue Mar 09, 2004 8:45 am 
Newbie

Joined: Tue Mar 09, 2004 4:30 am
Posts: 2
Hi,

I got involved recently in a project where they've setup a fairly generic datamodel and have made a one-to-one mapping to a set of persistent classes.
On the other hand they've created a separate non-persistent domain model that reflects the business domain.

Between the two they are developing an interface layer that basically converts from the one structure to the other when saving or retrieving data to/from the db.

IMO we should try to go for one uniform persistent model that is also used in the business logic layer.
The main argumentation for having 2 models is to have an isolation between persistence and business layer.

Does anyone know if it is a viable approach to have 2 separate models ?
I'm bit afraid that we will be spending a lot of work on developing this interface layer between both models. Work that would otherwise be handled by Hibernate itself.

Tx for any suggestions, feedback...

Roger.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 1:52 pm 
Newbie

Joined: Thu Dec 11, 2003 6:21 am
Posts: 8
FWIW, I've been involved in project which used similar approach (separate persistent and business model) and found it very cumbersome. As you said, hibernate already takes care of mapping between object and relational model, so I can't see why one would need an extra layer to maintain. This mapping layer (Hibernate) also provides isolation between domain model and database.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.