In this post, let's discuss a different kind of design patterns which are widely used in the Hibernate Framework. Design Patterns denote the best computer programming practices in object-oriented software development. Hibernate framework has been built by using the following design pattern or standard practices.
I listed few known design patterns used in Hibernate Framework.
Please leave a comment, if you know any other design patterns used in Hibernate Framework.
You can also read my post of Design Patterns used in Spring Framework.
The domain model is an object model of the domain that incorporates both behavior and data.
Read more about Domain Model Pattern here at https://stackoverflow.com/questions/41335249/domain-model-pattern-example
Proxy Pattern provides a surrogate or placeholder for another object to control access to it.
Read more about Proxy Design Pattern here at http://ramesh-java-design-patterns.blogspot.in/2017/12/proxy-design-pattern.html
This pattern defines an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
Read more about Proxy Design Pattern here at https://ramesh-java-design-patterns.blogspot.in/2017/12/factory-design-pattern.html
Read more about Query Object Pattern here at https://stackoverflow.com/questions/2068478/query-object-pattern-design-pattern
Read more about Data Mapper Pattern here at https://en.wikipedia.org/wiki/Data_mapper_pattern
I listed few known design patterns used in Hibernate Framework.
Please leave a comment, if you know any other design patterns used in Hibernate Framework.
You can also read my post of Design Patterns used in Spring Framework.
Domain Model Pattern
The domain model is treated as POJO in Hibernate.The domain model is an object model of the domain that incorporates both behavior and data.
Read more about Domain Model Pattern here at https://stackoverflow.com/questions/41335249/domain-model-pattern-example
Proxy Design Pattern
Proxy Pattern for lazy loading - https://docs.jboss.org/hibernate/orm/3.3/reference/en/html/performance.htmlProxy Pattern provides a surrogate or placeholder for another object to control access to it.
Read more about Proxy Design Pattern here at http://ramesh-java-design-patterns.blogspot.in/2017/12/proxy-design-pattern.html
Factory Design Pattern
SessionFactory of Hibernate is an example of the Factory Design Pattern.This pattern defines an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
Read more about Proxy Design Pattern here at https://ramesh-java-design-patterns.blogspot.in/2017/12/factory-design-pattern.html
Query Object Pattern
Hibernate Criteria API and the modern JPA2 Criteria API are an excellent examples Query Object Pattern.Read more about Query Object Pattern here at https://stackoverflow.com/questions/2068478/query-object-pattern-design-pattern
Data Mapper Pattern
A layer of Mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself.Read more about Data Mapper Pattern here at https://en.wikipedia.org/wiki/Data_mapper_pattern
Unit of Work
This pattern as part of Session object in hibernate.Read more about Unit of Work here at https://martinfowler.com/eaaCatalog/unitOfWork.html
References
Java EE Tutorials
- Java Persistence API
- RabbitMQ Tutorial
- Hibernate ORM 5
- Spring Boot 2 Tutorial
- Spring Core 5 Tutorial
- Spring Data JPA Tutorial
- Spring MVC 5 Tutorial
- Eclipse Quick Tutorials
- Apache HttpClient Tutorial
- Apache Maven Tutorial
- JAX-RS Tutorial
- Jersey Rest Tutorial
- Spring Framework 5
Data Structures and Algorithms
Java Tutorials
- Java Tutorial for Beginners
- 50 Java Keywords
- JDBC 4.2 Tutorial
- All Java/J2EE Tutorial
- Java 8 Tutorial
- Java Collections Tutorial
- Java Exceptions Tutorial
- Java Generics Tutorial
- Java 8 Stream API Tutorial
- Java Wrapper Classes
- Java Arrays Guide
- Java Multithreading Tutorial
- Java Concurrency Tutorial
- Oops Concepts Tutorial
- Java String API Guide
- Java Reflection API Tutorial
- Java I/O Tutorial
- Date and Time API Tutorial
- JUnit 5 Tutorial
- JUnit 4 Tutorial
- Java XML Tutorial
- Google GSON Tutorial
Java Library Tutorials
Design Pattern
Hibernate Framework
J2EE Design Patterns
Java
Comments
Post a Comment