2014-03-16星期日15:26:39Builder,继续GOF。1、Intent​Separatetheconstructionofacomplexobjectfromitsrepresentationsothatthesameconstructionprocesscancreatedifferentrepresentations.将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创... Read More
posted @ 2014-03-25 21:22 自由度 Views(313) Comments(0) Diggs(0)
2014-03-23星期日21:19:26Strategy,继续GOF。1、IntentDefineafamilyofalgorithms,encapsulateeachone,andmaketheminterchangeable.Strategyletsthealgorithmvaryindependentlyfromclientsthatuseit.定义一系列的算法,把它们一个个封装起来,并且... Read More
posted @ 2014-03-25 21:17 自由度 Views(262) Comments(0) Diggs(0)
2014-01-18星期六11:12:42Singleton,继续GOF。1、IntentEnsureaclassonlyhasoneinstance,andprovideaglobalpointofaccesstoit.保证一个类仅有一个实例,并提供一个访问它的全局访问点。2、AlsoKnownAs3、MotivationIt'simportantforsomeclassestohaveexac... Read More
posted @ 2014-03-25 21:16 自由度 Views(693) Comments(0) Diggs(0)