Decomposition and abstraction

Source: Internet
Author: User

To solve a problem, it is very important to solve the uncertainty. Generally, there are two methods: Decomposition and abstraction.

The so-called decomposition is to separate some definite parts in uncertainty, and then provide solutions to these identified parts first, while the uncertain parts are left to be resolved when specific problems are identified, the biggest feature of decomposition is localization determination. A typical usage of this method is a variety of tool libraries, such as the standard Io library for C language and standard class library for Java, these libraries are not limited to a specific field during design.

Another way to solve uncertainty is abstraction. The so-called abstraction refers to the generalization of the essential characteristics between them after analyzing various situations of uncertainty. This essential characteristic is the abstraction level, which is definite. The biggest characteristic of abstraction is the localization uncertainty; the typical usage of this method is various frameworks, such as the EJB framework, Spring framework, and hivemind framework.

The two methods have their own advantages and disadvantages. The advantage of the decomposition method is its flexibility because it processes partial certainty without making any assumptions about the overall uncertainty, the disadvantage is that there are too many specific problems left behind. The advantage of the abstract method is that it solves the entire abstract part, so only the difference part needs to be processed later. The disadvantage is that the abstract model must be accurate, if the actual problem does not match the abstract model, the abstract method will not be able to solve this problem, so there is a certain scalability risk. The first solution is mainly based on the "decomposition" method, which provides various basic tools that may be used to solve practical problems, such as various connectors, combination tools, and process combination tools, however, it does not provide abstract layers that are closer to the requirement layer.

The second solution is to combine the "abstract" method with the "decomposition" method. First, use the "decomposition" method to provide various basic tools, and then use the "abstract" method to abstract various business models based on actual needs, and use basic tools to implement these basic business models, it also provides a mechanism to control these business models.

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.