• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
路过的世界
释迦摩尼说过:众生皆有如来佛生相,求佛求人不如求己。
博客园    首页    新随笔    联系   管理    订阅  订阅

模式分类

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:

根据处理类还是对象分

 

 

posted @ 2017-05-22 08:02  路过的世界  阅读(316)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3