One of the project designs ----------- design principles of the project package (original)

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.