Structured approach and object-oriented approach

Source: Internet
Author: User

In today's software design, the main way is the two kinds of topics: structured methods and object-oriented methods, compared with two methods, we need to determine what they are first.

The definitions on the Internet are mostly similar, I'm just here to talk about my understanding of both:

First, the object-oriented approach.

1. The first secret of object-oriented approach is "object". In the world of object-oriented methods, every system is made up of countless objects. objects are the effective vectors for lowering a complex system down to each specific implementation. In an object-oriented approach, the object is the basic unit of every complex project, just like every small cell in a person. So how do you organize these objects together? In the course of software engineering, the use-case we learn, the use case diagram, is the best way to organize these units.

Then, the structured method.

1. Structured methods, which are also called process-oriented approaches, focus on the "process" in the system as a whole. In each process, the logic involved in this process is described and the manipulation of the data. In a structured approach, each process is the basic unit of the entire system. So how do you organize every basic unit in a structured way? Compared to the use case diagram, here is the flow chart. Here's an example of the flow chart we've drawn.

Having finished the definition of the two, we can see that the most essential difference between the two is the difference between the emphasis on the object and the process. Knowing the definition of the two, we can divide into several aspects to talk about the difference between the two.

    1. Sdlc

In the software life cycle, the traditional method of result use is the traditional method of software development, such as waterfall model. Discussion on the methods of traditional software development you can refer to my previous blog post. In this way, the whole process of software development is carried out around the whole system, is a step-by-step, each iteration of the entire system through the plan to maintain the entire process.

In object-oriented, we can make better use of the agile development approach mentioned in the previous blog, because both are consistent both in terms of method content and thought. This is also very natural, because agile development is only after the advent of object-oriented programming ideas to start to flourish. In the structured approach, software development is top-down, and in the object-oriented approach, software development is bottom-up. In an object-oriented approach, each object undergoes the process that the entire program passes through in a structured approach, and the whole process is iterative. In my opinion, this is a very ingenious way for software development to solve the drawbacks of large-scale project cumbersome, and it is very effective.

By contrast, because of the differences in the SDLC, we can see that, under the object-oriented approach, software can begin programming at the design stage, and in a structured approach, the software must be completed before the design can be implemented. Subsequently, we have to admit that the object-oriented approach to design requires programmers and designers have good cooperation and high level.

    1. Scalability

In a structured approach, programmers must fully examine the entire program as they expand the program, involving a lot of programming effort, the flow of data between functions, and the complexity of the interaction, and the change is usually holistic; In an object-oriented approach, programming only needs to change the object in question.

    1. Re-usability

In the reusability, because of encapsulation, inheritance, polymorphism of the existence of ideas, only need a small change can directly invoke the class, to achieve similar functions. Suppose we want to implement the component module, we can decompose this task into small components, and the window, panel and other objects are encapsulated, can be reused directly. For structured software design, it is difficult to find a function that serves a function directly, because the function is not abstracted when programmed.

    1. Maintainability

In terms of maintainability, object-oriented abstract encapsulation makes object information hidden locally. The reason is the mutual independence of objects in the object-oriented method. 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.

Finally, summing up the above differences and connections we can draw some significant advantages and disadvantages to guide us in the future of software development of the two methods of choice.

Reference documents

[1] Software development methodology--a comparison between structured methods and object-oriented methods Wang Hanhao, Sega, Shang-Science and technology information, 2011 (13): 77-78

[2] comparative analysis of structured methods and object-oriented methods Zhangli, Qiu-Journal of Shaanxi Normal University (self-scientific edition), 2001, 29 (2): 29-32

Structured approach and object-oriented approach

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.