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

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.

主站蜘蛛池模板: 葫芦岛市| 昭通市| 闸北区| 龙里县| 二连浩特市| 六盘水市| 乐清市| 商城县| 九龙城区| 时尚| 琼结县| 安宁市| 罗定市| 漳浦县| 台中市| 确山县| 平武县| 宜黄县| 曲麻莱县| 河北省| 安岳县| 隆安县| 清镇市| 伊通| 广昌县| 遂溪县| 大姚县| 紫阳县| 石渠县| 宣武区| 寻甸| 镇安县| 松桃| 福安市| 阿拉善左旗| 河东区| 刚察县| 建始县| 体育| 合川市| 孟津县|