First, let's take a look at the entropy increasing law. Baidu encyclopedia's description is:
"Isolated systems always tend to increase entropy and eventually reach the maximum entropy state, that is, the most chaotic and disordered state of the system. However, for an open system, because it can transfer the entropy produced by the internal energy exchange by releasing heat to the environment, the open system may tend to decrease entropy and reach an orderly state ."
"The combination of Entropy Theory and probability theory produces a metaphysical philosophical guiding significance: the greater the degree of confusion of things, the greater the probability ."
In general, the system will become increasingly messy over time.
Specific to the software system, over time, whether it is development or maintenance, it will increase the complexity of the system, the more code to enter, the more likely to cause confusion, the more vulnerable the software architecture is. Therefore, the software architecture should consider how to resist entropy increase in design.
In general, I think we can reduce the generation of entropy in four aspects.
First of all, it is natural to start from the architecture design itself. In architecture design, we must fully consider future variability and isolate the changeable part. The design principles and architecture methods are used to grasp the evolution direction of the architecture from the software as a whole, so as to identify the impact of development and maintenance on the architecture in advance.
Second, the architecture must have a consistent understanding in the team. In particular, any developer in the technical team should fully understand the software architecture, clarify the position of their code in the whole, the relationship with other components and communication channels. Regardless of the development model used, the importance of architecture in developers' cognition should not be abandoned. Only in this way can component developers perform local design under the overall architecture and maintain the continuity of the architectural style. Otherwise, local structures may not conform to the overall architecture, leading to system confusion.
Thirdly, the design review or code review can effectively reduce the occurrence of entropy. Design Review is the prevention before implementation, and code review is the quality guarantee in implementation. Both of them can guarantee the consistency of the architecture, and can reverse the adjustment of the architecture in specific implementation, it is a common management method adopted by architects and technical managers.
Finally, we will take the initiative to adjust the architecture. It is impossible for architects to predict the future. When changes come, they must actively adjust the architecture to adapt to changes, instead of passively accommodating the changes, and rely on code skills to cope with changes. In that case, entropy has been automatically increased from the architecture, which is the source of chaos.
Although the above four aspects cannot completely resist entropy increase, at least the entropy increase can be reduced, which deserves sufficient attention in architecture design and software development.
-- Welcome to reprint, please indicate the source of http://blog.csdn.net/caowenbin --