暑期实习的时候做了一次presentation on design pattern,以下是做的draft(由于公司算半个外企,用的英文;)
Design patterns are recurring solutions to software design problems you find again and again in real-world application development.
Patterns are about design and interaction of objects, as well as providing a communication platform concerning elegant,
reusable solutions to commonly encountered programming challenges.
They are categorized in three groups: Creational, Structural, and Behavioral.
Abstract Factory
definition
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
Factory Method
definition
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
Builder
definition
Separate the construction of a complex object from its representation so that the same construction process can create different representations.
Prototype
definition
Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype.
Singleton
definition
Ensure a class has only one instance and provide a global point of access to it.
Adapter
definition
Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.
Bridge
definition
Decouple an abstraction from its implementation so that the two can vary independently.
Composite
definition
Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
Decorator
definition
Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
Facade
definition
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.
Flyweight
definition
Use sharing to support large numbers of fine-grained objects efficiently.
Proxy
definition
Provide a surrogate or placeholder for another object to control access to it.
Chain of Responsibility
definition
Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.
Command
definition
Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.
Interpreter
definition
Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.
Iterator
definition
Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
Mediator
definition
Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.
Memento
definition
Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.
Observer
definition
Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
State
definition
Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.
Strategy
definition
Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
Template
definition
Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.
Visitor
definition
Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.
分享到:
相关推荐
这个是一本纯粹的服装设计的手稿,描述国内外的一些服装设计
Web设计模板A3手绘稿设计产品设计交互设计手稿模板A4打印模板高清待办练字模板PDF下载
基于FPGA之低速协议设计实验手稿及源码,包含原理及代码 IIC , ps2 , SPI , uart , VGA
这篇文章应该是我转做Android 1年多第2次系统梳理设计模式的记录手稿,很全面,也有相应的案例讲解
本书主要解析在电路设计系统中 本书主要解析在电路设计系统中 本书主要解析在电路...此本书 此本书 是作为 作者在电子路 作者在电子路 作者在电子路 设计 系列手稿 系列手稿 系列手稿 的首份整理 的首份整理 的首份整理
088 马克思手稿中的数学题 C语言源代码文件
马克思手稿中的趣味数学题 马克思⼿稿中有⼀道趣味数学问题:有30个⼈,其中有男⼈、⼥⼈和⼩孩,在⼀家饭馆吃饭花了50先令;每个男⼈花3先令,每个⼥⼈花2先令,每个⼩孩花1先令; 问男⼈、⼥⼈和⼩孩各有⼏⼈? ...
复制在安装文件目录插件下,能正常打印,检测不到锁,算量程序自行下载
江恩论述六边形的手稿(doc 6).doc
积累和收藏的手稿
深度学习手稿-机器学习算法与Python学习;
程序员的人生不仅仅只有代码
英语教学法教程手稿重点笔记.doc
1、马克思手稿中有一道趣味数学题:有30个人,其中有男人、女人和小孩,在一家饭馆吃饭共花了50先令:每个男人花3先令,每个女人花2先令,每个小孩花1先令,问男人、女人、小孩各有几人? 2、学生成绩管理 有N名学生...
Sparkfun_9DOF_AHRS_航姿参考系统设计手稿1
达芬奇的秘密,都藏在那5000多页手稿中
关于ARM设计稿,是一个关于物业部分模块的功能以ARM为基础来实现。
1844年经济学哲学手稿读书笔记.pdf
1844年经济学哲学手稿资料原文.doc
手稿_V1.04