随笔分类 - Design Pattern
常见设计模式交流分享
摘要:名称: 抽象工厂模式(Abstract Factory Pattern)-对象创建型模式 问题: Provide an interface for creating families of related or dependent objects without specifying their c
阅读全文
摘要:名称: 工厂方法(FactoryMethod Pattern)-对象创建型模式。 问题: 定义一个用于创建对象的接口,让子类决定实例化哪一个类。工厂方法使一个类的实例化延迟到其子类。 Define an interface for creating an object,but let subclas
阅读全文
摘要:名称: 单例模式(Singleton Pattern)-对象创建型模式。 问题: 保证一个类仅有一个实例,并提供一个访问它的全局访问点 Ensure a class has only one instance, and provide a global point of access to it.
阅读全文
摘要:设计模式是软件开发过程中解决特定问题的一些经验总结。 为什么要学习设计模式 记得读研时,啃了几天GoF的《设计模式:可复用面向对象软件的基础》,觉得一头雾水,那时的项目经验比较少,没觉得这么做有什么道理。 后来代码撸多了,觉得到了瓶颈,就又拾起了设计模式。 再次看设计模式,发现目的是好的,但抽象能力
阅读全文