Microsoft SQL Server
Crystal Reports
Delphi, C etc
Perl and the DBI
Unix Shell Scripts
Visual Basic
Corel Paradox
Microsoft Access
Microsoft Excel
Other PC Databases
Applications & Tools
Database Concepts & Design
EJB programming & troubleshooting
EJB design
General J2EE
XML & Web services
Web tier: servlets, JSP, Web frameworks
Performance and scalability
Industry news
TSS feedback
Mobicents Contributors
Mobicents Users
JSLEE Resource Adaptor Types
Planning JavaOne 2008
Sun Tech Days
Other Java conferences
Binary Web Services and XML
Metro and JAXB
GlassFish Plugins
Project jMaki
GlassFish WebTier
Java Development Tools
Java WS & XML Community News
Java SE
6uN Early Access
Java Quick Starter
Java SE Snapshots: Project Feedback
JCK Forum
Feedback and Suggestions
JDK Distros
JDK Open Source
General JSR Discussion
JCP 2.6
JXTA Community Forum
ME Interest
ME Cool Apps
ME General Help
ME Feedback & Suggestions
ME Application Developer Interest
Blu-ray Disc Java
ME Developer Days
Mobile Developer Alliance
JavaFX Script Language Discussion
OpenJFX General Discussion
Scene Graph
General Performance Discussion
Your Java Career
NetBeans 6.0
Portals and Portlets
EJB and Other Java EE Technologies
Distributed Java
Object Relational Mapping
Web Services
Swing / AWT / SWT / JFace
JNLP and Web Start
Java Micro Edition
Sockets and Internet Protocols
Threads and Synchronization
I/O and Streams
Other Java APIs
Game Development
Java in General (beginner)
Java in General (intermediate)
Java in General (advanced)
Programmer Certification (SCJP)
Developer Certification (SCJD)
Associate Certification (SCJA)
Web Component Certification (SCWCD)
EJB Certification (SCBCD)
Mobile Application Certification (SCMAD)
Architect Certification (SCEA)
Web Services Certification (SCDJWS)
XML Certification
Product and Other Certifications
Mock Exam Errata
Sun Certification Results
Authors' Corral
Book Reviews
Bunkhouse Porch
Teachers' Lounge
OO, Patterns, UML and Refactoring
IDEs, Version Control and other tools
Ant, Maven and Other Build Tools
Linux / UNIX
Mac OS
HTML and JavaScript
XML and Related Technologies
Agile and Other Processes
General Computing
Other Languages
Application Frameworks
Other Open Source Projects
Other Java Products and Servers
Cattle Drive (java college)
Moderators Only
Trash Can
Jobs Offered
Jobs Wanted
Jobs Discussion
Meaningless Drivel
Programming Diversions
Blatant Advertising
Java Announcements
New To Java
Advanced Java
Java Applets
Threads and Synchronization
Java 2D
AWT / Swing
SWT / JFace
CDC and Personal Profile
Sun Java Wireless Toolkit
Enterprise JavaBeans
JavaServer Pages (JSP) and JSTL
Java Servlet
JavaServer Faces
Web Frameworks
IntelliJ IDEA
Other IDEs
Java Tutorials
Java Tips
Jobs Discussion
Jobs Offered
Jobs Wanted
Professional Certification
Forum Lobby
Java Blogs
Reviews / Advertising
Suggestions & Feedback


Java Database
Software Development
Software Development


Architect Certification (SCEA)

Architect Certification (SCEA) Discussion of the Sun Certified Enterprise Architect Exam covering J2EE.

Value Object (VO) vs. Transfer Object (TO) vs. Data Transfer Object (DTO)

