Reconstruction vs Reuse

Source: Internet
Author: User

Software reuse is the ultimate goal of many software methodologies. In reusable software, components are the most basic reuse unit. To achieve software reuse, you must start with Component reuse.

If you want a component to be reused, the component must meet two conditions: first, the component is well encapsulated by defining a clear interface; second, the component function must be powerful enough, can meet the needs of specific fields. The designers who need components must have a certain level of design to meet the first condition. This is not a problem discussed in this article. Here we will briefly discuss it. It is not easy to implement the second condition. Even if developers think hard, it is difficult to fully consider the requirements. What developers think is not necessarily the function that this component really needs to implement. Therefore, a component should start with its initial needs, and then carry out Function Iteration in each application system that uses it to mine reasonable requirements in the application system.

Function Iteration is a terrible thing. When you are not careful, you may create an incomprehensible monster. First, Function Iteration will make functions more complex. Second, Function Iteration is based on the original design, which is different from re-designing a complex function component. When a component performs a function iteration, if you only need to implement the current function, it will be difficult for you to face the next Function Iteration, even if you barely implement the function, the comprehensibility of components will also decrease. When the comprehensibility of a component is reduced to a certain extent, the component will end up.

Therefore, Function Iteration must be carried out at the same time with refactoring. While adding functions, the entire component must be reconstructed to maintain a clear and understandable object model, in this way, I will be able to calmly face the next functional iteration, and this component can continue to develop so that developers can continue to engage in the work they love.

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.