Atitit. Several rules, laws, and principles of software development principle V3

Source: Internet
Author: User

Atitit. Several rules, laws, and principles of software development principle V3


1.1. Revision History 2
2. Design pattern Six Principles 2
2.1. Design pattern Six principles (1): Single Duty Principle 2
2.2. Design pattern Six Principles (2): Richter Replacement Principle 2
2.3. Design pattern Six Principles (3): Dependency Inversion Principle 2
2.4. Design pattern Six principles (4): interface Isolation principle 2
2.5. Design pattern Six principles (5): Dimitri Law 2
2.6. Design pattern Six principles (6): Open and Close principle 2
3. S.O.L.I.D principles (oo FP) 3
3.1. Single Responsibility Principle (SRP) – Sole responsibility Principle 3
3.2. Open/closed Principle (OCP) – Open/Closed principle 3
3.3. Liskov substitution principle (LSP) – The Richter substitution principle 3
3.4. Interface segregation Principle (ISP) – Interface Isolation principle 3
3.5. Dependency inversion Principle (DIP) – Dependency inversion principle 3
4. Dky Law Dry Kiss Yagni3
5. Other Principles 4
5.1. Readability Priority principle 4
5.2. Embracing the principle of change expansion 4
5.3.: Dimitri Law Minimum Knowledge principle "(Principle of Least knowledge) 4
5.4. Dimitri law (Law?ofdemeter,? LOD) 4
5.5. Don ' t Repeat yourself (DRY) 4
5.6. Keep It Simple, Stupid (KISS) 4
5.7. Program to a interface, not a implementation4
5.8. You Ain ' t gonna need It (YAGNI) 4
5.9. The least surprising principle follows the standard convention note what code to do 5
5.10. Minimum coupling principle and maximum cohesion 5
5.11. Hide the Implementation details Principle 5
5.12. Avoiding Premature Optimization Principles 5
5.13. The laws of the Artemis 5
5.14. Common Closure Principle (CCP) – Common closure principle 5
5.15. Common Reuse Principle (CRP) – Principle of common reuse 5
5.16. Hollywood principle– Hollywood principles 5
5.17. High Cohesion & low/loose coupling &– cohesion poly, low coupling 6
5.18. Convention over Configuration (CoC) – Formula superior to Configuration principle practice Precedence Principle 6
5.19. Acyclic Dependencies Principle (ADP) – no-ring dependency Principle 6
5.20. Postel's Law Bostalfa back compatibility design 6
5.21. Software, like all technologies, has a natural political nature. The code will inevitably reflect the author's choices, prejudices, and expectations. 6
5.22. First for human design, followed by machine design. 6
5.23. Abstract Principle 6
6. The Code of programming 21 article 6
7. Recy7
7.1. Command-query Separation (CQS) – command-query separation principle 7
7.2. Separation of Concerns (SoC) – Separation of concerns 7
7.3. Design by Contract (DbC) – Contractual design 7
8. Reference 7










1.1. Revision history
V3 adjustment column. The Add Dky rule adds some principles and removes some patterns into the Recy
2. Six Principles of design pattern
2.1. Design pattern Six principles (1): Single Responsibility Principle
2.2. Six principles of Design pattern (2): The principle of the Richter scale replacement
2.3. Design pattern Six Principles (3): dependency inversion principle
2.4. Design pattern Six principles (4): interface Isolation principle
2.5. Design pattern Six principles (5): Dimitri Law
Minimum knowledge principle "(Principle of Least knowledge)
  
2.6. Design pattern Six principles (6): Open and close principle
  
  
Author:: Old Wow's paw attilax Ayron, email:[email protected]
Reprint please indicate source: http://www.cnblogs.com/attilax/




3.S.O.L.I.D principles (oo fp)
In general, this is the five-object-oriented design principles, but I think these principles can be applied to all software development.
3.1.Single Responsibility Principle (SRP) – Single principle of responsibility
3.2.open/closed Principle (OCP) – Opening and closing principle
3.3.Liskov substitution principle (LSP) – The principle of substitution on the Richter scale
3.4.Interface segregation Principle (ISP) – Interface Isolation principle
3.5.Dependency inversion Principle (DIP) – dependency inversion principle
4.Dky Law Dry Kiss Yagni


