A comparison of structured methods and object-oriented methods

Source: Internet
Author: User

Introduction

Software development is a technology that needs the corresponding theories, techniques, methods, means and tools to support it. In terms of the development of software development technology, mainly through the structure of development methods and object-oriented software development methods.

In view of the extensive application of structured method and object-oriented method in software development process, from the basic idea of structured method and object-oriented method, some simple software examples are used to illustrate the basic composition of structured method and object-oriented method and the application in modeling, and compare the structured method and object-oriented method. From the comparison results, we can see that both the structural method and the object-oriented method have advantages and disadvantages.

Therefore, in the actual development process can play the advantages of both, in the adoption of the current mainstream object-oriented approach to the development of software, can assist the structure of the method, to build high-quality software.

1. Comparison of the basic ideas of the two

1.1 Basic ideas of structured methods

Structured method is a traditional software development method, which is composed of three parts: structural analysis, structured design and structured programming. The structured design method is based on top-down, gradual refinement, modular as a base point, with modularity, abstraction, decomposition-by-layer refinement, information concealment localization and keeping the module independent of the design software data architecture and module architecture methodology. The main point is that the solution of a complex problem is staged in stages, and this decomposition is top-down, layered decomposition, so that each stage of processing problems are controlled by people easy to understand and processing within the scope.

The basic idea of structured method is mainly embodied in three aspects. First, from the top down, gradually refinement: The program as a gradual evolution of the process. Think of a system and program as one layer at a level. For example: Household registration management system can be divided into: household registration move out, people move out, household registration cancellation, personnel cancellation and several subsystems, and each subsystem is divided into receiving user information, implementation processing, providing return information and so on. Second, modular: Several systems will be divided into several modules, each module to achieve specific functions, the final system consists of these modules. module and module between the interface to pass information, the most important feature of the module is the independence, the module has a relationship between the upper and lower layers, the upper module calls the lower module to achieve some functions. Third, sentence structure: Sequential structure, branch structure, loop structure, are commonly used sentence structure.

1.2 The basic idea of object-oriented method

The object-oriented approach (OBJECT-ORIENTEDMETHOD) is a methodology that is based on the concept of "object", which applies the object-oriented idea to the software development process and directs the development activities of the system method, or the OO (object-oriented) method. An object is a package of data and allowable operations that directly correspond to an objective entity, and an object class defines a set of objects with similar properties. Each inheritance is a way to share the properties and operations of classes that have hierarchical relationships. The so-called object-oriented is based on object concept, Object-centered, class and inheritance as the construction mechanism, to recognize, understand, depict the objective world and design, build the corresponding software system.

As a new and unique method, object-oriented approach is attracting more and more attention and attention in the world, and it is regarded as "a good method to study high technology", which is the focus of the current computer industry. The essence of it is to construct the system from the things inherent in the objective world, to promote the understanding, comprehension and description of objective things by using the thinking methods commonly used in real life, emphasizing that the final system can map the problem domain, that is to say, The relationship between objects and objects in the system can accurately reflect the inherent things in the problem domain and their relationships.

The basic idea of object-oriented approach is embodied in the following aspects: first, objects in the objective world are objects, there are certain relations between them, and complex objects consist of simple objects. Two, objects with the same properties and operations belong to a class, and an object is an instance of the class. There can be hierarchies between classes, that is, classes have subclasses, where subclasses inherit all the properties and operations of the parent class, and subclasses have their own properties and operations. The class has encapsulation, the property inside the class and some operations are hidden, only the public operation is visible externally, the object can only request the operation of other objects or their own operation through the message. Five, emphasize the full use of the people in the daily logic of thinking and principles often used. For example: Abstraction, classification, inheritance, aggregation, encapsulation, association, etc.

2. Comparison of key features

2.1 Characteristics of structured analysis methods

(1) User-oriented, users to participate in the analysis of the system from beginning to finish;

(2) Emphasizing the importance of investigative work;

(3) Decomposition of various data in the management business;

(4) The system thought of hierarchical decomposition was adopted;

(5) Using graphical tools to analyze and construct new schemes.

2.2 Characteristics of object-oriented analysis method

