Click “like” to see, form a habit, wechat search [dime technology] pay attention to more original technical articles. This article has been included in GitHub org_Hejianhui /JavaStudy.

  1. Factory Method: Defines an interface for creating objects, but it is up to subclasses to decide which class to instantiate. The factory method delays the instantiation of subclasses

Keywords: dynamic production object

  1. Abstract Factory pattern: Provides an interface to create a series of related or interdependent objects without specifying their concrete classes

Shorthand keywords: production into a series of objects

  1. Builder pattern: Separate the representation of a complex class from its construction so that the same construction process can produce different representations

Shorthand keywords: complex object construction

  1. Prototype pattern: Use a Prototype instance to specify the type of object to create, and copy the Prototype to create a new object

Shorthand keywords: clone object

  1. Singleton: Guarantees that a class has only one instance and provides a global access point to it

Shorthand keywords: single instance

  1. Adapter pattern: Converts the interface of a class into another interface that the user expects. It enables otherwise incompatible interfaces to work together

Shorthand keywords: conversion interface

  1. Bridge pattern: Separates the abstract part of a class from its implementation so that they can vary independently

Shorthand keywords: inheritance tree split

  1. Composite: Objects are grouped into a tree structure to represent a whole-part hierarchy, making the use of individual objects and Composite objects consistent

Shorthand keywords: tree directory structure

  1. Decorator: Dynamically add some additional responsibilities to an object. It provides a flexible alternative to extending functionality with subclasses, more flexible than deriving a subclass

Keywords: dynamic additional responsibility

  1. Facade: Defines a high-level interface that provides a consistent look and feel for a set of interfaces in a subsystem, simplifying the use of that subsystem

Shorthand keywords: external unified interface

  1. Flyweight pattern: Provides an efficient way to support the sharing of large numbers of fine-grained objects

Shorthand keywords: Chinese coding

  1. Proxy – Structural: Provides a Proxy for other objects to control access to this object

Shorthand keywords: shortcut

  1. Chain of Responsibility pattern: Reduces coupling between the sender and receiver of a request by giving multiple objects the opportunity to process the request. The receiving objects are linked together, passing the request through the chain until an object handles the request

Key words in shorthand: transfer responsibility

  1. Command: Encapsulates a request as an object that can parameterize customers with different requests, queue or log requests, and support undoable operations

Shorthand keywords: logging, revocable

  1. Interpreter pattern: Given a language, define its grammatical representation and define an Interpreter that interprets sentences in the language according to the grammatical representation

Shorthand keywords: virtual machine mechanism

  1. Iterator pattern: Provides a way to access elements of an aggregate object sequentially without exposing the internal representation of the object

Shorthand keywords: data set

  1. Mediator – Behavior: Encapsulates a series of object interactions with a Mediator object. It enables objects to achieve low coupling without explicitly calling each other, and can independently change the interaction between objects

Shorthand key words: not directly quoted

  1. Memento: Capture the internal state of an object and store the state outside of the object, without breaking encapsulation, so that the object can be restored to its original state at a later time

Shorthand keywords: game archive

  1. **Observer: Defines a one-to-many dependency between objects. When an object’s state changes, all dependent objects are notified and updated automatically

Shorthand key words: linkage

  1. State mode: Allows an object to change its behavior when its internal State changes

A state becomes a class

  1. Strategy: Define a series of algorithms, encapsulate them one by one, and make them interchangeable so that the algorithm can change independently of the users who use it

Key words: multi – scheme switching

  1. Template Method pattern: Defines the skeleton of an algorithm in an operation, while deferring some steps to subclasses so that subclasses can redefine specific steps of an algorithm without changing the structure of an algorithm

Key words: frame

  1. Visitor pattern: Represents an operation that acts on elements in an object structure, allowing new operations to be defined on those elements without changing their classes

Key words: data and operation separation

GitHub Org_Hejianhui /JavaStudy