Object-oriented software engineering methodology practice

zhaozj2021-02-11  163

Object-oriented software engineering methodology practice

Author: Beijing University of Technology School of Computer Zhao Xiaohua

Article Source: AKA Magazine

Two studies of American scholars (Stave Halladay and Michael Wiebel) have said: "The general object-oriented programming (OOP) think is just a group of blackcomes, the spiritual machine, randomly strained skills for them to race their brains Abstract 'object'. Even the best OOP programmers, the limit they can deal with is also the medium-sized development project. If the programmer is insufficient, the system is very large, then it can only use OOP. You introduce a marginal mud. "On the one hand, there is almost no software engineering scholars think that OOP is perfect, on the other hand, the OOP is like a broken bamboo, nearly every newly launched program development tool or language has an OOP idea. On the one hand, more and more "the crowd of the blacks" is in the absence of the "object", and the other aspect is the growing structure of the structured software method for nearly 30 years. ... Faced with this reality, experts in studying software engineering methods have pointed out: "An important issue in front of software development methodology is: from the theory, understanding OOP has a strong vitality, and improving object-oriented Software Engineering Methodology. "For the first year, we have conducted a more in-depth study and discussion of software engineering methods of face-to-objects, especially in the first phase of the computer system of Beijing Highway Bureau. In the middle, learn from foreign software design experience, more than the object-oriented software engineering method is used, which has benefited a lot. First, it is "design lead" or "program leading" in a system development process only OOP or an OOSE (object-oriented software engineering) method, the key to see the entire development process is "design lead" or "program leading". In recent years, a large number of advanced procedures development tools have entered my country, which has a great role in improving software development efficiency. However, they tend to lead the program leading software developers in the "programming system", "aliened by an alien design", the deeper. The general software developers (including programmers who see programs that are not available) believe that software development should not be "system design lead" and lead to "program algorithm". However, with the following questions, the result is often the opposite. Question 1 Is it possible to develop methodology before performing software design and selection software development tools? The so-called methodology refers to a series of methods, techniques, and specifications of the organizational software production process. Methodology is the theoretical summary of software developers failing and successful experience. From the idea of ​​software reuse, the value of methodology reuse is more than certain programs components. Taking Beijing Municipal Highway Bureau as an Example. First, we learned in the system survey phase: this system should be developed (increted). By being in the institutional reform period, the user needs and system structure in the system survival are much more. This indicates that the target system should have strong maintenance, that is, each period of development results should have a high reusability in subsequent engineering. Second, the first phase of the project is quite large (the last results include 124 modules, 72 types of reports, 119 database tables, 439 windows, 912 data windows), and developers don't understand the road bureau business, more experience Insufficient college students, the ability to understand demand is low. This indicates that the development methodology must maximize repetitive labor, realize the achievements sharing and reuse during the development process; it must support the adjustment process of eliminating the need to understand the error, making the downstream finished product change are relatively easy to perform. Before developing this system, we undertake a downstream development task of foreign software. Since it adopts object-oriented software design, we have deeply realized that domestic and foreign software development methods and technical gaps are quite inspired.

Referring to our consolidation of foreign software development efforts, only 120 modules (including reports) coding and testing are 41 months, then the highway system starts nearly 200 modules and reports from upstream design, more than 100 databases The development effort of the table should be at least 120 people. Due to the use of object-oriented software engineering methods, although developers have experienced insufficient experience, the first phase of the project is still controlled within 80 people, and the cost is about 1/3. At the same time, the system maintains maintenanceability, reuse and other functions and performance indicators, exceeds the system we have developed in the past. For software developers who stayed in program leading levels, they choose OOP's reasons to be passive. In fact, in the dictionary of the program dominant developer, it is not found that "Methodology" is not discussed with "Methodology" and "Program Algorithm". As for the view of OOP as OOSE, it is more insufficient. Question 2 Abstract starting point is the real world problem, or can be executed instance object? In the real world's early abstract phase, the object-oriented method is not much different from other methods, and it is necessary to depart from the real world, that is, from the user interface, the knowledge and experience in the field, to construct the real world problem model, that is Determine the target system "What to do". Object-oriented problem analysis model describes 3 sides, ie object models (static structures of objects), dynamic models (sequence of object interactions) and functional models (data transformation, and functional dependencies). The abstract principle of software engineering, the principle of hierarchical principles and segmentation is also applicable to object-oriented methods. Each level of abstraction is repeated object modeling (object recognition) → dynamic modeling (event identification) → function modeling (operation identification) process until each object instance is all implemented on physical (program coding). The object abstraction is from logic or physical stage, just like the development before the development, is also a tribute to OOSE and OOP. Because many tools or languages ​​(such as PB, C , Motif) support OOP, some program-level system developers can directly develop physical objects without logic abstraction, and do not know from physical layers, examples. It is not only the advantages that the OOP you want is not only unable to play the superiority of the object. It also brings a lot of return work in the future. As in the past, we also introduce prototyping methods in the system design phase to use system samples, prototype and user-talk, and to seek the need to understand the needs, avoid or reduce post-renewers. Most OOP tools provide convenience to the development prototype, the problem is the relationship between prototypes and final products, that is, prototype is a sample of logical objects or physical objects. If the latter is equal to the final product. When the wood has become a boat, let the user review. If the problem is found, it is either to move back, or forced users to cut the appropriate performance. In fact, we are based on prototypes developed based on logical objects for design review, and quite partially vetoed by users. However, since physical development is not yet carried out, it is not difficult to use a super-class object prototype uniform analog object event and operation, whether it is an object model, a dynamic model or a functional model, and it is difficult to modify. Question 3 Whether the design phase is designed to design a superclass, do you complete the implementation of the superclass object before the instance object design begins? Software-oriented software has strong reusability, which includes reuse and external reuse of the development project. Reuse is contained in superclass design, without superclad object system is better than "put the washing machine as a rice cylinder", can not be used. The super-class design is good, first look at the high low reuse rate, the internal reuse rate is high, and the inevitable external reuse rate is also high.

