Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!