In the beginningCodeWe lack experience when converting to software. Code bloated,BugIt is difficult to maintain and expand. As time passes, we have become better software designers. We can learn from our own mistakes and write more flexible software. We learn to consider issues from the user's perspective and improve and strengthen the software. We learn to abstract some objects from the design and learn to write comments and related documents, make the software more maintainable. When designing the software, we learn to consider the current and future needs, so that we can handle some changes with ease.We learned to consider more issues. We are maturing. However, eXtreme Programming tells us that we often design too much software, and we often spend a lot of unnecessary time on early design.
Mode and extreme programming (XP), Providing great help for software development. But so far,XPA lot of attention is paid to refactoring, and we never mention pattern.
InXP, One of the most important concepts is refactoring. With refactoring, we can avoid considering redundant design and requirements at all. We can minimize the size of code and increase the development speed.XPSaid, "do the simplest thing that may work ". In actual development, in order to make the software more flexible, many designers choose to use a large number of design patterns. One of the purposes is to avoid future refactoring.XPThe concept is contradictory.
In fact, the design pattern does not conflict with the refactoring of XP . XP is more suitable for rapid development of small and medium-sized projects. Refactoring can be used to achieve this goal. But if the demand changes frequently, why not use the design pattern? Introduce the design pattern in extreme programming, and XP may be more successful.