• OO设计原则


    开闭原则(open/close principle, OCP): Open on extensibility , close on modification. We should use interface to encapsulation, use abstract mechanism, and use polymorphism.

    Liskov替换原则(Liskov Substitution Principle, LSP),

    依赖倒置原则(Dependency Inversion Principle, DIP) depend on interface, instead of concrete class.

    接口分离原则(Interface Segregation Principle,ISP): one class given to more clients to use, create each interface for every client, and then this class implement all interfaces.

    单一职责原则(Single Responsibility Principle, SRP).

    l 

    l

    An excellent system should have these following characteristics:

    friendly, understandibility, reliability, reusability, extensibility, portalibity, scalability, simplicity.

    Some characteristics conflict, we should make our choice by priority.

    But simplicity should be concerned first so that the implementation, use and maintain for the system become simple,

    In the end, lower develop cost and shorten develop time.

    Attachment: OODesignPrinciples.ppt.zip

  • 相关阅读:
    java中Object转String
    Spring中属性文件properties的读取与使用
    Java中parseInt()和valueOf(),toString()的区别
    php第二十一节课
    php第二十节课
    php第十九节课
    php第十八节课
    php第十七节课
    php第十五节课
    php第十四节课
  • 原文地址:https://www.cnblogs.com/qingxia/p/1979443.html
Copyright © 2020-2023  润新知