Alibabacloud.com offers a wide variety of articles about best object oriented design book, easily find your best object oriented design book information here online.
For the design of object-oriented software systems, improving system reusability while supporting maintainability is a crucial issue, how to Improve the maintainability and reusability of a software system at the same time is one of the core issues that need to be addressed in object-
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
In the previous article, we talked about the design patterns. Next, let's talk about some of the principles we often follow in object-oriented design. These principles are the result of numerous previous experiences. Only by following these principles can you involve excellent code. Today we will talk about seven princ
) relationship, which indicates that class B is affected if Class A is modified. Two or five principles of design
"The Five Principles of object-oriented design" and the role of the principle of benign dependence in coping with change.
Single Responsibility principle (Single-resposibility Principle). "There should be
Why Study Design Patterns:1, more in-depth understanding of object-oriented thinking2, is conducive to the development of a strong extension of things What is a design pattern: a typical solution for a typical scenario that often occurs is the design pattern. For example,
, the constructor pattern is used to define instance properties (each instance itself is unique, not shared), whereas the prototype pattern is used to define methods and shared properties.6.2.5 Dynamic Prototyping ModeAll information is encapsulated in the constructor, and the prototype is initialized in the constructor function.function Person (name, age, Job) { this. Name = name; this. Age = Age ; this. Job = job; if (typeofthis. Sayname! = "Functin") {// in the case that the Sayna
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
take a look at it in detail.2. Ask yourself, does UML make sense to you? Does it help you analyze and model the system?
I want to learn more or less about UML. In short, UML is a language used for modeling. You can simply understand it as a drawing tool, some elements are defined to express different concepts. Here we are concerned with UML class diagrams, which are used for object-oriented structure model
of thing is rare on the Internet and rarely written. Let's take a look at it in detail.2. Ask yourself, does UML make sense to you? Does it help you analyze and model the system?
I want to learn more or less about UML. In short, UML is a language used for modeling. You can simply understand it as a drawing tool, some elements are defined to express different concepts. Here we are concerned with UML class diagrams, which are used for object-
1. Object-Oriented Analysis
The object of object-oriented analysis is the objective world of knowledge and modeling.
In fact, in the object-oriented analysis process is also the dem
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
1. To learn the design mode, first understand what the design mode is:
1. What is the design model?
The design pattern describes a general solution to a type of common problems in the software design process.
2. What is an object-
need to implement personality, the specific object will be called.Encapsulation of ClassesThe responsibilities of low-level modules should not be done by high-layer modules, or the encapsulation of classes will be broken.The specifics of the encapsulation of classes in a program are:1. Duplicate the object that defines the class.2. Cross-use of various kinds of objects, the correct usage is that after one
access methods defined in the public interface. A large number of access methods means that the relevant data and behavior are not centrally stored.
(15) Be cautious about classes that contain too many non-communicating behaviors.
Another manifestation of this problem is that many get and set functions are created in the public interface of the class in your application.
(16) In an application that is composed of an object-
reasons such as the need to modify the original code of the software, may introduce errors in the old code, or we will have to refactor the entire functionality, and the original code needs to be tested again. This has a special impact on our entire system, which also fully shows the coupling of the system if too high, will greatly increase the later expansion, maintenance. In order to solve this problem, people have summed up the principle of opening and closing. The fundamental solution to th
number of access methods in public interfaces. A large number of access methods mean that related data and behaviors are not stored in a centralized manner.(15) Be careful with classes that contain too many non-communication behaviors. Another manifestation of this problem is in your application.ProgramMany get and set functions are created in the public interface of the class.
(16) In an application composed of an object-
horizontal direction, the system functions should be distributed as much as possible. That is, according to the design, the top-level classes should share work in a unified manner. P30
(13)Do not create all-powerful classes/objects in your system. Be especially careful about the classes whose names include driver, Manager, system, and susystem. P30
Plan an interface instead of implementing an interface.
number of access methods in public interfaces. A large number of access methods mean that related data and behaviors are not stored in a centralized manner.
(15) Be careful with classes that contain too many non-communication behaviors.
Another manifestation of this problem is that many get and set functions are created in the public interfaces of classes in your application.
(16) In an application composed of an object-
frameworks rather than reusable components when creating an inheritance hierarchy.
(55) If you use multiple 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) i
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.