What is a "Data Object "? 2004-01-04 - By Chad Woolley
Back ashraf galal wrote: > Chad; > Regarding your first comment: > If you have a look at the sequence diagram attached with this class diagram (which I wasn�t able to send it to you since the message must not be greater than 50K and it also from the book), you will find that the business object might be stored in persistence storage. > This persistence storage could be any thing you like, entity bean, java class , flat file, �etc. > To have the big picture please get a look to the DAO class diagram and sequence diagram this will explain more about the data object. > The term data object, we use that term to indicate any object that persist in storage. > The business object pattern does not mean data object. > The following is from the book too: > Business object is an object that implements business logic and/or business data. > ` > Business data and business logic are implemented in coarse-grained objects called business objects.
Ashraf,
Thanks again for the response. I'm still confused. You referred me to the DAO class and sequence diagram, which is here:
http://www.corej2eepatterns.com/Patterns2ndEd/DataAccessObject.htm
I'm not sure how these diagrams tell me anything more about what a "Data Object" is. In this pattern, the DAO creates a TransferObject. It doesn't look like this pattern mentions "Data Object" either (at least not in the diagram, I don't have my book with me right now to review the chapter text).
Are you saying that a Data Object is a type of transfer object, at least in the context of being returned from a DAO? This doesn't make sense either, because the sidebar at the end of the Business Object pattern chapter specifically tells you NOT to use a Transfer Object to pass data into your Business Object.
So, to restate: When you say Data Object is something that is persisted in storage, that seems to conflict with the DAO pattern which imples that a DAO should return a Transfer Object - if you take the advice of the Business Object chapter which says you shouldn't pass Transfer Objects into your Business Object, but the Business Object code sample passes in a "Data Object".
Also, I'm not sure how persistance is relevant to the question either. It's true that the Business Object may be persisted in storage. However, that doesn't answer the question about what the "Data Object" is that was passed in to the constructor of the "Business Object".
Which brings me back to the original question: What is a "Data Object", and are there any other concrete examples of what it is in the book, other than the code sample in the Business Object chapter? If it is a "Transfer Object", then the Business Object chapter's code sample violates it's own advice.
Thanks, Chad
===================================================================Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
|
|