Summary_深入浅出设计模式(影印版)书评-查字典图书网
查字典图书网
当前位置: 查字典 > 图书网 > 交互设计 > 深入浅出设计模式(影印版) > Summary
MonteCarlo 深入浅出设计模式(影印版) 的书评 发表时间:2012-07-25 21:07:48

Summary

【strategy】 defines a family of algorithms, encapsulate each one and make them interchangable. strategy lets the algorithm vary independently from clients that use it.

【observer】 defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.

【decorator】 attach additional responsibilities to an object dynamically. decorator provide a flexible alternative to subclssing for extending functionality.

【abstract factory】 provide an interface for creating famiilies of related or dependent objects without specifing their concrete classes.

【factory method】 defines in interface for creating an object, but let subclss to decide which class to instantiate. factory method lets a class defer instantiation to the subclasses.

【singleton】 ensure a class only has one instance and provide a gloval point of access to it.

【command】 encapsulates a request as a object, thereby letting you parametrize clients with different request, quese or log request, and support undoable operations.

【adaptor】 converts the interface of a class into another interface that clients expect. lets classes work together that couldn't otherwise because of incompatible interface.

【facade】 provides a unified interface to a set of interfaces in a subsystem. facade defines a higher-level interface that makes the subsystem easier to use.

【template】 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 algorithms' structure

【iterator】 provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.

【composite】 compose objects into tree structure to represent part-whole hierachies. composite lets client treat individual object and compositions of objects equally.

【state】 allow an object to alter its behavior when its internal state changes. the object will appear to change its class.

【proxy】 provides a surrogate or placeholder for another object to control access to it.

【compound】 i.e. MVC

展开全文


推荐文章

猜你喜欢

附近的人在看

推荐阅读

拓展阅读