博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
23种设计模式用英语怎样表达?
阅读量:5864 次
发布时间:2019-06-19

本文共 3155 字,大约阅读时间需要 10 分钟。

     本人近期收集了一下23种设计模式的英文解释。分享例如以下。

--- Abstract Factory    Provides one level of interface higher than the factory pattern. It is used to return one of several factories.--- Builder    Construct a complex object from simple objects step by step.--- Factory Method    Provides an abstraction or an interface and lets subclass or implementing classes decide which class or method should be    instantiated or called, based on the conditions or parameters given.--- Prototype    Cloning an object by reducing the cost of creation.--- Singleton    One instance of a class or one value accessible globally in an application.Structural Patterns--- Adapter    Convert the existing interfaces to a new interface to achieve compatibility and reusability of the unrelated classes    in one application. Also known as Wrapper pattern.--- Bridge    Decouple an abstraction or interface from its implementation so that the two can vary independently.--- Composite    Build a complex object out of elemental objects and itself like a tree structure.--- Decorator    add additional features or behaviors to a particular instance of a class, while not modifying the other instances of same class--- Facade Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. Wrap a complicated subsystem with a simpler interface.--- Flyweight    Make instances of classes on the fly to improve performance efficiently, like individual characters or icons on the screen.--- Proxy    Use a simple object to represent a complex one or provide a placeholder for another object to control access to it.Behavioral Patterns--- Chain of Responsibility    Let more than one object handle a request without their knowing each other. Pass the request to chained objects until    it has been handled.--- Command    Streamlize objects by providing an interface to encapsulate a request and make the interface implemented by subclasses    in order to parameterize the clients.--- Interpreter    Provides a definition of a macro language or syntax and parsing into objects in a program.--- Iterator    Define an object that encapsulates details and other objects interact with such object. The relationships are loosely decoupled.--- MediatorDecouple the direct communication between objects by introducing a middle object, the mediator, that facilitates the communication between the objects.--- Memento    To record an object internal state without violating encapsulation and reclaim it later without knowledge of the original object.--- Observer    One object changes state, all of its dependents are updated automatically.--- State    An object's behavior change is represented by its member classes, which share the same super class.--- Strategy    Group several algorithms in a single module to provide alternatives. Also known as policy.--- Template Method    Provide an abstract definition for a method or a class and redefine its behavior later or on the fly without changing its structure.--- Visitor    Define a new operation to deal with the classes of the elements without changing their structures.

转载地址:http://owynx.baihongyu.com/

你可能感兴趣的文章
VMDrivers_Mac.rar下载
查看>>
通过逆元实现大数据除法的取模
查看>>
我的友情链接
查看>>
oracle一个用户使用多个表空间
查看>>
2016腾讯实习生暑期招聘
查看>>
中小型活动目录设计实例
查看>>
MySQL5.7源码安装问题汇总
查看>>
javascript闭包中循环问题
查看>>
DELL 服务器在LINUX下查看阵列状态命令
查看>>
nginx开启core dump文件
查看>>
我的友情链接
查看>>
每天一个linux命令(5):rm 命令
查看>>
我的LINUX学习之路之八之账户与密码迁移
查看>>
数据库安装
查看>>
word2016去除回车符和换行符的方法
查看>>
Javascript判断页面是否加载完成
查看>>
下一个目标:爱上90后!
查看>>
43 MySQL复制及Galera Cluster、MHA
查看>>
CentOS 6.6 下源码编译安装MySQL 5.7.5
查看>>
Java Quartz 自动调度
查看>>