• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Value Object, Data Transfer Object and Domain Object

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know that value object is used within Business Tier while data transfer object, is used if you want to transfer data outside the boundary of the application. What I don't know is, if domain object is the same with value object or with data transfer object?
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The domain object is not same as VO or DTO. domain objects are the objects which has properties and the actions for the properties
 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Richard Teston:
I know that value object is used within Business Tier while data transfer object is used if you want to transfer data outside the boundary of the application. ...


For me the only difference is a) the J2EE pattern naming "VO" and b) the for some usages semantically better naming "DTO".

Both should have no business logic (except maybe some simple type conversions) but offer getter and setter methods.

VOs are used to to be transferred over tiers like DTOs too, but not only.

Originally posted by Baiju Varugese:
The domain object is not same as VO or DTO. domain objects are the objects which has properties and the actions for the properties


Do you know any examples? What are "actions for properties" except getters and setters?

Where did you two find the name "domain object"?

Isn't "domain objects having actions" a synonym of objects implementing Command pattern? A command
a) may also be transferred like a DTO / VO to be executed remotely but
b) may additionally be used in finite state machines or other listeners used for declarative event processing.

Thomas.
[ August 23, 2005: Message edited by: Thomas Taeger ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See http://faq.javaranch.com/view?OoDesignFaq
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Thomas Taeger:
Where did you two find the name "domain object"?



Google for "define: domain object".


Isn't "domain objects having actions" a synonym of objects implementing Command pattern?



No.

A Command object always represents exactly one command, and implements a common interface that makes it exchangable for other commands.

A domain object represents the behaviour of a domain concept, and can therefore have a number of methods. It doesn't necessary need to implement any common interface.
reply
    Bookmark Topic Watch Topic
  • New Topic