- Spring 5 Design Patterns
- Dinesh Rajput
- 403字
- 2021-07-08 09:59:30
Common GoF Design Pattern overview
The authors Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides are often referred to as the GoF, or Gang of Four. They published a book titled Design Patterns: Elements of Reusable Object-Oriented Software, which initiated the concept of design patterns in software development.
In this chapter, you will learn what GOF patterns are and how they help solve common problems encountered in object-oriented design.
The Gang of Four (GoF) patterns are 23 classic software design patterns providing recurring solutions to common problems in software design. The patterns are defined in the book Design Patterns: Elements of Reusable Object-Oriented Software. These patterns are categorized into two main categories:
- Core Design Patterns
- J2EE Design Patterns
Furthermore, Core Design Patterns are also subdivided into three main categories of design pattern, as follows:
- Creational Design Pattern: Patterns under this category provide a way to construct objects when constructors will not serve your purpose. The creation logic of objects is hidden. The programs based on these patterns are more flexible in deciding object creation according to your demands and your use cases for the application.
- Structural Design Pattern: Patterns under this category deal with the composition of classes or objects. In the enterprise application, there are two commonly used techniques for reusing functionality in object-oriented systems: one is class Inheritance and the other is the Object Composition Concept of inheritance. The Object Composition Concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionalities.
- Behavioral Design Pattern: Patterns under this category, characterize the ways in which classes or objects interact and distribute responsibility. These design patterns are specifically concerned with communication between objects. The behavioral design pattern is used to control and reduce complicated application flow in the enterprise application.
Now, let's look at the other category, the JEE Design patterns. This is the other main category of design patterns. Application design can be immensely simplified by applying Java EE design patterns. Java EE design patterns have been documented in Sun's Java Blueprints. These Java EE Design patterns provide time-tested solution guidelines and best practices for object interaction in the different layers of a Java EE application. These design patterns are specifically concerned with the following listed layers:
- Design pattern at the presentation layer
- Design pattern at the business layer
- Design pattern at the integration layer
Let's explore creational design patterns in the upcoming section.
- Kubernetes實戰
- PyTorch Artificial Intelligence Fundamentals
- 數據結構簡明教程(第2版)微課版
- Scratch 3.0少兒編程與邏輯思維訓練
- C語言程序設計案例精粹
- Hands-On Automation Testing with Java for Beginners
- ASP.NET程序設計教程
- Protocol-Oriented Programming with Swift
- Test-Driven Development with Django
- Mastering JavaScript
- 一步一步學Spring Boot:微服務項目實戰(第2版)
- Python程序設計:基礎與實踐
- R語言:邁向大數據之路
- Java Web 從入門到項目實踐(超值版)
- C語言程序設計實驗指導教程