Comparison between structured method and object-oriented method

Source: Internet
Author: User

The purpose of this blog is to make a comparison between a structured approach and an object-oriented approach through basic concepts, key features, and development models chosen for projects that require change.

Software development method refers to a variety of software development strategies, which are designed and implemented to meet users ' requirements in terms of project investment scale and time limit, according to the characteristics of software development. Both the structured method and the object-oriented method are the common software development methods in computing technology, the two development methods have pros and cons, and the choice of which method depends on the proficiency of the analyst and the specific type of the project.

1 Structured development approach

The structured development method is a traditional method of software development, which is analyzed and designed by the principle of user supremacy, structure, modularization and top-down system with the thought of system engineering and engineering method. The structured development method, also known as the life cycle method, is the most traditional and widely used information system development method so far.

1.1 Basic Ideas

The basic idea of structured development method is the decomposition and abstraction of software function.

The system is divided into several sub-function modules according to the functional requirements, and the sub-modules are further decomposed into sub-modules, and then the function decomposition is carried out from the top down. The result of decomposition will produce a series of functional modules, and with the development of decomposition level from high to low, the function of module is to be closed by abstraction, which becomes single from synthesis.

1.2 Basic Points

1.2.1 from top to bottom

The complex large problems are decomposed into relatively simple small problems, find out the key points of each problem, and then use precise thinking to describe the problem qualitatively and quantitatively.

1.2.2 Gradual Refinement

The real problem is solved several times by abstraction (thinning), and finally only some simple algorithm description and algorithm implementation problems can be resolved.

Modular design of 1.2.3

The result of stepwise refinement is to get a series of algorithm descriptions based on function blocks. In order to design the function block, the method of solving the algorithm is called Modularization. The purpose of modularization is to reduce the complexity of the program, so as to simplify the operation of programming, debugging and maintenance.

1.3 Development Process

In a waterfall model of structured software development methodologies, the project team first analyzes and then prioritizes requirements and requirements. Next, in the design phase, the detailed design is based on the requirements specification. The code implementation is then executed. The code is implemented with reasonable data for implementation and testing for end-user evaluation. The final phase involves evaluation and maintenance, which ensures that everything runs smoothly.

Therefore, the software development process has undergone a series of five basic stages: planning, analysis, design, implementation and operation. Each phase of these phases also includes a series of steps or activities that rely on some technology to produce the required deliverables. The project team may move logically continuously, incrementally, or iteratively to a stage or step.

2 Object-oriented software development method

Object-oriented approach (object-oriented Method) is a kind of object-oriented thinking in the software development process to guide the development activities of the system approach, is based on the concept of "object" on the basis of methodology.

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 starting point and basic principle of object-oriented approach is to construct systems from things inherent in the objective world, to promote the use of human thinking methods used in real life to understand, comprehend and describe objective things, 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.

2.1 Development Model

The object-oriented approach follows the iterative and incremental approach to system development. The system development life cycle is considered to consist of several increments or phases: start, elaboration, construction, and transition. This is a bottom-up and top-down approach, based on object modeling, taking into account not only the input and output data structures, but also the data structure of all objects.

2.2UML

Object-oriented approach using unified Modeling Language UML(Unified Modeling Language). It focuses on three architectural views of the system: functional, static and dynamic. All graphs are iteratively refined until the requirements of the information system are fully understood.

The feature view describes the external behavior of the system from the user's perspective. Use cases and use case diagrams to describe functional views. Static views are described by attributes, methods, classes, relationships, and messages. Class responsibility Mark (CRC) cards, class diagrams, and object graphs are used to depict static views. Dynamic views are represented by sequence diagrams, co-plots, and state diagrams.

2.3 Demand Analysis

In the object-oriented development method, the requirement analysis process is consistent with the formation process of the system model, and the discussion between the developer and the user begins with the entity, that is, the developer must clearly understand the real system in order to export the system model, which makes the information exchange between the user and the developer more unobstructed, thus avoids the problems that may arise in the requirement

2.4 maintainability

In an object-oriented language, a subclass can inherit not only the properties and behavior of the parent class, but also the behavior of the parent class. Using this feature, the designer can easily modify the function: introduce a subclass of a class and rewrite the behavior to be modified. Because the modification is no longer introduced in the original program module, the modification of the software is improved, and the maintainability of the software is improved.

main characteristics of 2.5

2.5.1 Package Nature

Encapsulation is an information concealment technique, which is embodied in the description of the class and is an important feature of the object. The purpose is to separate the object's designer from the object's use, and the user does not have to know the details of the behavior implementation, but only accesses the object with the information provided by the designer.

2.5.2 of inheritance

Inheritance is the mechanism by which subclasses automatically share data and methods between parent classes. The objects of the class are closed, and if there is no inheritance mechanism, the data and methods in the class object are duplicated. Inheritance not only supports the reusability of systems, but also facilitates the extensibility of the system.

2.5.3 Polymorphism

When the same message is accepted for different objects, it can produce completely different actions, known as polymorphism. The implementation of polymorphism is supported by inheritance, and with the hierarchical relationship of class inheritance, the protocol with general function is stored at the highest possible level in the class hierarchy, and the different methods of implementing this function are placed at a lower level.

