摘要:
工厂方法模式(Factory Method):定义一个用于创建对象的接口,让子类决定实例化哪一个类。(解决了简单工厂模式违反OCP的问题) 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--usingSystem;usingSystem.Collec... 阅读全文
posted @ 2010-04-24 20:53
gooliugle
阅读(307)
评论(0)
推荐(0)
摘要:
代理模式(Proxy):为其他对象提供一种代理以控制对这个对象的访问。1、远程代理:为一个对象在不同的地址空间提供局部代表,这样可以隐藏一个对象存在于不同地址空间的事实。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1usingSystem;2u... 阅读全文
posted @ 2010-04-24 19:31
gooliugle
阅读(296)
评论(0)
推荐(0)
浙公网安备 33010602011771号