Design Pattern Parsing Notes-Chapter I

Source: Internet
Author: User

Traditional software analysis methods: Functional decomposition. The analyst breaks the problem down into multiple functions, "functional decomposition," which is called a step (these steps form the problem).

disadvantages of the decomposition method : 1. It usually leads to a main program responsible for controlling subroutines, which is a natural consequence of decomposing functionality into multiple sub-functions. However, the main program has too many tasks: to make sure everything is working correctly, coordinate functions and control their sequencing.

2. Another problem with the functional decomposition approach is that it has little to do with the appropriate improvements in the code to anticipate future changes that may occur. Are there too many details of the function to follow, such as the logic to be implemented, what to interact with, and the data to use? Like people, if a program tries to focus on too many things at the same time, it can only wait for a bug if it changes. Although it is not possible to predict what will happen, it is often possible to anticipate where changes will occur.

When using functional decomposition, changes in requirements can have a significant impact on software development and maintenance efforts. at this point, the main focusis on the function (the focus is misplaced), and the modification of a set of functions or data affects other functions and data, and so on other functions that must be modified. Focusing only on functions results in a series of changes and is difficult to avoid.

One of the great advantages of object-oriented is that you can encapsulate these areas of change to easily isolate your code from the effects of changes.

Design Pattern Parsing Notes-Chapter I

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.