3 key differences in two software development methodologies

3.1 Starting point

The starting point of structured method is "How to do", that is, how to solve this practical problem by computer. The abstraction from practical problems to mathematical models is all about "how to do". The focus of the structure method is system function, the key point is the function decomposition of the system, the key is to establish the function model. That is, from the top down to function decomposition, gradually refinement, which is from the abstract to concrete, from the outline to the details of the process.

Object Oriented (OO) The starting point of the method is "what" is the actual problem to solve, it is "what", the object-oriented approach is the object of the system, the main point is the abstraction of object characteristics, the focus is to establish the object model. The object-oriented method needs the top-down decomposition and the self-low-upward construction, which is from the general to the concrete, from the concrete to the general process, through the choice of the class gradually refinement.

3.2 Implementation focuses on

Implementations in a structured approach focus on writing code. Implementations in an object-oriented approach can be simplified to create instances of classes, develop new classes, and make connections to these objects so that they can communicate with each other.

3.3 Reuse

A structured approach rarely considers reuse issues. The object-oriented approach is essentially a software development method based on reuse.

In addition, the object-oriented approach holds that a class logically contains both data and functionality. It replaces the notion that an entity can only define data, and that inheritance supersedes the subtypes of entity relationships. The processing analysis diagram describes the message transfer between instances of different classes, replacing the streaming diagram. Traditional entity diagrams are replaced by class diagrams and hierarchical graphs of classes. The object-oriented approach emphasizes the data structure and makes the development process more stable.

3.4 Requirements Change

The object-oriented approach to software development has a decisive advantage over traditional methods in dealing with complexity, most contemporary languages and tools are object-oriented, and the object-oriented approach is generally preferred for large projects that frequently change requirements specifications.

Fig 1

Figure 1 shows the number of large projects that failed with the waterfall model and the object-oriented model, respectively, when there is a requirement specification with frequent changes to the software project. Obviously, projects with an object-oriented development model at this time have a smaller failure rate than projects that use a traditional structured development model (waterfall model).

Fig 2

Figure 2 shows the deviation/cost of the development phase that is affected by the structural model (helix) and the object-oriented model for small projects that do not have the requirements specification change during development. We can observe that traditional models, called spirals and object-oriented models, provide the same efficiency in most development phases . Object-oriented model costs are too high compared to spirals . Therefore, we can assume that traditional software development models such as waterfalls , spirals, and incremental models are feasible to develop small projects with stable requirements specifications.

4 Conclusion

As with any technology or tool invented by humans, all software development methods have limitations. At present, there are two main methods of software engineering development: Structured method and object-oriented method.

The structure method has the characteristics of clear development thought, easy to learn and use, distinct module, easy to develop and debug, and the program is readable and strong. But the program is more fixed, the interface is simple, the use of long cycle software. Structured development methodologies are feasible in terms of consolidation, deployment and maintenance, but are limited to small projects with stable requirements specifications. This approach allows software developers to focus on decomposing larger algorithms into smaller ones. But traditional methods such as waterfalls, spirals lack flexibility to handle object-oriented models.

The object-oriented approach makes full use of the encapsulation of objects, and the inheritance and polymorphism make the reliability, reusability, expansibility and maintainability of the software fully embodied. The object-oriented development approach is best suited to projects that imply the use of emerging object technologies to build, manage and assemble these objects into a useful computer application system.

In fact, a truly practical approach to system development is often a combination of multiple development methods. How to integrate the application, according to the size of the development system, the complexity of the system, the characteristics of the system development methods, as well as the computer software can be used to consider a number of factors after a comprehensive decision.

Reference documents:

[1] http://baike.baidu.com/link?url=jgu_iZed2EZaje-WzQlS673XI2jIa1IhaJEgUAeMhRqjlO5WZAsi8B6YfDl905G_ 3izyaxu5rhiudzcm40tdfbnkzkc6zy6cycwwbhzrblmiidpfhljjd-tavvxfwt64dd88hfr5itzgi8zl7l9v0q

[2] Http://baike.baidu.com/link?url=qx4kSRoPDVSPxH1luWH0pEQm0SpMCsLzauQ9IU-ZQT0YaagISBZw1ksQiQSMDDcBZi8Lo_ Zq3vlcmfobf9o3oqx2fubak42cde0qakkvugm9dyfsra2be2blicmlmjzdmfrb35z0ekldjvcmzbrona

[3] http://baike.baidu.com/link?url=hgf-729zQDNnatBUhiCPBtG_mDJJSZhlwVKaoifFt28n0_ jxf4haw2fxjfg1ib49p5zq27qerjolnrg8huruv_jbgrgoq6pcdwbdofh1dk_ykhsnfw8khiiyrmms91crc4-j0b1ytaqf6ucqzzcrdskd3n2- _m5fn1rmfsr5d_e

[4] Wang Ju Talking about the development method of structure and object-oriented software "TVU Science and Technology" 2007 year 6 month 2 period

[5] Wang Hanhao , Sega , Shang , Software development Method--a comparison between structured methods and object-oriented methods , the Science & Technology information " . Year No. - period

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.