Due to the tightening of the system development, the workload is large, and our development team is young, experience and manpower is insufficient, and the overcase development of the internal reuse rate is undoubtedly our savior. It can reduce labor, easy to unify specifications, unified research on complex issues, uniformly solve, and make it easy to maintain. For the generalization of the extensive abstraction of the superclass, we are considered from the following aspects: (1) Find the common behavior of most instance objects. For example, "Print Report", "Query Static Code Table", "Enter Database Table Data", etc. (2) Supected polymorphism design To ensure that the use of superclass inheritance relationships can meet the operation requirements of each subclass. For example, inheriting the same "data entry" ancestor window, you can complete data entry of different structural database tables. (3) Conservatives are convincing, and the integrity of the data will not be damaged, which is beneficial to simplify complex issues. For example, maintenance of database table sets with complex relationships, structures, and related access operations. If you do not use a generalization class to encapsulate the data structure and its related operations, the next programmer must operate the library table must have an in-depth understanding of the library table design, and ensure that the program algorithm can not destroy the relevant consistency of data. This will greatly increase the difficulty of programming and testing, requiring programmers to have rich experience. After using this generic class (public function, public storage procedure), the programmer is just issued to "message" and "output information". (4) It is conducive to the implementation of development specifications, unified interface styles. We have developed the maximum wear of foreign software: foreign countries' strict requirements for user interfaces (reports, screens). All screen buttons are high, wide, and the starting position is used to specify the X and Y coordinations of 3 digits after the decimal point. The product that comes out makes people look at the pleasing sense. But if everyone is doing interface windows, the fine adjustment of the button is bound to grow. Using the inheritance relationship of the screen interface mode superclass, combined with specialization, the problem can be solved. Obviously, the superclass design and implementation must be completed before the programmer is generally developed. That is, the upstream system designer of OOSE must be civil and military (design and programming), which can take advantage of the programs for super-class objects to implement and test tasks. This is different from the upper system designer of the structured method. At the same time, the superclassic object must often absorb feedback during the downstream development process (including feedback from the user), perform corresponding adjustment modifications. Therefore, OOSE has a designer design and implementation of the designer that is difficult to enter the programming phase, and they often do not have to be able to deal with the program. If the design phase does not design and develop super-class objects, there is no ancestral object that can be inherited between most developers of the same project, even inherited inheritance, then this is not only not OOSE, it is very boring for OOP. Question 4 How do I handle object-oriented object-oriented database mode mappings? Object-oriented database design methods can be used in various databases, such as hierarchical, network type, relational, and other-oriented type. Database design in OOSE will undoubtedly use object-oriented database design methods. The database design is also known as the database mode, which is basically constructed from 3 hierarchical modes: from the specific DB application perspective; external mode of DB design; DB design, DB design procedure from the organization or enterprise perspective, concept mode; processing corresponds to specific DBMS features Limited DB design is internal mode. Specifically, the internal mode is the SQL definition of the database, and the logic mode is the logical definition of the table set, and the external mode is partial DB seen from a particular application angle. The interface between external mode and logical mode is a view, stored procedure, or other DB processing program that is resident in server-side.

