Two research-oriented American scholars (Stave Halladay and Michael Wiebel) have said: "General surface
Object Programming (OOP) thinking is just a group of blackcombies, and the technique of random response is used for them to abstract their brains.
'Object'. Even the best OOP programmer, the limit they can deal with is also the medium-scale development project. if
The programmer has insufficient experience, the system is very large, so it can only introduce you in a marginal mud. "
On the one hand, there is almost no software engineer think that OOP is perfect, on the other hand, the OOP is like a broken bamboo, almost every
The latest program development tool or language has adopted OOP ideas; on the one hand, more and more "the crowd" is in the case,
Treated "object" as you want, on the other hand, after nearly 30 years, has already had the structured software method of most users.
The increasing shrinkage ... Faced with this reality, experts in studying software engineering methods have pointed out: "Currently in front of software development methodology
An important issue is: from the theoretical understanding of the natural rationality of the powerful vitality, and improve the object-oriented software engineering methodology
system. "
In the past year, we have conducted a more in-depth study of software engineering methods for face-oriented software through domestic and foreign practical systems.
And discuss, especially in the first phase of the Beijing Highway Bureau computer system, learn from foreign software design experience, more systematically adopted
Object-oriented software engineering methods, benefiting a lot.
First, it is "design leading" or "program leading"
In a system development process, only OOP is used or an OOSE (object-oriented software engineering) method, the key to see the entire development
The 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
It is often caused the program dominant software developers in the "program system" and "aliened approach design", the deeper.
General software developers (including those who see programs that do not see the system) are subjectively considered: software development should not be "system design
Leading "and leads" "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 a software developer failure and success
The theoretical summary of experience, from the idea of software reuse, the value of the methodology reuse can be reused in certain procedures components.
Taking Beijing Municipal Highway Bureau as an Example. First, we learned in the system survey phase: this system should be developed (increted). by
In the period of institutional reform, the user needs and system structures during system survival are much more. This indicates that the target system should have strong
Maintenance, that is, the development achievement of each issue should have a high reusability in subsequent engineering. Second, the workload of the first phase is quite large (final
Fruit includes 124 modules, 72 types of reports, 119 database tables, 439 windows, 912 data windows, and developers have industry bureau industry
Do not understand, more experienced college students, the ability to understand demand is low. This indicates that the development methodology must be minimized to minimize
Less repeat labor, achieve the sharing and reuse of the results in the development process; it must support the adjustment of the elimination of the demand to understand the error, so that the downstream finished product
The design change in the stage is relatively easy.
Before developing this system, we undertake a downstream development task of foreign software. Since it uses object-oriented software design,
We deeply realize that domestic and foreign software development methods and technical gaps are quite inspired.
Referring to our consolidation of foreign software development efforts, that is, only 120 modules (including reports) coding and testing are 41 people.
Month, then the highway system has started nearly 200 modules and reports from the upstream design, and the development efforts of more than 100 database tables should be at least 120 people. Due to the use of object-oriented software engineering methods, despite most of the experience of developers, the first phase of the project is the most
Finally controlled within 80 people, the cost is about 1/3. At the same time, in terms of maintenanceability, reuse and other functions and performance indicators,
All of our previous systems developed in the past.
For software developers who stayed in program leading levels, they choose OOP's reasons to be passive. In fact, at the time
The word dominant developer's diction is not found, or the "Methodology" is not talking about with the "program algorithm". Until
It is more insufficient to see OOP as OOS.
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 large, and it is not necessary to depart from the real world.
That is, from the user interface, the knowledge and experience in the problem area, the real world problem model is to determine the target system "what to do
"." Object-oriented problem analysis model describes three sides, ie object models (static structure of the object), dynamic model (object phase
The order of interactions and functional models (data transformation and function dependence). The abstract principle of software engineering, the principle of hierarchical principles and segmentation
Suitable for object-oriented methods, that is, object abstraction and function abstraction principles are also from advanced to low, from logic to physics, step-by-step
Minute. Each level of abstraction is repeated object modeling (object recognition) → dynamic modeling (event recognition) → function modeling (operation recognition) process, until
Each object instance is all implemented on physics (program coding).
Object abstraction is from logic or physical stage, and it is also the same as a method for methodology before the development. It is also distinguishing OOSE and OOP.
Trip stone. Because many tools or languages (such as PB, C , MotiF) support OOP, some program-level system developers can be very convenient
Directly develop physical objects without logic abstraction, and do not have system development from the physical layer, instance objects.
Qi, I don't know that this kind of OOP you want is not only unable to play the superiority of the object method, but also bring the post-development
Come a lot of work work.
As in the past, we also introduce prototyping methods in the system design phase to use system samples, namely prototypes.
Households, seeking an interruption of demand, avoiding or decreasing post-renewers. Most OOP tools provide convenience for development prototypes.
The relationship between prototype and final product, that is, prototype is a sample of logic or physical objects. If the latter is equal to the final product. in
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 designed
The prototype based on logical object development is considerable, and quite partially rejected. However, because the object is not yet carried out, physical development is developed, but use
Semiological object prototype uniform analog object events and operations, so whether it is an object model, dynamic model or function model, it is not difficult to modify
difficult.
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. Super-class design is good
Ok, first look at its internal 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 internal reuse rate is super-class.
Development 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.
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 don't use a generic class
According to the structure and its related operation package, the next programmer must operate the library table must have an in-depth understanding of the library table design, and ensure
The program algorithm can not damage the relevant consistency of data, which will greatly increase the difficulty of programming and testing, requiring programmers to have rich
experience. And after this type of generalization (public function, public storage procedure), the programmer is only issued "message" and "" output letter
Interest ".
(4) It is conducive to the implementation of development specifications, unified interface styles.
The maximum harm that we have developed in foreign countries is: foreign countries' maintenance and strict requirements for user interfaces (reports, screens)
begging. 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. This production
The product 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 of OOSE
The designer must civil and military (design and programming) double full, can take the program to implement and test tasks with super-class objects, this is similar to structured methods
The upper system designer can basically be different. At the same time, the super-class object must be absorbed frequently in the downstream development process.
Feedback (including feedback from users), perform corresponding adjustment modifications. So OOSE is designed and implemented by the superclad object.
After entering the programming phase, you can never be able to drive the program.
If the design phase does not pre-design and develops a super-class object, there is no ancestor to inherit between majority developers of the same project.
Objects, even do not use inheritance relationships even in each developer's own role, then this is not OOS, but also called OOP
It is very boring.
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 layered, network type, relational, and of course, object-oriented
type. Database design in OOSE will undoubtedly use object-oriented database design methods.
The database design is also known as the database mode, basically consists of 3 hierarchical modes: from a specific DB application perspective to see the outside of DB design
Mode; DB design is concept mode from the DB design proced from the organization or enterprise angle; processing corresponds to a specific DBMS feature and limit DB design
Department mode. Specifically, the internal mode is the SQL definition of the database, and the logical mode is the logical definition of the table set, and the external mode is from a specific
Use the partial DB of perspective. Interface between external mode and logical mode is a view, stored procedure, or other DB process that is stationed in server-side.
sequence.
If in the abstract object model, each app is a child object of one or more superclatrios, then select the appropriate fine layer.
The object model maps it to the conceptual model, which is the key to the design of the database library table object. The more interface between external mode and concept mode
Less, the more simple, the better, the program is simple, and the database and procedures are easy to maintain. That is, localization is an important design principle.
OOP is mostly backed by the database, which is based on the existing database. Therefore, regardless of whether the problem of the problem of the problem world, and
Whether to reasonably map the object model to database logic mode (object-oriented database design), OOP can work.
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 procedures that bury their own share may be required, but developers designed for programming in the object-oriented method.
There should be no other developers in the investigation of object data dictionaries, and they can be reused. In general,
The sharing of objects should be managed by the upper design personnel to ensure the consistency of object style and avoid conflicts. However, the object's
Independence, encapsulation and polymorphism are very easy to reuse, which is the structured system that cannot be compared, and reuse is the most important of software development methodology.
One of the ideas. Upper designers are often impossible, understand the developers of software design theory, even if only the underlying procedure is also
The most labor-saving programming method should be used, which uses a large number of reuse objects.
When inheriting a super-class object and reusing others, if you find an unreasonable place, it should be reflected in the development of object development.
By.
For the upper design person, on the one hand, the program should be encouraged to reuse the existing objects, on the other hand, should share the development of the developer
As a data dictionary, individual object reuse can be reflected in the overall object model immediately to ensure consistency when designing changes.
Second, object-oriented methods and structured methods comparison
Analysis is the problem abstraction (what to do), the design is the problem solving (how to do), and the implementation is the solution (result). Any party law
This is true for the abstract and solving process of the world. In the problem abstract phase, the structured method is the process, follow the process of data transformation.
The junction of the question, decompose the problem. Therefore, different object models that emphasize the object-oriented method, the functional model of describing data transformation is the knot
The focus of the configuration method. If the problem world's function is more complicated or more important, then the structured method should still be the preferred method.
learn. If the data structure is complicated and the transformation is not much, if there is a process dominant analysis and design, the downstream development belt once there is a system change.
Come to make great confusion.
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
Assembly, 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 with the database structure, and there is no mapping between the function module and database logic mode, and the program and data structure is difficult to encapsulate.
together. If the data structure is complex, the module independence is difficult to guarantee. Object-oriented method abstract system structure is often not more structured
The system is simple, but it can be mapped into 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 of the problem world should be formally language (graphics language)
Words, pseudo-code language, etc.). Structured method can use data flow diagrams, system structural diagrams, data dictions, state transition diagrams, entity
Picture diagram for system logic models; and object-oriented methods can use object model diagrams, data dictionaries, dynamic model diagrams, functional molds
Figure. Among them, the combination of object model diagram approximation system structure and physical relationship diagram, dynamic model diagram similar state migration diagram, function model map class
Like data flow chart.
The highway system has more than 100 database tables, but the processing (transformation) of the data is very simple, if the structured methodology is selected,
What 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 or one.
That is, the object model described in the initial problem is basically consistent with the functional model. Take the plan management office system as an example, the object is a planned administrator, the rule
Plan administrators, budget administrators, statistical administrators, functional (operation) are planned, planning, budget, statistics.
The problem exists in the lower abstraction.
First, many public super-class object design is contrary to structured methods, because it destroys the continuity of the process and the logical level of the system structure.
Sex, put some lower modules and no semantic objects in the process analysis, placed on the upper layer of the system structure. Therefore, if the structured method is used,
The inheritance relationship must be changed to the lower module call relationship. But in fact, some status of the ancestors (attribute value) is directly from the main control module
Determined by the indication; from the control perspective, it is indeed in the upper layer of the system. If a structured method is used, the result will be either
The system becomes a network shape, loss of structured features, or gives 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
With structured methods, database patterns may map objective world data structures. Due to highways, support units, management units, road conditions, bridges
The objective multiple relationships between the entities such as beams, tunnels and roads on the road, and the results may define a spider web.
The relational library structure has greatly added the burden on the application programming and database maintenance of the database.
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. At present
The object-oriented method, system structure, and database structure are multiple inheritance structures, and there is a mapping relationship with each other. Obviously the former is more than the latter
High heterodity, poor maintainability, large 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. User in the short term
It will not find that developers use advanced methods to learn the benefits of them, and the developers themselves have greatly reduced the development burden.
beneficial. But over time, it is still the user's or the user, because the software's long-term quality (including maintenance costs and survival cycles)
The benefits brought about by long) are fundamental.
Third, methodology is not the law
For methodology, we understand this:
(1) The purpose of the methodology is to share the success of the future generation, avoid the failure of the former people, and focus on the unprofitable field.
Creative labor. Therefore, the creativity of methodology and developers is never conflict. It can not be used as authorities as laws.
The boundaries cannot give universal conclusions through certificates and reasoning as the law. If you must make a metaphor, it is better than the world of people.
(2) There is no way to learn from the sea, and any party law has its limitations, so software developers don't have to stick to
A specific methodology.
For example, an object model diagram of an object-oriented method, this formal language is far less than a structural method, and a data flow map is simple.
If the road bureau system is expressed in the object model map, at least dozens of pages. Since the top layer function model and the object model are
Consistent, so we use the system structure diagram of structured methods.
(3) The fact that the OOSE method driven by OOP is indeed more naturally abstract realistic world than the structured method, and some
The OOP tool is indeed quite mature. Instead, structured procedures and development tools under open platform, although not to stop
Before, the progress in recent years is limited.
(4) According to our experience, there are some suggestions for practical OOSE: 1 It is best to conduct a training on object-oriented manager after selecting methodology.
2 Due to the advance development of super-class objects, the upstream design workload of OOSE is heavy than the upstream work of the structured method.
Time and manpower should be more enough. Otherwise, then add or modify the more super-class object after the downstream development, it is easy to cause confusion and ineffective labor.
move.
3 Due to the system, the more object classes, the more electronic object data dictionary should be established in order to facilitate internal reuse and sharing, so that
Uniform collation management of the object.
4 There should be strict naming rules, if possible, the naming rules should be integrated into the data dictionary.
5 After the next development is released, if you find that some instance objects should be gently become new super-class objects, you must make new super class as soon as possible.
Add design, the faster the change is, the better.
6 sub-object inherit the super-class object, discovering the defects of superclad design are common. The development team should have very smooth feedback channels.
Tao, make the superclass get a timely correction. Sub-objects must not be easily enacted to enclose the superclass object to make the system lose unified control. Compliance system design
The inheritance relationship defined in the inheritance relationship of instance objects should be the concept of all developers.
7 The benefits of object-oriented design are later more significant, especially in terms of system maintenance and expansion.