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.