• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

why DAO?

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any valid reasons to use DAO, now that we have JPA and other orm tools.

Is there any advantage of using DAO?
 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi azhar,

Originally posted by azhar bharat:
Is there any valid reasons to use DAO, now that we have JPA and other orm tools.

Is there any advantage of using DAO?



Just to make things a bit tangible.

  • DAO is a design pattern.
  • JPA is a specification.
  • Hibernate (ORM tool as you say) is an implementation of JPA.


  • The DAO pattern still plays the same important role in a Java EE 5 environment as it did before. No change here .

    See more here: Sun's Blueprint about the DAO Core J2EE Patterns and Generic Data Access Objects

    Regards,
    Darya
     
    azhar bharat
    Ranch Hand
    Posts: 87
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    so, when using hibernate/jpa, it is a DAO pattern, am i right?
     
    Darya Akbari
    Ranch Hand
    Posts: 1855
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    No, the DAO pattern does not depend on the ORM tool you use. Look the links I gave you, for an implementation example with Hibernate.
     
    Don't get me started about those stupid light bulbs.
    reply
      Bookmark Topic Watch Topic
    • New Topic