• 模式分类


    1. 创建型:Creational

    Creational patterns involve object instantiation and all provide a way to decouple a client from the objects it needs to instantiate.

    创建型模式,涉及到对象的实例化。这个模式提供一个方法,让客户(Client)从所需要实例化的对象中解耦

    singleton,builder,prototype,abstract factory,factory method

    2. 行为型Behavioral

    Any pattern that is a Behavioral Pattern is concerned with how classes and objects interact and distribute responsibility.

    类和对象如何交互,以及职责分配

    Template method command ,iterator,visitor ,mediator,memento,interpreter,observer,chain of responsibility,state,strategy.

    3. 结构型

    Structural patterns let you compose classes or objects into larger structures.

    组合类和对象,到更大的机构

    decorator,proxy, facade,comosite,adptor,bridgy.

     

    还有一种分类方式:

    Patterns are often classified by a second attribute: whether or not
    the pattern deals with classes or objects:

    根据处理类还是对象分

  • 相关阅读:
    文件操作
    需特别注意的地方(关于内存机制)
    数据类型的汇总和功能
    python之http请求及响应
    8.centos7进入单用户
    Android Studio使用总结
    django之数据库models
    django之错题集
    python之mysql安装配置
    python之pycharm的debug调试使用
  • 原文地址:https://www.cnblogs.com/shenfengok/p/6887801.html
Copyright © 2020-2023  润新知