Simple design principle in extreme programming

xiaoxiao2021-03-06  108

Simple design principle in extreme programming

1. Consider the easiest thing to work The first job in the XP team is to achieve the first user needs in a simple manner as possible. Find as much as possible to achieve the easiest design of current user needs. When implementing the current user needs, if you can use a flat file, you don't use the database or EJB; if you can use a simple Socket connection, you will not use ORB or RMI; if you can use it if you can use it. 2. Suppose it will not need some infrastructure XP teams that may not start from the infrastructure, they may not first choose to use the database or middleware. At the beginning, it is assumed that those infrastructure will not be required. Only there is evidence, or at least very obvious signs indicate that it is now introduced more than a more cost effective than continuing to wait. 3. Eliminate duplicate code No matter where you find duplicate code, you should eliminate them. When those repeated code are found, they can be eliminated by defining a function or base class. Sometimes two or more algorithms are very similar, but there is a subtle difference between them, turn them into functions, or use the Template Method mode. The best way to eliminate repetition is abstraction. After all, if the two things are similar, there must be some abstraction to unify them. The elimination of repetition will force the team to extract many abstractions and further reduce the coupling between the code.

转载请注明原文地址:https://www.9cbs.com/read-102903.html

New Post(0)