(1) Emphasizing the integrity and global nature of system development

(2) Focus on the process of data conversion rather than the data itself

(3) long development cycle of the system

(4) Encapsulation

(5) Inheritance

(6) Polymorphism

(7) Ease of maintenance

3. Comparison of advantages and disadvantages

3.1 Advantages and disadvantages of the structured approach

Advantages of a structured approach:

(1) from the system as a whole, emphasizing the "top-down" analysis and design under the condition of overall optimization, to ensure the integrity of the system and the consistency of objectives;

(2) The structured approach emphasizes functional abstraction and modularity. Because it takes the method of chunking problem, it can decompose a more complicated problem into several easy-to-solve parts, which reduces the difficulty of problem processing.

(3) Strictly differentiate the stage of the system development, the work result of each phase is the basis of the next stage, facilitate the management and control of the system development;

(4) Document standardization, according to engineering standards to establish standardized documentation, easy to maintain the software in the future. And because the structured method is clear, clear, and effective decomposition of the complex problems, making the program is clearly clear, but also greatly simplifies the programmer's complicated work.

Disadvantages of the structured approach:

(1) Poor reusability: Structural analysis and design clearly define the interface of the system, when the system changes to the external interface, it may cause large changes in the system structure, it is difficult to expand the new function interface;

(2) Poor maintainability of software: Due to the poor software modification, resulting in maintenance difficulties, resulting in maintenance costs and high costs, maintainability of the poor;

(3) Software development is difficult to meet the needs of users: the traditional structure of the development of large-scale software, often this system involves a variety of knowledge in different fields, in the development of fuzzy requirements or changing requirements of the system, the development of software systems often can not really meet the needs of users.

3.2 Advantages and disadvantages of object-oriented methods

The advantages of the object-oriented approach:

(1) Easy programming. Because object-oriented is closer to reality, you can start from the real thing and make the appropriate abstraction;

(2) The object-oriented method can be reused well, and because it is to decompose large problems into separate small problem processing, reducing the technical difficulty of development, the management of development work has become easier, the development of large-scale software side of the easy, cost is also reduced.

(3) It is consistent with the way of thinking of human habits, which makes it easy for users and maintenance personnel to understand that there is no difficulty in understanding the user's use, maintainability is also high in software maintenance, and easy to test and debug.

(4) Object-oriented can make engineering more modular and realize lower coupling high cohesion thought;

(5) In line with people's understanding of the rules of things, systematic development of gradual, repeated changes to ensure a better user satisfaction.

The disadvantage of the object-oriented approach.

(1) The development process management requirements are high, the whole development process through the "modification-evaluation-re-modification" repeated;

(2) The object-oriented method shields the execution details of the object by means of information hiding and encapsulation, and controls the spread of the error, but when the error occurs, the cost of locating the fault is great, especially when the depth of inheritance is very large. It is very difficult to get a highly reusable object-oriented software system design for a system with frequent requirements change.

(3) Developers easily replace the prototype system analysis, lack of standardized documentation, not conducive to future maintenance.

Conclusion

The goal of software development is to develop software that meets the needs of users at minimal cost. Therefore, according to the actual demand of the system, different design methods are chosen for the specific situation, which can give full play to the advantages of the object-oriented and structured methods. The structured method is to model the function of the system, and to simulate the objective world from the internal function based on the function decomposition design system structure. Object-oriented approach is modeled from the point of view of behavior, based on the behavior analysis method to identify the object and the relationship between them, from the internal structure of the simulation of the objective world, it adopted a new concept, new methods, new forms of expression, to help software developers to deepen the understanding of the system, software development brings great benefits. Developers in the development practice, from the actual situation, consider the implementation of efficiency, the technical level of the developer, the size of the system, whether it is an easy to change the system and other factors, try to use their respective advantages, to avoid their shortcomings. For the development of some small embedded real-time monitoring system or the same stable small system, the use of structured methods, for the development of beginners, using a structured approach and object-oriented approach, for large-scale systems or requirements of the variable system, the use of object-oriented methods. In short, according to the actual starting, choose the appropriate software development method, to achieve the best development benefits.

A comparison of structured methods and object-oriented methods

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.