每个人都会死去,但不是每个人都曾经真正活过
Ever man dies,Not every man really lives
posts - 7,comments - 0,trackbacks - 0

STRATEGY

         define a family of algorithms , encapsulats each ones , and make them interchangeable . STRATEGY let the algorithm vary independently from client that use it .
         
         定义一系列算法并逐个封装为单独的类 ,并且使之能互相交换。策略模式能使这些各种各样的算法独立的被客户端调用。(呵呵   翻译的可能不标准)

           separating what changes from what stay the same .

           identify the aspects of your application taht vary ang separate them from what stay the same.

           Has-a can be better than Is-a.   
posted on 2006-09-11 20:33 saftyfirst 阅读(83) 评论(0)  编辑  收藏 所属分类: 设计模式