6大设计原则

  |   0 评论   |   1,250 浏览

    1、单一职责原则
    2、里氏替换原则
    FUnctions that use pointers or references to base classes must be able to use objects of derived classes without knowing it.
    3、依赖导致原则
    High level modules should not depend upon low level modules.Both should depend upon abstractions.Abstractions should not depend upon details.Details should depend upon abstractions. 面向接口编程
    4、接口隔离原则
    5、迪米特法则(最小知识原则)
    6、开闭原则

    评论

    发表评论

    validate