aspose file tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes what are domain object and  service entity? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Reply Bookmark "what are domain object and  service entity?" Watch "what are domain object and  service entity?" New topic
Author

what are domain object and service entity?

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 550
Hi
thank you for reading my post
what are Domain objects and service/business entities ?
I know DAO and DTO but i can not understand thie two domain object and service/business entities.

Thanks
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
"Domain" usually refers to something in the business world. We talk a lot about domain objects in analysis. For example I work in insurance and our system has domain objects like Contract (policy) and Party (owner, insured, etc).

"service/business entities" is not a term I'm familiar with. I could guess, but that wouldn't be real helpful to you. Did you find it in a book or school notes or something? Give us a little more context around how it's used and what you think it means.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 550
Hi
Thank you for your answer
I can not find the link that i read this but i remember some of its important sentences :

if we have a customer with its which has some properties , we can add methods to it for saving the customer to database , retriving the customer details from database ( initiate a customer based on PK) and methods to perform other tasks.
it was first way which is similar to EJB , the other one was like this :
we have a customer with properties and another class which do savecustomer , loadCustomer , .....

i remember that respective author named the second approach business entity .

now i want to know more about second and first approachs and i want to know which solution is better ?


Thanks
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6913
i want to know which solution is better

There is no generally "better" solution.

Encapsulating the data and fetch/store code together can be a good choice if these things are tightly bound together, share little with other business objects, and will usually move/change together.

Separating the data and fetch/store code can be a good choice if many business objects use common fetch/store facilities which don't move/change at the same times as the business objects.

Can you tell us any more about the needs of your a system you are considering using these for?


A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 550
I want to develop a web application based on jsf and EJB3 as both of them are good technologies as far as my reaserch tell.
the web application will have about 15 Database tables , certainly they have some relation together.
application will have data entry , retrieve , reporting , user management (login/logout/register) .
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: what are domain object and service entity?
 
Similar Threads
Confusion between domain model and presentation model
Questions on design patterns
buisness object design pattern is not clear to me
Controller to Service Layer
BDM vs Component diagram - SCEA's pls clarify