Want to know object oriented analysis and design ebook? we have a huge selection of object oriented analysis and design ebook information on alibabacloud.com
Ask for PHP object-oriented design and data access design. for example, if one class Person has a database operation class ConnPerson, one operation is to buy a chicken, how should we design chicken information in the database? Whether to include the Conn class in perison, i
Ask for PHP object-oriented design and data access design. for example, if one class Person has a database operation class ConnPerson, one operation is to buy a chicken, how should we design chicken information in the database? Whether to include the Conn class in perison, i
principles.d) "Conflict" in the principles of inheritance and combinatorial aggregation multiplexingInheritance can also be reused, is that the principle of abandoning inheritance? No.Inheritance pays more attention to "descent", which is what type. Combinatorial aggregation is more focused on borrowing "skills". Also, in combinatorial aggregation, two classes are part-to-whole relationships, and combinatorial aggregation can consist of multiple classes of skills. There is only single inheritan
Rule
1
: Give priority to (object) combination, rather than (class) Inheritance
[Favor composition over inheritance]
Combination
N(Object) is a combinationCombinationTo obtain the reuse method of new functions.
NDelegates a feature to a combined object to obtain the new feature.
NSometimes it is also called "aggregation "(Aggregation) Or "inclusive
Coad and Yourdon continue to adopt the five levels (objects and classes, structs, attributes, services, and themes) mentioned in the object-oriented analysis phase during the design phase, which helps from analysis to design trans
base classDo not let classes derive from specific classesA variable cannot hold a reference to a specific class6: Abstract Factory Method mode provides an interface for creating a family of related or dependent objects without having to specify a specific class.The factory method pattern uses inheritance: Delegate the creation of objects to subclasses, subclasses implement factory methods to create objects, and abstract factory method patterns use a combination:
"/"; return NewChu ($a,$b); Break; Case"%"; return NewQuyu ($a,$b); Break; } } } $j= Gongchang::d uixiang (3,2, "%");//Test Echo $j->js ();//OutputOutput resultsSecond, the design of six major principles1. The open-close principle is that the design should have good support for the extension, and the modification should be strictly limited.2. On the Richter scale also, the subclass mu
analysis and design, and C language does not directly support the object-oriented syntax, c to imitate C + + is not necessary, when considering the use of C language to build large projects, the use of object-oriented
(); T3.sayhi ();Obj3 inherits Obj2,obj2 inheritance Obj1. When our Obj3 instance object accesses Sayhi, we go to Obj3 's instance object and look for the Sayhi method (not found), then go to the OBJ3 prototype (not found), then go to the parent OBJ2 prototype (not found), and then go to the OBJ1 prototype (found). The path to finding is the prototype chain.
This is a learning record, not a tutoria
Chapter 6 inheritance and object-oriented design
Many people think that inheritance is the whole of object-oriented programming. Whether this point of view is correct remains to be discussed, but the number of terms in other chapters in this book is sufficient to prove that
. B, abstractions should not be dependent on detail, and detail should be dependent on abstraction. The term "inverted" is used in the name of this principle because many traditional software development methods, such as structured analysis and design, always tend to create some high-level modules that rely on low-layer modules, and policy relies on the details of the software architecture. In fact, one of
attribute Name: type [= default value]
Visibility method Name (parameter list) [: Return value type]
Examples are as follows: (3) The relationship between classes ① Association Relationship 1) bidirectional correlation. Examples are as follows: 2) One-way association. Examples are as follows: 3) Self-correlating. Examples are as follows: 4) Multiple sexual associations. Examples are as follows: 5) Aggregation relationship. Examples are as follows: 6) combined relationship. Simi
Labels: OCP Java design mode Object-Oriented Design1. Single Responsibility Principle
The core idea of a single responsibility principle is: every object in the system should have only one independent responsibility, and all objects are concerned with the completion of their own responsibilities. SRP single Responsibil
The maintainability and reusability of software
Robert C.martin, a well-known software guru, believes that a low-maintainability (maintainability) software design is typically caused by the following 4 reasons:? too stiff (rigidity)? Too fragile (fragility)Low reuse rate (immobility)? High viscosity (Viscosity)The software engineering and modeling guru Peter Coad believes that a good system design shou
principles do not exist in isolation. They are mutually dependent and complementary.
The following is a one-to-one analysis of the seven object-oriented Principles 1. Open and closed principles
1. Definition of the open/closed Principle: A software entity should be open to extensions and closed to modifications. That is to say, when designing a module,
Ask PHP design for object-oriented design and data accessibility
For example, there is a class person
There is a database operation class Conn
One of the actions in person is to buy a chicken, the chicken information to be put into the database
How should I design it?
is to
is data-flow oriented. Each function includes input, output, and function bodies, which process the incoming data and output some data, so structured programming is also oriented to data flow.
So what are the steps of structured development?
First of all, SA (structured analysis) is structured to analyze the requirements of the system, then use the SD (structure
One, the distinction of the concept
Some people confuse object-oriented database design (i.e. database schema) with object-oriented database management system (OODBMS) theory. In fact, the former is a database user-defined database mode of thinking, the latter is the idea o
Sharing (six principles of object-oriented design model) and six design models
I recently read an article titled "Please call me your first brother" on the six principles of the design mode. It is simple, easy to understand and can't help but repost and share it with me !!
Nature of software design-vernacular object-oriented ZZDifferent people refer to different meanings when talking about Object-Oriented Programming (OOP.Some people think that any application using graphical interfacesProgramAll are objec
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.