From the programmer from previous ASP or VB, it is certainly not familiar with OO thinking. It is also a thunderous rain, there is no real adaptation process in the heart. Now I will give a flowers, I hope to help you.
In the process of using OO software development methods, many people naturally becomes the technical level, for example, using OO decomposition (Object-Oriented Decomposition) to modify, using inheritance function to establish a class system (class hierarchy). However, premiums are often ignored by psychological factors behind these technologies; Object-Oriented Thinking, which is an important factor in which many people have continuously produced frustration during the OO method.
OO thinking is a Mental's Mental operation process, including the problem of the problem, and how to export the solution by understanding the problem, then in the executable software system (Working System) Express. Although everyone's thinking model is not the same, the following is the common thinking model of OO software division:
(1) Entity mapping
First, focus on the entity (entity) in the problem field, and understand the structure of each entity, then corresponding to the object in the software (Object). For example, the library's book list, books, and more. In addition, it can also be extended to other entities, such as publishers, student courses, etc. OO Softteer often experiences the structure of these entities, and related information, and then borrows soft objects to become a key component in the software.
This is very different from the traditional programming thinking. Traditional thinking focuses on the functionality of the software system, and strives to think that the system should provide those functions, as well as the user using these functions. Do not understand the structure of each entity. For example, it will give priority to how to handle the "Buying Book" function, and use less to explore the structure of the purchase list and related information.
(2) Abstraction
The specific entity in the problem is often excited to explore the Abstract Object. For example, from the list of books, you can derive this library subject, as well as students' reading preferences.
Whether it is a specific entity or abstract article, when corresponding to the soft object, you have to use abstract ability, hidden the structure of the entity, and define abstractical interface, allowing other objects to learn how to use it Structure and information. That is, the abstract interface illustrates the service item of the object, or a Behavior.
So the software teacher can indeed understand the internal structure of each entity and its behavior, then express it by abstract data type in the OO language; at this time, the entity is smoothly corresponding to the soft object. Thereon.
(3) Anthropomophization (ANTHROPOPHIZIN)
The object has behavior, allowing the object to provide services for other objects, and can also play a specific role (Role) in a team or organization. Through the intentional thinking, the entity or object can be regarded as wisdom, good communication, and mutual cooperation as people. Thus, a more more role (ie, behavior) can be given to the mollusk object, and is presented in the abstract interface of the object. For example, the book list contains a book item (Book item); after giving humanity, after the entity with wisdom, you can ask: How much is the total purchase? The list will ask each book item: why? The total amount of the book is accumulated, and then the answer is passed back to you.
The software division classifies the cooperative relationship of the soft object, arrange the role of the object, and defines the interface and behavior of the object.
OO thinking helps to clarify the correspondence between the problem, let the problem domain expert (End user) can easily understand the problem of the problem. The organizational and way of use of the software also allows users to be keen to participate in the development of software.