jQuery in Action, 2nd edition*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Difference between Repository and DAO petterns Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Difference between Repository and DAO petterns" Watch "Difference between Repository and DAO petterns" New topic
Author

Difference between Repository and DAO petterns

Yash Don
Greenhorn

Joined: May 19, 2010
Posts: 12
Hi All,

I have a small doubt about Repository and DAO patterns. I have read both the patterns and they look very similar.

Can you please tell me the difference between them


Regards,
Yash

SCJP, SCWCD
Arnold Reuser
Ranch Hand

Joined: Nov 20, 2003
Posts: 196
Try to find out if DAO or the Repository pattern is most applicable to the following situation :
Imagine you would like to provide a uniform data access API for a persistent mechanism to various types of data sources such as RDBMS, LDAP, OODB, XML repositories and flat files.



 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Difference between Repository and DAO petterns