Discover object oriented design and patterns 2nd edition, include the articles, news, trends, analysis and practical advice about object oriented design and patterns 2nd edition on alibabacloud.com
in the use of object-oriented thinking system design, the predecessors summed up a total of 7 principles, respectively, are:
Single duty principle, open and close principle, Richter replacement principle, Dependency injection principle, interface separation principle, Dimitri principle and priority use combination rather than inheritance principle.
Object-oriented design is mainly about the concept of design, software architecture, system design, detailed design, application design mode, user interface
Object-oriented analysis is a process of acquiring and understanding user's needs, analyzing the problem domain, confirming and establishing the conceptual model of problem area. and object-oriented design (OOD) is from the perspective of computer technology, the analysis of
1 OO design principlesThe use of object-oriented analysis and design ideas, for us to analyze and solve problems to provide a new way of thinking. After we get the demand (omit Ooa, complete later), the next question is: How to object-or
Experience Sharing: PHP object-oriented analysis design principles. Arthur URJ. Riel once said that you do not have to strictly abide by these principles and violate them and will not be punished by religion. However, you should regard these principles as warning bells. if you violate one of them, Arthur J. Riel once said that you do not have to strictly abide by
One1, the core of object-oriented thinking: Encapsulation, inheritance, polymorphism.2, the pursuit of object-oriented programming:Cohesion-poly low-coupling solution;Modular design of the code;3, what is the design mode:The clas
It seems that all design patterns are designed so that the program has low coupling, high flexibility, good expansibility, clear program structure and so on. Today's design pattern-the observer pattern is no exception, but the clarity of the program structure may not be the point. Well, the nonsense is less, the pattern of this simple and rude things still have t
sometimes referred to as static factories. In order to select the implementation, you can also configure the selected parts to the configuration file. Public InterfaceProduct { Public voidmakeproduct ();} Public classConcreteproductImplementsProduct {@Override Public voidmakeproduct () {//TODO auto-generated Method StubSystem.out.println ("Made in China"); }} Public classFactory { Public StaticProduct makeproduct () {Properties Pro=NewProperties (); InputStream in=NULL; Try{ in= Factory.class.
Object-oriented design is a very important part of PHP program development, if you want to be a senior PHP programmer, we must know the specific usage and wording of object-oriented design.
Maintaining a simple modularity is a fe
Php object-oriented programming design patterns-basic principles of object-oriented programming in tianxintian22:
Single responsibility: one class, only one thing needs to be done
Open and closed: a class should be extensible,
clause 32: Make sure your pubilc inherits the is-a relationship of plastic mold
Make sure public inheritance models "Is-a"
one of the most important rules for –c++ (OOP) object-oriented programming is that public inheritance (open inheritance) means "is-a" (a) relationship.
– If you make class D ("derived") Inherit class B ("Base") as public, you tell the compiler that each
61 empirical principles of Object-Oriented Design
Excerpted from the log of OOD, translated by BaO zhiyun, Arthur J. Riel
"You do not have to strictly abide by these principles and violate them and are not subject to religious penalties. But you should regard these principles as warning bells. If you violate one of them, the warning bells wi
In Ood (object-oriented design), abstract classes or interfaces are often used, "note: in C + +, there is no concept of interfaces, only abstract classes, and both exist in Java." In the process of use, there may be many people think that the interface and abstract class is similar, and then think of course that can be completely replaced with each other. In fact
derived class. p103(53) Do not confuse the optional inclusion with the need for inheritance. Modeling an optional inclusion into a class where inheritance can lead to flooding. p108(54) When creating an inheritance hierarchy, try creating a reusable framework, rather than a reusable component. p112(55) If you use multiple inheritance in your design, let's say you made a mistake. If you don't make a mistake, you need to try to prove it. P120(56) If yo
Arthur J.riel once said that you do not have to strictly abide by these principles and will not be sentenced to religious punishment for violating them. But you should think of these principles as alarms, and if you violate one of them, the alarm will ring. So, whatever we do, we have to have a principle. Programming is no exception, the following describes
PHPThe principle of object-oriented analysis
61 empirical principles of Object-Oriented Design
Author: Arthur J. Riel
"You do not have to strictly abide by these principles and violate them and are not subject to religious penalties. But you should regard these principles as warning bells. If you violate one of them, the warning bells will ring ."
---------- Arthur J. Riel
(1) All data should be hidden i
in object-oriented design, ask yourself two questions: (1) is the derived class A special type of the thing it inherits from? (2) is the base class part of a derived class?(57) If you find multiple inheritance relationships in an object-oriented
61 military rules of PHP object-oriented analysis design. (1) all data should be hidden inside the class. (2) a class user must depend on the common interfaces of the class, but the class cannot depend on its users. (3) minimize the elimination in the class protocol (1) all data should be hidden inside the class.
(2) a class user must depend on the common interfa
inheritance in the design, first assume that you have made a mistake. If you do not make a mistake, try to prove it.
(56) as long as inheritance is used in object-oriented design, I have two questions: (1) is the derived class a special type of the thing it inherits? (2) is the base class part of the derived class?
(5
61 empirical principles of Object-Oriented Design
Excerpted from the good revelation-Arthur J. Riel
(1)All data should be hidden inside the class. P13
(2)The class user must be dependent on the common interfaces of the class, but the class cannot depend on its users. P15
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.