Scattered knowledge points (object-oriented seven design principles, jdbc--basedao,jsp Nine large built-in objects. Four scopes)

Source: Internet
Author: User

Object-oriented seven design principles:

1. Opening and closing principle (ocp:open-closed Principle)
2, the Richter replacement principle (Lsp:liskov Substitution Principle)


3. Single Duty principle (Srp:single responsibility principle)
4. Interface Isolation principle (Isp:interface segregation Principle)
5. Dependency inversion principle (dip:dependence inversion Principle)
6. Dimitri Law (Lod:law of Demeter)
7. Synthetic multiplexing principles (Crp:composite reuse Principle)

Brief introduction:

1. Opening and closing principle:

Software entities are open to extensions and are closed to modifications, which extend their functionality on the basis of not modifying a software entity.

2. The Richter replacement principle:

  In a software system, a subclass object can be accepted where a base class object is acceptable.

3. Single Responsibility Principle:

  Classes have a single responsibility and cannot put too much responsibility in one class

4. Interface Isolation principle:

  Use multiple specialized interfaces instead of one unified interface

5. Dependency Inversion principle:

  To program for the abstraction layer, do not program for specific classes

6. Dimitri rule:

  The fewer references a software entity has to other entities, the better, or if two classes do not have to communicate directly with each other, then these two classes should not have a direct interaction, but indirectly by introducing a third party.

7. Synthetic multiplexing principles:

  In the system should be as much as possible to use the combination and aggregation of association relationships, as little as possible or even without inheritance relationship

Jdbc

Basedao

JSP nine large built-in objects:

5, Response Response object

6, page current object

7, out output stream object

8, exception exception

9, config Servletconfig/filterconfig object

Scope (the lifetime of each scope is different):

1, Application global scope

2, Session scope

3, request scope

4, PageContext page scope

Priority (depending on the life cycle):

Application > Session > Request > PageContext

  

Scattered knowledge points (object-oriented seven design principles, jdbc--basedao,jsp Nine large built-in objects. Four scopes)

Related Article

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.