Learn about solid principles of object oriented design, we have the largest and most updated solid principles of object oriented design information on alibabacloud.com
S.O.L.I.D is the acronym for several important coding principles (programming Priciple) in object-oriented design and programming (Oodoop).
SRP
the single Responsibility principle
single responsibility principle
OCP
the Open Closed principle
First Lecture: 1. Object-oriented design patterns and principles Introduction to Design Patterns: Each pattern describes a problem that recurs around us, and the core of the solution to the problem.--christopher alexander{Architect} Software designers ' understanding of the
S.O.L.I.D is the acronym for several important coding principles (programming Priciple) in object-oriented design and programming (Oodoop).
SRP
the single Responsibility principle
single responsibility principle
OCP
the Open Closed principle
S.O.L.I.D is the acronym for several important coding principles (programming Priciple) in object-oriented design and programming (Oodoop).
SRP
the single Responsibility principle
single responsibility principle
OCP
the Open Closed principle
representation of the same change implies that it is a specific subclass in the same inheritance hierarchy.② package different changes into different interfaces or abstract classes, there should not be two different changes appearing on the same interface or abstract class. A change mixed with another change would violate the principle of singleness and therefore should be separated.6.4 Best Practices(1) Summary of several design
Introduction to the six principles of object-oriented design and six major object-oriented design
In fact, they all complement each other. That is to say, some
: This article mainly introduces (5) Object-Oriented Design Principles 1 --- general principles and single responsibility principles. if you are interested in PHP tutorials, refer to them. I. general
In object-oriented design, how to deal with changes in design requirements through small changes is a matter of great concern to designers. To this end, many oo pioneers have proposed many object-oriented
Seven major object-oriented design principles (Transition) and seven major design principles
I. Single responsibility principle:
Full name: "Single-Responsibility Principle"
Object-
Seven main object-oriented design principles
Opening and closing principles : In the face of demand, changes to the program is done by adding new code , rather than changing the original title
dependency Reversal Principle : High-level modules should not rely on the underl
package, it will affect all classes in the package, but it will not affect other packages.
Package coupling principle
No-ring dependency principle (Acyclic Dependencies Principle, ADP)
The package dependency does not allow loops.
Stable-Dependencies Principle, SDP)
Dependency in a stable direction
Stable-abstractions principle (SAP)
The abstraction level of the package should be consistent with its stability.
Old ti
I. Design Principles1. Dependency inversion principle (DIP)
High-level modules (stability) should not depend on low-level modules (changes), both of which should depend on abstraction.Abstract (stable) should not depend on implementation details (changes), and implementation details should depend on abstraction.
2. Open and closed principle (OCP)
Class modules should be extensible, but cannot be modified; open to extensions and closed to changes
project, the organization defines
The name of the class, you need to follow certain rules, preferably with the class name as the center, or you can add a uniform prefix or suffix shape
into filenames, such as xxx_classname.php, classname_xxx.php, and classname.php, and so on.
This example attempts to load the MyClass1 and MyClass2 classes from the myclass1.php and myclass2.php files, respectively
Code Snippets
Copy the Code code as follows:
function __autoload ($classname) {Require_once $c
doesn't answer the fundamental object-oriented question-Why do we use object-oriented objects. How should we use the three mechanisms to achieve "good object-oriented". What kind of object
Object-oriented design principles are at the heart of oops programming, but most of the Java programmers I've seen are enthusiastic about design patterns like Singleton (singleton), Decorator (adorner), OBSERVER (Observer), Instead of focusing enough attention on learning
Object-oriented design principles are at the heart of oops programming, but most of the Java programmers I've seen are enthusiastic about design patterns like Singleton (singleton), Decorator (adorner), OBSERVER (Observer), Instead of focusing enough attention on learning
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.