Data access object: Difference between revisions

Content deleted Content added
mNo edit summary
Adding/improving reference(s), Grammar edit
Line 14:
== Advantages ==
{{unreferenced section|date=February 2015}}
The primary advantage of usingUsing data access objects is(DAOs) theoffers rigorousa separationclear betweenadvantage: it separates two parts of an application that have nodon't need to know anything about each other,. andThis whichseparation thereforeallows canthem evolveto frequently andevolve independently. ChangingIf business logic changes, it can rely on a constantconsistent DAO interface. Meanwhile, while changesmodifications to persistence logic do notwon't affect DAO clients.
 
All details of storage are hidden from the rest of the application (see [[information hiding]]). [[Unit testing]] code is facilitated by substituting a [[test double]] for the DAO in the test, thereby making the tests independent of the persistence layer.
Line 20:
In the context of the [[Java (programming language)|Java]] programming language, DAO can be implemented in various ways. This can range from a fairly simple interface that separates data access from the application logic, to frameworks and commercial products.
 
Technologies like [[Java Persistence API]] and [[Enterprise JavaBeans]] come built into application servers and can be used in applications that use a Java EE application server. Commercial products such as [[TopLink]] are available based on [[object–relational mapping]] (ORM). Popular open source ORM software includes [[Doctrine (PHP)|Doctrine]], [[Hibernate (Java)|Hibernate]], [[iBATIS]] and JPA implementations such as [[Apache OpenJPA]].<ref>{{Cite web |date=2017-08-26 |title=Data Access Object(DAO) Design Pattern |url=https://www.geeksforgeeks.org/data-access-object-pattern/ |access-date=2024-01-29 |website=GeeksforGeeks |language=en-US}}</ref>
 
== Disadvantages ==