Discover grokking object oriented design interview, include the articles, news, trends, analysis and practical advice about grokking object oriented design interview on alibabacloud.com
, NB Sp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp nbsp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp , NB Sp
=function () { the // ... - } - This. SetName =function () { - // ... + } - This. Setprice =function () { + // ... A } at //Object Public Properties - This. ID =ID - //Object Public Method - This. Copy =function () { - // ... - } in -}In OOP, there are two concepts: static properties and Static methods, both of which belong to the class, and not each
The merging Reuse Principle is also known as the composition/aggregate Reuse Principle and carp principle. Its definition is as follows:
Composite Reuse Principle (CRP): Use object combinations as much as possible instead of inheritance to achieve reuse.
The merging Reuse Principle is to use some existing objects in a new object through the association relationship (including the combination
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
LSP
The Liskov Substitution Princip
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
LSP
The Liskov Substitution Princip
: This article mainly introduces (9) The 5 principle of object-oriented design. if you are interested in PHP tutorials, please refer to it. 1. object-oriented summary:
1. high abstraction is conducive to high summarization.
2. the code is a document.
2. example of a message
mechanisms of subproblems.
Ai-Password analysis-large-scale reuse of blackboard architecture instances
Artificial Intelligence generally requires the knowledge base of human beings to approach different AI fields.
Data collection-meteorological monitoring station-small systems will also learn from the object-oriented architecture and reveal some basic principles for the
indexed in the return table return {withdraw = WI Thdraw, deposit = deposit, GetBalance = getbalance}enda1 = NewAccount (0) a2 = newaccount (+) A1.withdraw (+) print ( A1.getbalance ()) print (A2.getbalance ()) a Special "object": This can be used when the object has only a single method. It is a special case of the OOP described earlier, which is not inherited but private and efficient:function NewObj
of programming, which conforms to the normal thinking of people. If we drive a Mercedes Benz is dependent on the Mercedes-Benz, the use of laptops directly rely on notebook computers.② "Dependency inversion": programming is to abstract the real world things, and then we based on the needs of the system design to produce a dependency on the abstract, instead of people's traditional thinking of the dependence between things, called "inverted."3.2 Depen
interface injection;That is, in the function declaration, the argument is an abstract class or interface, which implements the transitive dependent object, thus achieving the purpose of directly using the dependent object.can be summarized as interface passing, construction method passing and Setter method is passed. The core of the dependency inversion principle is that we should interface programming, understand interface-
Objective of the Object-Oriented Design Method
In system design, if the design personnel can achieve the following "six", that is, modular, role-oriented, process-oriented, standardi
: 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 principles:
1. five object-oriented principles: single responsibility prin
engine does those things.
First, try traversing the properties in B, but not the Name property.
The request to find the name attribute is delegated to the prototype of the constructor of object B, which is b.__proto__ logged and points to B.prototype, and B. The prototype is set to an object created through new A ().
The name attribute is still not found in the
I have been working for three years. To be honest, I have never studied object-oriented.ProgramDesign, but some emotional understanding in some work plus some so-called theory. Reading a book 《 Head first object-oriented design and analysis " , The story in the book vividly describes OOA D I would like to take this op
I recently read the design model. I like this book very much, and the content is also very understandable. I am a little addicted to reading it. Haha, I first looked at the object-oriented basics. I have been familiar with object-oriented basics before, I have a further unde
mind anyway)
Good encapsulation, (interface to reasonable, physical design for the fact, do not have much interface, many, good)
The granularity of the class should be reasonable
Consider the correctness of dependencies. (Do not reverse-rely on inverted errors, such as the design of the logical layer and the UI, you are in the logical class of the process relies on the interface of the UI layer an
About the Great software:"Great software is always doing what the customer wants him to do," says the client-friendly program designer . As a result, customers will be able to pay the desired results even when they have a whim to use the software in new ways.The object-oriented programmer says: great software is object-orient
expresses a specific object (type code) that affects the behavior of the class and may cause the branch statements associated with that type to appear frequently in the program, we should create a new derived class and use polymorphism instead of his
Refinement subclasses: Sometimes, some properties in a class only make sense for some instances of the object, which means that the class's plan is not p
, 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
Work needs to do a PHP module, the content of the various sections of the Forum to do statistics, and then data extraction. Each plate has some main topics or content to focus on. For example, the car section, will focus on safety, car maintenance knowledge, how to choose cars and so on. Then the car section of all the posts according to these concerns to classify, calculate points, statistics. Finally, some data are obtained for future data mining.
The problem is: There are many sections on the
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.