Hello Don,hello all,... now to the unintended and unexpected second sub-discussion:DTO vs. TO vs. VO:quote:Originally posted by don brown (aka brownie brownie):firstly, VO and DTO are not the same.When you compare todays "Core J2EE Patterns: Patterns index page" at "Figure 6.2 J2EE patterns relationships" on page 141 of the older book Deepak Alur et al. "Core J2EE Patterns"then you find exactly two differences:- "Value Object" of the book is called "Transfer Object" (not Data Transfer Object, ok) now- "Value Object Assembler" of the book is called "Transfer Object Assembler" now.But todays comment on the edge from Session Facade to Transfer Object Assembler still is- "Obtain CompositeValue Objects".So first off all I must apologize to Saha who used TO (Transfer Object) naming correctly.For clarifying if there could be any difference between- "Transfer Object" and- "Data Transfer Object" (and their Assemblers respectively).I found on (aC#site) Data Transfer Object "DTO", is a simple serializable object used to transfer data across multiple layers of an application. The fields contained in the DTO are usually primitive types such as strings, boolean, etc. Other DTOs may be contained or aggregated in the DTO. by Stasko, Roger at that site:There is a reason that the J2EE "Value Object" pattern was renamed to"Data Transfer Object" pattern [that is what also I believed but what is not true. VO has been renamed to "Transfer Object", see below. Thomas]....A Money object as the typical example of the value object pattern -- aninstance of Money represents a particular immutable value. We makevalue objects immutable to communicate what happens when the value ischanged (we get a new object so anybody holding a reference to the oldobject are not affected by this change).quote:Posted by Kalra, Ashwani at that site:... and other is j2ee pattern  . later is now called DTO. As thename implies, it is used to transfer data across different tiers incoarse form to overcome the network calls.So we haveVO = TO = DTOfor the first step.At: "":quote:Posted by: Raghu Kodali on November 23, 2004 ...diff for Value object pattern vs DTOCheck out the following thread but unfortunately that link is broken.By > Search "Data Transfer Object":At about "Composite Transfer Object Strategy sequence diagram":The Transfer Object can be a simple object or a composite object that has subobjects (a graph), depending on the data requested by the client. The Transfer Object is serializable and it is passed by value to the client. The Transfer Object functions only as adata transfer object; it has no responsibility with respect to security, transaction, and business logic. The Transfer Object packages all information into one object, obtaining the information with one remote call rather than multiple remote calls. Once the client receives the Transfer Object, all further calls from the client to the Transfer Object are local to the client.Becausedata transfer objectis not written having capitals I believe "Data Transfer Object" is really the C# name for what J2EE calles "Transfer Object" today and called "Value Object" before -without any intent to discuss C#-specifica of DTO here.So finally we haveVO = TO(and possibly = DTO - I don't care C#).Who does not agree: Please provide an official source / site authorized for naming these patterns.Thomas[ May 10, 2006: Message edited by: Thomas Taeger ]---------------------- - Interfaces are the glue of OO.


      The use of the terms is not consistent over time and between communities (i.e. beyond Java EE).Patterns of Enterprise Application Architecture(amazon)Value objectPage. 487quote:Name CollisionsI've seen the termValue Objectused for this pattern for quite some time. Sadly recently I've seen the J2EE community [Alur et al.] use the term "value object" to meanData Transfer Object(401), which has caused a storm in the teacup of the patterns community. This is just one of those clashes that happen all the time in this business.  Recently [Alur et al.] decided to use the termtransfer objectinstead.quote:Originally posted by Thomas Taeger:So finally we have VO = TO (and possibly = DTO - I don't care C#).Sorry, but you should care. DTO is the name that the general pattern community (i.e. not Microsoft specifically) will use for the Java EE TO. And there is no point in using VO in the former J2EE meaning because it's just going to confuse people (as your posts demonstrate) - just use the TO moniker.Some of the Java EE patterns have no equivalent in the general pattern community (e.g. Composite Entity) because they address peculiarities that are only found in Java EE architecture. Then you have the Java EE DAO, which the general pattern community finds a bit too vague  they have three patterns that could fit:Table Data Gateway,Row Data Gateway, andData Mapper.Another Example (p.391):quote:Remote FaadeandSession FaadeOver the last couple of years the Session Faade [Alur et al.] has been appearing in the J2EE community. In my earlier drafts I considered theRemote Faadeto be the same pattern as the Session Faade and used the Session Faade name. In practice, however, there is a crucial difference.Remote Faadeis all about having a thin remote skin - hence my diatribe against domain logic in it. In contrast, most descriptions of the Session Faade involve putting logic in it, usually of a workflow kind. A large part of this is due to the common approach of using J2EE session beans to wrap entity beans. Any coordination of entity beans has to be done by another object since they can't be re-entrant.As a result I see the Session Faade as putting severalTransaction Scripts (110)in a remote interface. That's a reasonable approach, but it isn't the same thing as aRemote Faade. Indeed, I would argue that, since the Session Faade contains domain logic, it shouldn't be called a faade at all!It's important for SCEA Part 2 to know the J2EE Patterns and document their use in your project  but as a technical professional you should aim to rise above the "nothing but Brand X" nonsense and prefer the use of the more general pattern language whenever possible  only use community specific patterns when appropriate or necessary  the idea is to communicate, not obfuscate.[ May 10, 2006: Message edited by: Peer Reynders ]--------------------"The diagrams representing the source code are ancillary to the design and not the design itself."Robert C. Martin summarizing one point from Jack Reeves essay What is Software Design? in  Agile Software Development, Principles, Patterns and Practices  p.87

      Hello Peer,quote:Originally posted by Peer Reynders:It's important for SCEA Part 2 to know the J2EE Patterns and document their use in your project  but as a technical professional you should aim to rise above the "nothing but Brand X" nonsense and prefer the use of the more general pattern language whenever possible  only use community specific patterns when appropriate or necessary  the idea is to communicate, not obfuscate.thank you very much for your recommondations!It is true, outside the GoF and for instance the J2EE patterns I feel like a novice.Allthough respecting the topic of this forum being J2ee specific:- Can you help me with links giving an overview and/or a clear definition of "non-brand"-patterns of "the community"?- What is this community? Anywhere located? Driven by whome or what? ...- Especially links that could pick me up with my GoF and J2EE pattern know how compared to "common" patterns would be helpfull.For instance the terms "DTO", "TO" and "VO" I would like to clarify for myself.Thank you in advance,Thomas---------------------- - Interfaces are the glue of OO.


      In general the J2EE Community has managed to establish their own set of patterns mainly to deal with problems that tend to arise in the J2EE environment. Some overlap was unavoidable. And as the DAO and "Remote Faade vs Session Faade" demonstrate there rarely is a perfect one-to-one relationship. The "DTO vs TO" is the exception and "Value Object vs VO" is just plain unfortunate.Some J2EE patterns do not translate to non-J2EE environments  however general patterns are useful in Java and Java EE to solve some recurring design challenges. Sometimes Core J2EE Patterns will reference general patterns (see for example:Application Controller)The baseline for J2EE patterns is established by:Core J2EE Patterns 2eEJB Patterns (PDF)J2EE AntiPatternsThe baseline for general design/patterns is established by:Design Patterns: Elements of Reusable Object-Oriented Software (GoF)Pattern-Oriented Software Architecture  A System of Patterns Volume 1 (POSA1)Smalltalk Best Practice PatternsPattern Languages of Program DesignPattern Languages of Program Design 2Pattern Languages of Program Design 3Patterns of Enterprise Application Architecture (PEAA)Domain Driven Design  Tackling Complexity in the Heart of Software (more design  not really patterns)AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis--------------------"The diagrams representing the source code are ancillary to the design and not the design itself."Robert C. Martin summarizing one point from Jack Reeves essay What is Software Design? in  Agile Software Development, Principles, Patterns and Practices  p.87

Related Links

SCEA old version part 1
JPA question X CMP and JDBC
SCEA 5 / 1 - JPA question
SCEA 5/1 - WS/REST question
Open Mail to Cameron Wallace McKenzie
SCEA 5/1- Question about securitiy
Deployment Diagram - SCEA 5
Which Chapters of Java Enterprise in a Nutshell need to study for exam?
Cleared SCEA 2 - Part I with 81%
SCEA 5 Beta part 1 passed before... still valid?
SCEA 2 Passed
Passed Old part I with 75%
Anyone using visio for second part of SCEA
SCEA 2 -------> SCEA 5
SCEA Old exam No more Available ?
SCEA 5 Part 2 anyone?