[GOF95] is the first book on the software model and the most popular book on OO Design theory. Therefore, some people often use Design Pattern) the term "1" refers to any kind of pattern that directly processes the architecture, design, and program implementation of the software. Others stress that three different layers of patterns should be divided: Architectural Pattern, Design Pattern, and Idiom ). Examples are sometimes called the Coding Pattern ).
The difference between the three lies in that the three different modes exist in their respective abstract levels and specific levels. The architecture model is a high-level system strategy involving large-scale components, as well as the overall nature and mechanics. The quality of the architecture model can affect the overall layout and framework structure. The design pattern is a medium-scale structure strategy. These medium-sized structures implement the behavior of some large-scale components and their relationships. The quality of the model does not affect the overall layout and overall framework of the system. The Design Pattern Defines the microstructure of a subsystem or component. Code patterns (or examples) are specific examples and programming skills related to specific languages. The quality of the code pattern affects the underlying details of the internal and external structures or behaviors of a medium-scale component, but does not affect the medium-scale structure of a component or subsystem, it will not affect the overall layout of the system and the large-scale framework.
Code mode or example(Coding Pattern or Idiom)
Code patterns (or examples) are low-level patterns that are closely related to programming languages. The code mode describes how to use the characteristics of a specific programming language to implement certain specific aspects or relationships of a component.
Examples of well-known code modes include the Double-Check Locking mode.
Design Mode(Design Pattern)
A Design Pattern provides an outline design that extracts components in subsystems or software systems, or links between them. Design Patterns describe the ubiquitous repeated structures in the communication components. This structure solves general design problems in a certain background.
Design Patterns are often divided into different types, common types include:
Creation design patterns, such as Factory Method, Abstract Factory, Prototype, Singleton, and Builder) mode
Structural design patterns, such as Composite, Decorator, Proxy, Flyweight, Facade, and Bridge) mode
Behavior mode, such as Template Method mode, Observer mode, iteration subator mode, Chain of Responsibility mode, and Memento) mode, Command mode, State mode, Visitor mode, and so on.
The above are three classic types. There are actually many other types, such as Fundamental, Partition, and Relation.
When the design pattern is implemented in a specific programming language, the code pattern is often used. For example, the Singleton mode usually involves the Double-Check Locking mode.
Architecture Mode(Invalid tural Pattern)
An architecture model describes the basic structure organization or outline of a software system. The architecture model provides subsystems defined in advance, specifying their responsibilities, and providing rules and guidelines for organizing them together. Some authors call this architecture model the system model [STELTING02].
An architecture pattern can often be divided into multiple design patterns for joint use. Obviously, the MVC mode belongs to this mode. The MVC pattern usually includes the Mediator Pattern, Strategy pattern, Composite pattern, and Observer pattern.
In addition, common architecture models include:
· Layers (layered) mode, also known as Tiers Mode
· Blackboard Mode
· Broker (intermediary) Mode
· Distributed Process mode
· Microkernel (Microkernel) Mode
Architecture models are often divided into the following types:
1. From Mud to Structure. Helps architects divide the system reasonably to avoid forming A sea of objects ). Includes Layers, Blackboard, and Pipes/Filters.
Ii. Distributed Systems. Provides a complete architecture design for distributed systems, including Broker (intermediary) models.
3. Interactive Systems, supporting architecture design of Systems with human-computer interaction interfaces, examples include Model-View-Controller) mode, PAC (Presentation-extract action-Control) mode, and so on.
4. Adaptable Systems: supports application Systems to adapt to changes in technology and software functional requirements. Such as Reflection mode and Microkernel mode.