*
The moose likes Java in General and the fly likes VO vs. DTO vs. Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "VO vs. DTO vs. Data" Watch "VO vs. DTO vs. Data" New topic
Author

VO vs. DTO vs. Data

paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20542
    ∞

So I have a class that just holds some data and is serializable.
Which would you pick:
CowVO
CowDTO
CowData


???
[ February 21, 2003: Message edited by: Paul Wheaton ]

permaculture Wood Burning Stoves 2.0 - 4-DVD set
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

None of the above?
How about CowRecord. Or yet just Cow.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
I'm with Mark on this. I would go with Cow.


Matthew Phillips
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I agree - Cow. You are creating an object of type Cow, aren't you?


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
"Don't have a cow, man!"
Well OK, maybe just this once...


"I'm not back." - Bill Harding, Twister
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

I'm thinkin' CowBean
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
CowVO = CowVirtualObject?

CowDTO = CowDataTypeObject?



Of the three choices, I would choose CowData.

Do you have other Cow-type classes?
[ February 22, 2003: Message edited by: Marilyn de Queiroz ]

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

VO = ValueObject?
DTO = Data Transfer Object?

The key is "and is serializable" right? Otherwise, you'd just call it Cow. But you want to somehow imply that it can be serialized with the name? Python folks refer to the process of serializing as 'pickling'. I think that's rather tongue-in-cheek. But maybe it's a hint for your.

Maybe you should call your class Burger.
Or maybe: public class Cow implements Burger.

Where Burger is a marker interface, a la 'RandomAccess' in the new 1.4 Collection classes. Hey wadya know, my SCJP works!
Michael Matola
whippersnapper
Ranch Hand

Joined: Mar 25, 2001
Posts: 1746
    
    2
Originally posted by Mike Curwen:
Python folks refer to the process of serializing as 'pickling'.

It's my understanding that the term "pickling" way predates Python.
I hope I'm not hallucinating this, but I think even Oracle has some procedures called "pickling" (which shows a certain amount of levity not usualy expected).
Sorry for the hijack, Paul.
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20542
    ∞

Yes, VO is "value object" and DTO is "data transfer object".
This is something that would carry typed data from the server to the client in a lean class.
I know which one I prefer, but I want to get a feel for what's used the most out there.
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
OK, maybe I'm being a little too desciptive in my naming, but if the class is meant to carry cows how about . . .
MeatWagon
Seriously, CowDTO is my choice if there are other Cow classes involved.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Do I dare move Paul's topic over to J2EE/EJB where it's more approrpiate...
Surely there must be a J2EE Blueprints naming convention guide out there somewhere. Me too busy listening to Joan Armatrading to go lookin'
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20542
    ∞

I've used these things in a non J2EE environment in the past.
And I know what sun says - I'm interested in what folks in general have used or like.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: VO vs. DTO vs. Data