Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design Patterns for DAO & VO

 
Daniel CarMichael
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What GoF design pattern(s) does Data Access Object exhibit?
Proxy?
What GoF design pattern(s) does Value Object exhibit?
Memento?
Any idea?
 
Alex Pisarev
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Daniel CarMichael:
What GoF design pattern(s) does Data Access Object exhibit?
Proxy?
What GoF design pattern(s) does Value Object exhibit?
Memento?
Any idea?

I think DAO is closer to Adapter (anyway, it's more strutural than creational). Value Object is also structural in nature, so in some cases it could be Composite, in most cases it's just a bean, nothing else. I do not think that Memento's usage strategy will work for VOs.
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could DAO be the Bridge Pattern? :roll:
 
Richard Li
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DAO = Bridge + Adapter
The Adapter part is in the implementator of the Bridge.
Often created by Abstract Factory or Factory Method.

more detail, see the sun web site plz.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic