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 the object-oriented software development. Hibernate framework has been built by using the following design pattern or standard practices. I list few known design patterns used in Hibernate Framework. Please mention in 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 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.html Proxy Pattern provides a surrogate ...
Information Expert is the GRAS Patterns (General Responsibility Assignment Software Pattern) Read about GRASP Patterns: GRASP Patterns Overview Problem What is a general principle of assigning responsibilities to objects? A Design Model may define hundreds or thousands of software classes, and an application may require hundreds or thousands of responsibilities to be fulfilled. During object design, when the interactions between objects are defined, we make choices about the assignment of responsibilities to software classes. Done well, systems tend to be easier to understand, maintain, and extend, and there is more opportunity to reuse components in future applications. Solution Assign a responsibility to the information expert - the class that has the information necessary to fulfill the responsibility. Example Let's consider Point of Sale (POS) application: a Brief overview of POS application. Application for a shop, restaurant, etc. that registers sales. Each...
Comments
Post a Comment