• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

VO vs. DTO vs. Data

 
Trailboss
Posts: 23480
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
None of the above?
How about CowRecord. Or yet just Cow.
Mark
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm with Mark on this. I would go with Cow.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree - Cow. You are creating an object of type Cow, aren't you?
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Don't have a cow, man!"
Well OK, maybe just this once...
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm thinkin' CowBean
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
whippersnapper
Posts: 1843
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 23480
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 23480
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Evildoers! Eat my justice! And this tiny ad's justice too!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic