list of most-frequently-used design patterns

二次信任 提交于 2019-12-19 18:14:14

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>

FROM HEAD FIRST DESIGN PATTERNS

strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.

Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.

Decorator Pattern attaches additional responsibility to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.

Factory Method defines an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to its subclasses.

Abstract Factory provides an interface for creating families of related or dependent objects without specifying their concrete classes.

Singleton Pattern

Command Pattern

Adapter Pattern

Facade Pattern

Template Method Pattern

Iterator Pattern

Composite Pattern

State Pattern

Proxy Pattern

 

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!