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

In the process of software development, there are two main methods of development, namely, structured development method and object-oriented development method, this article will introduce and compare two development methods.

A Introduction to Structured methods

Structured method, that is, process-oriented development is the first and most traditional software development methods, from the structural analysis, structural design and structural programming three parts of the organic combination, it will be divided into several processes of software development, is by far the most common application of information systems, the most mature software development method.

1.1 Structural Analysis

Structural Analysis (SA) is a function-oriented or data-oriented approach to demand analysis, which is part of the structured approach and is developed by the 1960-70 's system analysis technology. It gives a set of principles and techniques to help analysts analyze and function specifications, using data flow diagrams, database dictionaries, structured languages, decision tables and decision trees to generate easy-to-understand graphics to express user needs.

The steps for structured analysis are as follows:

① design a streaming diagram to reflect the current physical model, based on the current situation

② an equivalent logical model of a streaming graph based on the physical model's flow graph analysis

③ the logical system design based on the logical model of the flow chart

④ establishes human-machine interface to facilitate human-computer interaction and determines the target physical system's flow chart

⑤ analysis of the various design options, resulting in various program cost and risk levels

⑥ Choose a scheme based on the cost and risk level of the various schemes

⑦ establish a complete requirements specification based on the selected scenario

The structured approach decomposes a complex problem from top to bottom by structural analysis, thus turning a complex big problem into a small problem that people can solve easily.

1.2 Structural Design

Structured design (SD) is a data flow oriented design method, which is designed to determine the structure of the software. Its basic idea is to use the modular design principle to build a good module structure diagram according to the results of structural analysis. The design must implement all the display requirements in the analysis model and the implicit requirements that the user wants. And the design is good readability for implementation, testing and maintenance.

Structured design is divided into two stages of summary design and detailed design, in the outline design, the main task is to design the software structure to complete the structure analysis of the system's functional requirements, and ultimately form a software module structure diagram. In the detailed design, it is necessary to determine the algorithm and data structure of each module in the software structure diagram and give a clear description of the detailed design stage through some kind of expression tool.

1.3 Structured programming

Structured programming (SP) is the basic principle of detailed design which is based on module function and process design.

Its three basic structures are: sequential structure, select structure and loop structure, in which the sequence structure indicates that the operation in the program is executed in the order of occurrence, the selection of the structure represents the process of the program branch, you need to select one of the branches to execute according to the conditions, The looping structure indicates that the program needs to perform some operations repeatedly until a certain condition is reached before terminating the loop.

It uses three kinds of basic control structure to construct the program, strictly control the use of Goto statement, so that the program is more clear, with better program quality.

Two Object-oriented approach

Object-oriented approach (OO) originates from object-oriented programming language (OOPL), which is a systematic approach to the application of object-oriented thinking in software development and the development activities of software. It is based on the concept of "object". An object is a program module, a package of data and operations allowed by the data that corresponds to an entity of the objective world. The so-called object-oriented is based on the object concept, with the object as the center, with the class and inheritance as the construction mechanism to recognize, understand, depict the objective world and design, build the corresponding software system. The object-oriented approach mainly includes object-oriented analysis and object-oriented design, and object-oriented implementation of the three major parts

2.1 Object-Oriented Analysis

Object-oriented Analysis (OOA) is a new method of system analysis, which is analyzed according to the object-oriented thought, based on the design principles of abstraction, encapsulation, inheritance, classification, Aggregation and association, and finally obtains three kinds of functional models (functional model, object model, dynamic model).

The basic steps for object-oriented analysis are:

① Determining the problem domain

② Area Classification and objects

③ distinguish the whole object and component, determine the relationship and structure of the class

④ Defining properties and services

⑤ to determine additional system constraints

2.2 Object-oriented design

Object-oriented design (OOD) is a software design method, which is further normalized according to the results of object-oriented analysis, so that it can be used directly in object-oriented implementation.

Its main tasks include:

① object Definition Rule refinement: For object-oriented analysis of abstract objects, classes and collections of analytical documents, object-oriented design according to the design requirements of the collation and refinement, so that it satisfies the object-oriented programming needs of the classification and object

② data Model and database design: Data model design needs to complete the definition of class and object properties, decide how to connect the message, design system access, etc. Also, the data for each object instance is implemented into the object-oriented library structure model

③ optimization: The optimization design process of object-oriented design is to summarize the analysis result and processing business process from another angle, and optimize including the optimization, abstraction and integration of object and structure.

Object-oriented design includes two stages of high-rise design and low-level design, in the high-level design, the structure of the system needs to be designed and the overall model of the system is constructed. The underlying design is a detailed design of classes, so that each class can form a single-concept model, and the parts that are designed are reusable and reliable.

2.3 Object-oriented implementation

Object-oriented implementation (OOI) is based on object-oriented design, the implementation of software functions, including the implementation of the internal functions of the object, the implementation of the system interface, that is, the object-oriented design phase of the design of the part of the programming implementation.

Three Comparison of two development methods

Same point

    1. Both of them follow the abstract principle in the process of software development, they need to decompose the problem to solve, the two are consistent in the application of decomposition and abstract principle.
    2. There is consistency in the localization, do not want part of the software too much affect the other parts of the software, in the structured method is mainly through the separation of code and data implementation, and in the object-oriented through the data and operation of the package to achieve localization

Different points

1: Different basic units for dealing with problems

In the structured method, the basic unit of dealing with the problem is a module that can express the process clearly, but in the object-oriented method, the set of objects is used as the basic unit to deal with the problem.

2: Hierarchy logic is different

Structured method emphasizes function abstraction and modularization in the process of analysis, it treats the problem to be solved as a system to analyze and solve. Through the design of the function of the system, the problem is resolved from large to small, from top to bottom continuously subdivision, forming a tree-like hierarchy, that is, the structure of the functional subdivision is layered, the structure of the previous layer is often only the next layer of the structure of interaction, that is, the nth layer only consider its relationship to the n+1 layer, Without further consideration of the relationship with section n+2. The functions of the same layer can be "with" or "or", and they work together to complete the function of the previous layer.

In the object-oriented approach, the whole system is decomposed into collections of objects rather than functions, and each object's responsibilities are determined, and the different objects work together to accomplish specific tasks. Compared with the structure, the structure of the object is not the hierarchy in the structured method, that is, the dependencies of the upper and lower layers in the structured method do not exist in the object-oriented, and the object-oriented can package the change well, the outside world simply uses the interface provided by the object, without considering the implementation of the structure.

3: Different data processing methods

Structured method is directly through the process of data processing, and in the object-oriented approach, the data and operations packaged into a whole, in principle, other objects can not directly modify its data, that is, the data in the object can only be modified by its own member functions.

Both the structured method and the object-oriented method are widely used development methods, each has different characteristics, and understanding these features can help us to choose the appropriate development method in the process of software development, improve the development efficiency and the quality of the software.

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.