A long time ago, I used several famous books, agile software development, design patterns, big talk design patterns, refactoring-improving the design of existing code, and Lightweight J2EE enterprise application practices- struts + spring + hibernate integrated development, etc, then I want to build a project to integrate the above knowledge. Now I want to write out the project design ideas.
Package Design
It is best to follow the six principles of package design. Add cohesion in the first three aspects: 1. Reuse and release equivalence principles; 2. Common reuse principles; 3. Common closure principles. Added decoupling in the last three aspects: 4. The principle of no-ring dependency, 5. The principle of stable dependency, and 6. The principle of uncertain abstraction. For details, see section 4th of Agile Software Development (page 1)
For example
Brief description: The facade Mode means that the client can obtain many underlying class functions only by dealing with one class, for example, a class in the service can call some functions of many Dao classes in the DaO package. If the client wants to use these functions of these classes in the DaO package, you only need to deal with the service class.
Bridge Mode: allows the service package to have classes with different functions, and also allows Dao to have classes with different functions. To get different products, assemble these classes, for example, if a class in the service package is added to the parent class of some classes in the DaO package, different Dao classes can be injected into the class of the service package, implementing the Assembly principle.
I think I must have understood something wrong. I hope I can make a strong decision. If there are any details, I can also point out
Reprinted please indicate the source, the first blog Park http://www.cnblogs.com/langtianya/p/3810961.html