Thoughts on the face of objects (2)

zhaozj2021-02-11  245

Thoughts on the face of objects (2)

Today, the face-to-object method is almost synonymous with success, advanced, efficiency. Designing and implementing a software using the face-to-object method is almost a default selection of developers. However, is this method that has been truly achieved? Really reached the advantage that he was declared during him? Obviously, most people such as such problems are confused and cannot make a sure answer. The method of facing the object is still difficult in software analysis and design, these difficulties have these performances: 1. The method of abstract realistic issues is not easy to be truly mastered by developers. There are two types of objects in the domain in the decomposition problem. One is the nature of an abstract object. This method is actually an object inheritance, and the second is a method of combining an object. In the classic theory, it is considered that the inheritance of the subject is the essence of the object method, but does not meet the thinking habits of most people. For a tire, people are more willing to view it into a combination of rushes, tires, internal tires, etc., rather than abstract to such a hierarchical relationship, rubber-> rubber-containing rubber-containing metals - circular rubber - > Tire. 2. Analysis to design is still unable to smoothed, and there is an object in the analysis phase, often there are many reality nouns, which affects the designer's thinking, causing them to pay attention to the relationship between the object in the problem domain, often subject to other meaning of these nouns. influences. Assuming that the ordinary enterprise management system, analyzes people -> Company Staff -> Senior Staff -> Manager's abstraction, designers tend to be influenced by people, managers, senior staff, can not take such real-world objects well Map to the program structure, even depends on the name of the person, age these attributes, however these attributes are not concerned in the problem domain, in fact, in the program structure, the object is completely different from the real people concept The abstract these objects actually in order to extract static relationships and dynamic relationships in the problem domain, the reality is interfering with designers. 3. The software that faces the object method does not have a fully realized software multiplexing and simplified maintenance. When there is no method in which the properties of abstract objects are actually fully adopted, most people are accustomed to break down complex things into a combination of combined objects, abstract simple things, in this case The software structure is complex, and the object portfolio is inevitable to be complex messages, and it is certainly not easy to repeated and maintain. 4, lack of evaluating a standard, design, or how to make a design, reduce software complex, and reduce software complexity, no good theoretical support. This itself is due to the flexibility of object abstraction, and different people will have different abstract methods for the same problem. The method of facing the object does not limit people's abstract methods, or there is no abstract method. I am talking about abstraction, and the object combination corresponds. Lack of standards must also cause software reuse difficulties. In order to solve these problems, many people have returned, I have to say some big words. The first concept puts inheritance to inherit and achieve inheritance. It is believed that the object is actually achieved by the implementation and claim, in real design activities, they find a good way to reuse, because they put interfaces and implementations Separate so that different objects can be manipulated in the same interface without care of the details of the object, which reduces the degree of correlation between the objects. The second concept, try to use the object portfolio rather than inheritance, after the inheritance is decomposed, will naturally discovery, the basic class of pure virtuality is actually the interface of the object, and for the convenience of multiplexing, it is almost completely not to achieve Inherit, because multiplexing is the object itself, not using its base class, so defined a good combination into a key, and inheritance will also brought to this multiplex. I refer to this solution as a regression, which is a regression of the object to structured, or the extension of the structured method.

转载请注明原文地址:https://www.9cbs.com/read-4199.html

New Post(0)