If in an abstract object model, each app is a child object of one or more superclass, then the object model that selects the appropriate sequential layer is mapped to the concept model, which is the key to the design of the database library table object. The fewer interfaces between external models and concept modes, the better, the better, and this program is simple, and databases and programs are easy to maintain. That is to say, localization is an important design. OOP is mostly backed by the database, which is based on the existing database. Therefore, OOP can work whether or not the object model is used to model the object model, and whether the object model is rationally mapped to the database logic mode (object-oriented database design). Question 5 Do you first investigate if there is a reusable (inherited) object, whether to participate in the next object to the upper object, superclatrifier feedback? The program that bury his own shackles may be necessary, but developers who are programmed in the object-oriented method should first go to investigate the object data dictionary, there is no other developers who have completed it. Reusable objects. In general, the sharing of objects should be managed by the upper designer to ensure the consistency of object style and avoid conflicts. However, the independence, encapsulation and polymorphism of the object is convenient to reuse. This is one of the most important ideas of the structuring system, while reuse is one of the most important ideas of software development methodology. Upper designers are often impossible, understand the developers of software design theory, even if only the underlying procedure should also use the most labor-saving, most efficient programming methods, a large number of reuse objects. When inheriting a super-class object and reusing others, if you find an unreasonable place, you should reflect the bearers developed to the object. For the upper design person, on the one hand, the program should be encouraged to reuse the existing objects. On the other hand, the object data dictionary should be shared, so that individual object reuse can be reflected in the overall object model to ensure design changes. consistency. Second, the object-oriented method and structured method comparative analysis is the problem abstraction (what to do), design is a problem solving (how to do), the implementation is the solution of the problem (result). This is true for any party law to learn the abstraction and solving process of the guest view. In the problem abstract phase, the structured method is the process of finding the junction of the problem according to the process of data transformation, and the problem is decomposed. Therefore, the object model emphasizes the object-oriented method is different, and the functional model of the data transform is the focus of the structural method. If the problem world is more complicated or more important, then the structured method should still be the preferred methodology. If the data structure is complicated and the transformation is not much, if the process is analyzed and designed, once there is a system change, it will give the downstream development belt to be extremely confusing. Due to different understandings of the process, the functional modules divided by the process-oriented functional segmentation may vary from person to person. Object-oriented object segmentation, from the object of the same problem, different people have higher ratios to the same conclusions. In design, structured methodology generates a system structure that is clear and structured. Each module is likely to maintain strong independence, but it is often independent of the database structure, and there is no mapping relationship between functional modules and database logic mode. The program is difficult to encapsulate with the data structure. If the data structure is complex, the module independence is difficult to guarantee. Object-oriented method Abstract system structure is often not simpler than the system structure of structured methods, but it can be mapped to the database structure, and it is easy to implement the package and data structure. There is a "formal principle" in the basic principles of software engineering, that is, the abstract conclusions in the problem world should be expressed in formal language (graphical speech, pseudo-code language, etc.). Structured method can use data flow diagrams, system structural diagrams, data dictionaries, state transition diagrams, entity relationship diagrams; and object-oriented methods can use object model diagrams, data dictionaries, dynamic model diagrams, function models Fig.

Among them, the combination of object model diagram approximation system structure and physical relationship diagram, dynamic model diagram similar state migration diagram, function model diagram class data flow map. The highway system has more than 100 database tables, but the processing of data (transformation) is very simple, if the structure is selected, how is the situation? There is no difference in the initial phase of the problem abstraction. Since the data transformation is small, the operation of the object and the object can be regarded as one, that is, the object model described in the initial problem is basically consistent. Take the planned management office as an example. The object is a planned administrator, a planning administrator, a budget administrator, a statistical administrator, and a function (operation) is planned, planning, budget, statistics. The problem exists in the lower abstraction. First, many public super-class object design is contrary to the structured method, because it destroys the continuity of the process and the logical hierarch of the system structure, put some lower module and no semantic object in process analysis, and placed on the upper layer of the system structure. . Therefore, if the structured method is used, the inheritance relationship must be changed to the next module call relationship. However, in fact, some states (attribute values) of the ancestors are determined directly from the master module; from the control perspective, it is indeed in the upper layer of the system. If the structured method is used, the result will be either to turn the system structure into a network, lose structured characteristics, or give up this unified design of repetitive labor. Second, the mapping design of the application of the object model to the database concept mode is also a sign using the object-oriented method. If the structured method is used, the database mode may map the data structure of the objective world. Due to road, support units, management units, road conditions, bridges, tunnels, and roads on greening, there is a complex multiple relationship between all entities such as greening on the road, and the results may define a relationship library structure like spider network, which greatly aggravates The burden on the application programming and database maintenance of the database front end. In summary, if the system uses structured methods, system structures, and database structures may become a mesh structure, and they are not related to each other. The object-oriented method, system structure, and database structure currently adopted are multi-inheritance structures, and there is a mapping relationship. Obviously the former has high complexity than the latter, poor maintainability, and low internal reuse, and low reuse rate. In fact, whether it is using what methodological development software, it should be software that meets the current needs of users. Users will not find out the benefits of developers to use advanced methods to learn to use advanced methods. It is the first to benefit due to great reduction of development burden. But over time, the maximum benefit is obtained or the user, because the long-term quality of the software (including low maintenance costs and long living cycle) is fundamental to the user. Third, the methodology is that the idea is not the law for the law. We understand: (1) Methodology is to make the future people to share the success of the former, avoid the failure of the former, and the attention has not been developed Creative labor in the field. Therefore, the creativity of methodology and developers is never conflict. It can not be derived as a non-boundary like law, and it is not possible to give universal conclusions like the law. If you must make a metaphor, it is better than the world of people. (2) There is no methodology that has not been placed, and any party's law has its limitations, so software developers do not have to be able to stick to some specific methodology. For example, an object model diagram of an object-oriented method, this formal language is far less than the structured method of the structured method, and the data flow diagram is simply clear, and if the road bureau system is expressed in the object model map, at least dozens of pages. Since the uppermost functional model is consistent with the object model, we use the system structure diagram of the structured method.

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

New Post(0)