Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

VO vs. DTO vs. Data

 
paul wheaton
Trailboss
Pie
Posts: 21478
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
None of the above?
How about CowRecord. Or yet just Cow.
Mark
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm with Mark on this. I would go with Cow.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree - Cow. You are creating an object of type Cow, aren't you?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Don't have a cow, man!"
Well OK, maybe just this once...
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm thinkin' CowBean
 
Marilyn de Queiroz
Sheriff
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1820
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 21478
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 21478
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic