
设计模式
西西L
这个作者很懒,什么都没留下…
展开
-
关于敏捷开发的思考
刚接触敏捷一个月左右,看各种设计模式、TDD、scrum、xp,但是当别人问到我什么是敏捷开发的时候,还是不知道怎么去回答,所以就想着,是时候理一下这些天学习的关于敏捷的所有,在心里搭一个框架。 什么是敏捷开发? 在《高效程序员的45个习惯:敏捷开发修炼之道》中这样写道:敏捷开发就是在高度协作的环境中,不断地利用反馈进行自我调整和完善。 红色的关键字也指出了敏捷开发的三个特点:高度协作——以原创 2016-05-11 17:08:18 · 1048 阅读 · 0 评论 -
状态模式(State Design Pattern)
以此回顾《设计模式之禅》及其他设计模式书籍、视频中的状态模式。 什么是状态模式? Allow an object to alter its behavior when its internal state changes. The object will appear to change its class. (当一个对象的内在状态改变时,允许它修改自己的行为。这个对象看起来像是改变了类)原创 2016-05-15 16:21:53 · 1338 阅读 · 0 评论 -
里氏替换原则(Liskov Substitution Principle, LSP)
定义: 第一种:If for each object O1 of type S there is an object O2 fo type T such that for all programs P defined in terms of T, the behavior of P is unchanged when O1 is substitueted for O2 then S is a s原创 2016-05-08 19:36:44 · 2335 阅读 · 0 评论 -
责任链模式(Chain of Responsibility)
以此回顾学习《设计模式之禅》的责任链模式。 什么是责任链模式? 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原创 2016-05-09 22:09:45 · 1660 阅读 · 0 评论 -
工厂模式(Factory Design Patter)
什么是工厂模式? 定义一:Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. (定义一个创建对象的接口,但是让子类决定实例化哪个原创 2016-06-02 22:20:13 · 860 阅读 · 0 评论