官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 永春县| 海盐县| 四川省| 平阳县| 南通市| 隆尧县| 搜索| 南溪县| 建宁县| 偏关县| 南江县| 呼图壁县| 双桥区| 无棣县| 辛集市| 石门县| 抚宁县| 广南县| 丹阳市| 达州市| 枣强县| 武汉市| 甘肃省| 泰兴市| 马山县| 秀山| 上林县| 江达县| 体育| 克什克腾旗| 灵台县| 克什克腾旗| 喀喇沁旗| 进贤县| 横峰县| 鲁山县| 赤壁市| 广州市| 信宜市| 昌邑市| 饶河县|