5.Other principle
5.1. Readability Priority principle
The code should be as easy to read and understand as possible
5.2. Embracing the principle of change extensibility
This is the subtitle of a book written by Kent Beck, and is also considered the principle of extreme programming and general agile methods. Many other principles are based on the idea that you should expect and welcome change. In fact, many ancient software engineering laws, such as the principle of minimizing coupling, are directly related to making the code easier to change. Whether you are an extreme programmer or not, this method of writing code is really meaningful.


5.3.: Dimitri Law Minimum Knowledge principle "(Principle of Least knowledge)
5. Synthesis/polymerization multiplexing principle (composite/aggregate reuse Principle,carp)
Use some existing objects in a new object to make them part of the new object; The new object is used to reuse the existing functionality through the delegation of these objects. This design principle has another brief statement: To use composition/aggregation as much as possible, and not to use inheritance.
5.4. Dimitri law (Law?ofdemeter,? LOD)
5.5.Don ' t Repeat yourself (DRY)
5.6.Keep It Simple, Stupid (KISS)
5.7.Program to a interface, not an implementation
5.8.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.
5.9. The least surprising principle follows the standard convention note what the code does.
5.10. Minimizing coupling principle and maximum cohesion
5.11. Hide the implementation details principle
5.12. Avoid premature optimization principles
5.13. The law of the inked ear
Code components should communicate only with their direct relationships (e.g., inherited classes, contained objects, objects passed by parameters, etc.)


5.14.Common Closure Principle (CCP) – Common closure principle
5.15.Common Reuse Principle (CRP) – Principle of common reuse
5.16.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 code, the object is not directly related to the service, but rather the container is responsible for linking the objects together.
5.17.High Cohesion & low/loose coupling &– cohesion poly, low coupling
5.18.Convention over Configuration (CoC) – formula is better than configuration principle practice precedence principle
5.19.Acyclic Dependencies Principle (ADP) – no-ring dependency principle
5.20.Postel ' s Law Bostalfa is designed for back compatibility
Bostalfa (Postel's law) is particularly suitable for:
Be conservative in what do you send, being liberal in what do you accept.
Be conservative when sending, open when receiving.


5.21. Software, like all technologies, has a natural political nature. The code will inevitably reflect the author's choices, prejudices, and expectations.
5.22. First for human design, followed by machine design.
Easy for users to understand more important. Compared to machine understanding (parsing)
5.23. Abstract principles
6.21 rules of the Code of programming
21 rules of the Code of programming
7.Recy


7.1.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;
7.2.Separation of Concerns (SoC) – Separation of concerns
7.3.Design by Contract (DbC)-Contract design


8. 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


18 great rules for good programmers-programmers-it home. htm


Author:: Nickname: Old wow Claws claw of Eagle idol iconoclast Image-smasher
Bird King "Bird?" Catcher King of Kings of Kings devout pious religious defenders defender?of?the? Faith. Caracalla red cloak Caracalla Red cloak
Abbreviation:: Emir attilax? Akbar Emile Atiraca
Full name:: Emir attilax akbar?bin Mahmud bin Attila bin Solomon bin Adam Al? Rapanui?
Emile Atilax Akbaben Mahmud Attilaben Solomon Ben Adam? Al Rapa Nui??
Common name: Etila (Ayron),?? Email:[email protected]




Title: Head of Uke headquarters, founder of Global Grid project,
Uke, Minister of Religious and Cultural Integration Affairs, Vice-Chairman of the Uke Reformation Commission
, the chief grand Chief of the Uke tribe,
Uke system and chairman of the major conference committee, Uke Security Department Chief Brigade, Uke System Inspection Committee vice President,
CTO of Dairy Technology, chief CTO of Uke
Uke Polynesia District chain head, Kerr Glenn Islands district chain head, Line Is. district chain head, uke Tonga Kingdom regional head. Bouvet and South Georgia and South Sandwich Is. regional chain head
Uke, chairman of the Association of Software Standardization Uke, vice President of lifelong Education School
Uke, vice president of the Association of Database and Storage standardization, editor of Uke Publishing house
Founder of Uke Hospital


Reprint please indicate source: Attilax's column? http://www.cnblogs.com/attilax/
--atiend

Atitit. Several rules, laws, and principles of software development principle V3

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.