The comparison between the structured method and the object-oriented method

Source: Internet
Author: User

The comparison between the structured method and the object-oriented method

A well-known software crisis erupted in the middle of the last century. In order to overcome this crisis, the term "software Engineering" was presented at the two renowned NATO conferences held in 1968and1969 years , And in the future continue to develop and improve. At the same time, software researchers are constantly exploring new approaches to software development. So far, eight kinds of software development methods have been formed. In this paper, two methods--structured method and object oriented method are compared.

First, structured methods.

1. basic ideas. The basic key points of the structured method are : top-down, step-refinement, modular design, structured coding.

The structural analysis method is based on the top-down, the gradual refinement as the base point, with a series of practical test is considered to be the correct principle and technology as a support, with Data flow chart, database dictionary, structured language, decision table, decision tree and other graphic expression as the main means, The software analysis method which emphasizes the structure rationality of the development method and the structure rationality of the system.

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.

structured method divided by software life cycle, structured analysis (SA), structured design (SD), structured implementation (SP). It should be emphasized that the structural methodology is a system of ideological standards, although there are clear stages and steps, but also integrates a lot of principles of things, so learn the structure of the method, not only from the theoretical knowledge to understand enough, to more or practice slowly understand the guidelines, Slowly turn it into your own methodology.

Streaming diagram: Reflecting the logic function that needs to be done in the system, it is a function model, which is usually produced in the requirement analysis stage. The flow chart can be divided into top-level streaming diagram, middle-layer streaming chart and underlying streaming diagram. The top level Data flow diagram uses a processing to represent the whole system, the output stream and the input data stream are the input and output data of the system, indicating the range of the system. The middle layer of the streaming chart is a process in the upper layer of a processing to further refine, and the level of the flow chart of some processing can be refined again, into another sub-flow chart. The underlying streaming diagram is generally no longer able to decompose the streaming diagram.

Data dictionary: A data dictionary is used to define data items, data structures, data streams, storage, processing, and so on, in order to describe the individual elements of the data flow diagram in detail.

Decision Tree: Also known as tree, is a graphical tool to describe processing, suitable for describing problems in the processing of multiple judgments, and each judgment and a number of conditions. When using the decision tree Description, we need to subdivide the judging conditions and decisions, find the subordinate and side relation of the judging condition, and build the decision tree based on this.

2. The basic principles that are followed.

(1) abstract principles

abstract principle is the basic principle that all systems scientific methods must follow. It focuses on grasping the essential content of the system and ignoring the content that is not related to the current goal of the system it is a basic cognitive process and way of thinking

(2) Decomposition principle

The principle of decomposition is the most basic principle in the structured method. It is a kind of first-general after-local thought principle in constructing information system model, it adopts top-down layered solution method.

(3) principle of modularization

Modularization is a concrete application of the most basic decomposition principle of the structured method. It mainly appears in the structural design stage, its goal is to break down the system into several modules with specific functions to complete the functions specified by the system.

Second, the object-oriented approach.

1. Introduction. The object-oriented approach (object-oriented method) is a systematic approach that directs the development activities of the object-oriented idea to the software development process , or 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.

2. Basic Concepts.

Packaging

Encapsulation separates the design and use of objects, and the user does not have to know the implementation details of the object to access it. It is mainly used for the description of classes, which makes the class an independent module with its own properties and methods of operation, while the interaction between classes is minimized.

Inherited

Inheritance is a mechanism for sharing data and methods between classes, and subclasses can inherit parent class methods and properties. The existence of the inheritance mechanism reduces redundant code and enhances the reusability of the system and class.

Polymorphic

Polymorphism makes the same operation work on different objects, can have different interpretations, and produces different execution results. The problem of tight coupling in the project can be solved by using polymorphic mechanism to improve the expansibility of the program. The application no longer has to write functional calls for each derived class, only the abstract base class is processed, which improves the reusability of the program. The functionality of a derived class can be called by a method of the base class, which enables backward compatibility, which improves the maintainability of the program.

3. Features.

(1) emphasize the integrity and overall of the system development.

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

(3) The development cycle of the system is long.

(4) encapsulation. The concept of objects breaks through the separation of traditional data from operations. Objects act as independent entities, enclosing free data and operations to make their state and behavior localized.

(5) inheritance. Inheritance is object-oriented and the most powerful mechanism. Class inheritance can compensate the problem of data or operation redundancy caused by encapsulated object, and realize software resource sharing, evolution and augmented expansion through inheritance support reuse.

(6) polymorphism. Sending the same message to different classes or objects can cause different operations, making software development and design more convenient and coding more flexible.

(7) Ease of maintenance. Object-oriented abstract encapsulation makes object information hidden locally. When the object is modified, or the object itself produces an error, the resulting effect is confined to the inside of the object without affecting the other objects or even the whole system environment, which greatly facilitates the software design, construction and operation of the process of detection of errors, modifications.

Third, the comparison.

Similarities :1. The two are consistent in the decomposition and abstract principles. 2. consistency in the design of localization and reuse.

Difference:

1. the starting point of dealing with the problem different structural methods are emphasizing the process abstraction and modularization, the process as the center structure 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 .

2. The basic unit of dealing with the problem and the hierarchical logical relation different structured methods abstract The problem of the objective world into the process that the computer can deal with, the basic unit of the problem is the module that can express the process clearly, and summarizes with the hierarchy structure of the module. The relationship and function between modules or modules; object-oriented approach is to use computer logic to simulate the physical existence of the view-world, with the object collection class as the basic unit of processing problems , can make the computer world closer to the objective world, so as to make the problem more straightforward to deal with, The object-oriented approach is to use the hierarchy of classes to represent inheritance and development between classes.

3, data processing methods and control procedures are different . The structured method is to process the data directly through the program, and after processing is finished , the results can be displayed , and in the control program mode, it is not free to navigate according to the design call or return program, and the relationship between the modules is controlled and controlled. Object-oriented methods encapsulate 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 functions, the control method is through the "event drive to activate and run the program.

Iv. Conclusion. The goal of software development is to develop to meet the needs of users at a minimum cost. the software. For this,according to the actual needs of the system,choosing different design methods for specific situations,can give full play to the advantages of object-oriented and structured methods. Currently in the analysis and design process of most software systems,Both of these methods are both. Developers in the development practice, starting from the actual, Consider the efficiency of execution, the technical level of the developer, the size of the system, the system for changing requirements, and other factors, make the best use of their merits, to avoid their shortcomings. For the development of some small embedded real-time monitoring system or the same stable small system, A structured approach is available; For developers who are beginners, combined with a structured approach and an object-oriented approach, for large-scale systems or requirements-variable systems, use the object-oriented approach. Anyway, according to the actual departure, Choosing the right software development method, achieve the best development benefits.

"1"http://wenku.baidu.com/view/861ce9b91a37f111f1855b74.html

"2" Software development Method--the comparison between structured method and object-oriented method--sci-tech information Wang Hanhao Sega Sheng Shang

The comparison between the structured method and the 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.