Types of patterns of software architecture and design patterns

Source: Internet
Author: User
Tags reflection

a well-written and concise article. Transferred from: http://dev.yesky.com/378/2012378.shtml

Because [GOF95] is the first of a book on software patterns and is one of the most popular books in oo design theory, some people often use the term design pattern to refer to any type of schema, design, or program implementation that directly deals with software. Others emphasize the partitioning of three different levels of patterns: architectural patterns (architectural pattern), design patterns, precedent (IDIOM). Precedent is sometimes called Code pattern (Coding pattern).
The difference between the three is that three different patterns exist in their respective levels of abstraction and specificity. The architecture pattern is a high-level strategy of a system, involving large-scale components as well as the overall nature and mechanics. The architectural pattern can affect the overall layout and framework structure. Design patterns are medium-scale structural strategies. These medium-scale 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. A design pattern defines the microscopic structure of a subsystem or component. Code patterns (or precedent) are specific examples and language-specific programming techniques. The quality of the code pattern affects the underlying details of the internal and external structure or behavior of a medium-scale component, but does not affect the medium-sized structure of a part or subsystem, and does not affect the overall layout of the system and the large-scale framework.

   code mode or precedent(Coding Pattern or Idiom)

Code patterns (or precedent) are lower-level patterns and are closely related to programming languages. Code patterns describe how to use the characteristics of a particular programming language to implement specific aspects or relationships of a component.

Examples of the more famous code patterns include double check lock (double-check Locking) mode, and so on.

   Design Patterns(Design Pattern)

A design pattern provides an outline design that refines the components of a subsystem or software system, or the relationship between them. The design pattern describes a ubiquitous structure that repeats itself in a communication component that solves a general design problem in a given background.

Design patterns are often divided into different types, common types are:

Create design patterns such as factory methods (Factory method) mode, abstract Factory mode, prototype (Prototype) mode, singleton (Singleton) mode, construction (builder) mode, etc.

Structural design patterns, such as composition (Composite) mode, decoration (Decorator) mode, proxy mode, enjoy meta (Flyweight) mode, façade (facade) mode, bridge mode, etc.

Behavioral patterns, such as template method mode, observer (Observer) mode, Iteration sub (Iterator) mode, responsibility Chain (Chain of Responsibility) mode, Memo (Memento) mode, command ( Command) mode, state mode, visitor (Visitor) mode, and so on.
These are three classic types, in fact there are many other types, such as fundamental type, partition type, relation type, etc.

When design patterns are implemented in a particular programming language, code patterns are often used. For example, the implementation of the Singleton (Singleton) mode often involves a double-check lock (double-check Locking) mode.

   Schema Mode(Architectural Pattern)

An architectural pattern describes the basic structural organization or outline of a software system. The schema pattern provides some pre-defined subsystems, assigns their responsibilities, and gives the rules and guidelines for organizing them together. Some authors call this architectural pattern a system pattern [STELTING02].

An architectural pattern can often be decomposed into a combination of many design patterns. Obviously, the MVC pattern is part of this pattern. The MVC pattern often includes the mediator (mediator) pattern, the Strategy (strategy) pattern, the composition (Composite) pattern, the Observer (Observer) pattern, and so on.

In addition, the common architectural patterns are:

· Layers (layered) mode, sometimes also called tiers mode

· Blackboard (blackboard) mode

· Broker (Mediation) mode

· Distributed Process (dispersion) mode

· Microkernel (micro Core) mode

Architectural patterns are often divided into the following categories:

First, from MUD to structure type. Help architects divide the system to avoid forming an ocean of objects (a sea of objects). Includes layers (layered) mode, Blackboard (blackboard) mode, pipes/filters (pipe/filter) mode, and so on.

Second, the dispersion system (distributed systems) type. Provides a complete architectural design for decentralized systems, including broker-like (mediation) mode.

Third, human-machine interaction (Interactive systems), supporting the architecture design of systems with interactive interfaces, examples include MVC (model-view-controller) mode, PAC (presentation-abstraction- Control) mode, and so on.

Four, adaptable systems, support the application system to adapt to the change of technology, software functional requirements change. such as reflection (reflection) mode, microkernel (micro-core) mode.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.