Comparison between structured method and object-oriented method

Source: Internet
Author: User

Comparison between structured method and object-oriented method

Introduction

Structured Methods ( SD method) is a traditional software development method , which is composed of structural Analysis , structural design and structured programming Three-part organic combination. Its basic idea: the solution process of a complex problem is carried out in stages, and this decomposition is top-down, decomposition by layer, so that each phase of the problem is controlled by people easy to understand and deal with the scope .

Object Oriented Method (object-oriented Method) is a kind of object-oriented thinking in the software development process, guiding the development activities of System Method , Short OO (object-oriented) method is a methodology based on the concept of " object " . 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 . the object-oriented method 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 difference between the two

First, they have different starting points when dealing with problems.

structured approach is to emphasize process abstraction and modularity, process-centric construction or The objective world problem, it is a process-oriented development method; object-oriented approach emphasizes It is the problem of dealing with the objective world in accordance with people 's usual way of thinking that the point of problem domain is directly mapped to the interface between object and object .

Secondly, the basic unit of dealing with the problem and the level logic shutdown are different.

The structured approach abstracts the problem of the objective world into a process that the computer can process, where The basic unit of the problem is the module that can express the process clearly, with the hierarchical structure of the module to summarize The relationship and function between modules or modules; The object-oriented approach is to use computer logic to simulate The physical existence of the guest world, taking the collection class of objects as the basic unit to deal with problems , and can Can make the computer world closer to the objective world, so that the problem is more straightforward to deal with, the orientation of the image method is to use the hierarchical structure of classes to reflect the inheritance and development between classes .

Again, data processing methods and control procedures are different.

The structured method is to process the data directly through the program, and the processing results can be displayed after processing, and in the control program mode, it is not free to navigate according to the design call or return program . there is a control and control relationship between each module program, and the object-oriented method encapsulates the data with the corresponding code as a whole, in principle other objects cannot directly modify their data, that is, the modification of the object can only be done by its own member function, the control method is through " Event-Driven " to activate and run the program .

Four is, the analysis design and the code conversion way is different.

The structured approach emphasizes the transformation of rules between analysis, design and coding, which is a kind of joint connection between the analysis, design and coding of the software life cycle. The object-oriented approach from analysis to design to coding uses a consistent model representation, through the software life cycle analysis, Design and coding is a smooth process, that is, to achieve a seamless connection .

Comparison of advantages

the structure method in the program design, first consider the problem big aspect, after has determined the main direction, then Youbiaojili deeply to the question concrete detail, from easy to difficult, solves the problem by layer, causes the entire program design process from vague to clear, from the generalization to the concrete. The structure method emphasizes function abstraction and modularization, and adopts the method of block processing, which can decompose a more complicated problem into several easy-to-solve parts, thus reducing the difficulty of problem processing. Because the structured method is clear, clear, and effectively decompose the complex problems, making the program clear and concise, simplifying the programmer's complicated work, while reading can also be one go, giving people a clear feeling. the object-oriented approach is consistent with the human habit of thinking, making it easy for both the user and the maintainer to understand the difficulty when users are using it, and is also highly maintainable in software maintenance and easy to test and debug. Its stability is good, the local modification of the software, will not cause the overall change, and the local modification is easy to achieve. It is good reusability, and because it is the big problem decomposition into a separate small problem processing, reduce the technical difficulty of development, development work of the management has become easier, the development of large-scale software becomes easy, the cost is reduced. The object-oriented approach is based on the problem of the system modeling, reducing the cost of use, so that users in the use of a new software, the shortest possible time to understand how to use the software correctly and clearly.  

In the process of writing, the structure of the method has a relatively strong advantages, it is clear-minded, well-organized, clean steps, easy to read and understand, and in the user-oriented approach, the OO approach is easier to understand, it is simple to operate, the interface is clear, making software use easier.

Comparison of disadvantages

Prior to the description of the nature of the problem, the structured method has been divided into more and more complex information, which requires the system analyst to have a " global View " capability. Can directly grasp the nature of the problem through the appearance of the problem. When the software project is small and the system analyst ability is high enough, the structured method can quickly find the simplest and most efficient logic model. The structured approach has limited help with complex problems, but it helps to validate the initial high-order model of the system using a system analyst oriented analysis approach. Object-oriented methods always try to abstract out more common classes, so it is very important for system analysts to abstract things and grasp the direction of the initial analysis, it is often difficult to control the level of abstract objects, granularity, or even abstract and the nature of the problem is beyond recognition of the object model, Mastering the difficulty is higher than the structural analysis method. The object-oriented method blocks the execution details of the object by means of information hiding and encapsulation, and controls the spread of the error, but the cost of locating the fault is great when the error occurs, 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. Conclusion: The structured method and the object-oriented method are not antagonistic, no one is advanced who is outdated, no matter what kind of design method, the correct definition of demand is the prerequisite for the development of a successful software system, so appropriate use of methods to solve the problem, It is a fundamental problem to pay attention to the cost and value of using methods in the application.

Conclusion

In summary, the goal of software development is to develop to meet the needs of users at the lowest cost the software. To this end , according to the actual needs of the system , The specific circumstances of the choice of different design methods , Can give full play to the advantages of object-oriented and structured methods. At present, in the analysis and design of large majority of software systems , both methods are both.  

The author thinks, the developer in the development practice,starting from the actual, consider execution efficiency, development the level of the system, whether it is a system of change of demand and other factors, try to use the advantages of each of them, to avoid their shortcomings. For the development of some small embedded real-time monitoring control system or the same stable small system, A structured approach is available; For developers who are beginners, Use knot The combination of the method of construction and the object-oriented method, for large-scale system or the requirement variable system, make using an object-oriented approach. Anyway, according to the actual departure, Choosing the right software development method, reach the best development benefits

Comparison between structured method and object-oriented method

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.