Atitit. Several rules, laws, and principles of software development ... Attilax Summary

Source: Internet
Author: User

Atitit. software development of several major rules, laws, and principles ...

1. Design Pattern Six Principles 2

1.1. Design pattern Six principles (1): Single Duty Principle 2

1.2. Design pattern six Principles (2): Richter Replacement Principle 2

1.3. Design pattern Six Principles (3): Dependency Inversion Principle 2

1.4. Design pattern Six principles (4): interface Isolation principle 2

1.5. Design pattern Six principles (5): Dimitri Law 2

1.6. Design pattern Six principles (6): Open and Close principle 2

2. Object-oriented S.O.L.I.D principles 2

2.1. Single Responsibility Principle (SRP)– Sole responsibility Principle 3

2.2. Open/closed Principle (OCP)– Open/Closed principle 3

2.3. Liskov substitution principle (LSP)– the Richter substitution principle 3

2.4. Interface segregation Principle (ISP)– Interface Isolation principle 3

2.5. Dependency inversion Principle (DIP)– dependency inversion principle 3

3. Other principles 3

3.1. Don't Repeat yourself (DRY) 4

3.2. Keep It Simple, Stupid (KISS) 4

3.3. Program to a interface, not a implementation 4

3.4. Command-query separation (CQS)– command - Query separation principle 4

3.5. You Ain't gonna need It (YAGNI) 4

3.6. Common Closure Principle(CCP) – Common closure principle 4

3.7. Common Reuse Principle (CRP)– Principle of common reuse 4

3.8. Hollywood Principle– Hollywood principle 4

3.9. Hi Cohesion & low/loose Coupling & – High cohesion, low coupling 5

3.10. Convention over Configuration(CoC) – formula better than configuration principle 5

3.11. Separation of concerns (SoC)– Separation of concerns 5

3.12. Design by Contract (DbC)– contractual design 5

3.13. Acyclic Dependencies Principle (ADP)– no-ring dependency principle 5

4. Reference 5

1.Six principles of design pattern1.1.Six principles of Design pattern (1): Single Duty principle1.2.Six principles of Design pattern (2): The principle of the Richter replacement1.3.Six principles of Design pattern (3): dependency inversion principle1.4.Design Pattern Six principles (4): interface Isolation principle1.5.Six principles of Design pattern (5): Dimitri Law

Minimum knowledge principle "(Principle of Least knowledge)

1.6.Six principles of Design pattern (6): Opening and closing principle

Author:: Old Wow's paw attilax Ayron, email:[email protected]

Reprint please indicate source: Http://blog.csdn.net/attilax

2. Object-oriented S.O.L.I.D principles

In general, this is the five-object-oriented design principles, but I think these principles can be applied to all software development.

2.1. Single Responsibility Principle (SRP)– Single principle of responsibility2.2. Open/closed Principle (OCP)– Opening and closing principle2.3. Liskov substitution principle (LSP)– The principle of the Richter substitution2.4. Interface segregation Principle (ISP)– Interface Isolation principle2.5. Dependency inversion Principle (DIP)– Dependency Inversion principle

3. OtherPrinciples

5. Synthesis / polymerization multiplexing principle (composite/aggregate reuse Principle,carp)
Use some existing objects inside a new object to make it part of the new object ; new objects are used to reuse existing functionality through the delegation of these objects to the object . This design principle has another brief statement. : to use compositing as much as possible / Aggregation , try not to use inheritance .

3.1. Don'T Repeat yourself (DRY)3.2. Keep It Simple, Stupid (KISS) 3.3. Program to a interface, not an implementation3.4. Command-query Separation (CQS)– Command-Query Separation principle

Query: When a method returns a value to respond to a problem, it has the nature of the query;
Command: When a method is to change the state of an object, it has the nature of the command;

3.5. You Ain't gonna need It (YAGNI)

This principle, in short, is to consider and design only the necessary functions to avoid over-design. Just implement the features you currently need, and you can add them later when you need more features.

3.6. Common Closure Principle(CCP) – Common closure principle3.7. Common Reuse Principle (CRP)– Principle of common reuse3.8. Hollywood Principle– Hollywood Principles

The Hollywood principle is a word-"don ' t call Us,we ' ll called you." It means that Hollywood brokers don't want you to contact them, but they will contact you when they need them. In other words, all components are passive, and all component initialization and invocation is the responsibility of the container. The component is in a container and is managed by the container.

In the case of a single, it is the relationship between the container control program, rather than the traditional implementation, directly manipulated by the program code. This is the concept of the so-called "inversion of Control":

· 1. Do not create objects, but rather describe how objects are created.

· 2. In the code, the object is not directly related to the service, but rather the container is responsible for linking the objects together.

3.9. High Cohesion & Low/loose coupling &– High cohesion, low coupling3.10. Convention over Configuration(CoC) – The Convention is better than the configuration principle3.11. Separation of concerns (SoC)– Point of concern separation3.12. Design by contract (DbC)– Contractual design3.13. Acyclic Dependencies Principle (ADP)– Non-cyclic reliance principle4. Reference

The seven principles of software design -on the-the- Blog Park . html

Some software design principles - blog - bó lè online . html

Some software design principles - blog - bó lè online . html

Atitit. Several rules, laws, and principles of software development ... Attilax Summary

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.