A compound pattern combines two or more patterns into a solution that solves a recurring or general problem.
- View根据用户的操作调用对应的Controller的方法。
- Controller从Model获得当前状态的信息,并修改Model的状态。
- Model状态修改后通知View,View修改显示信息。
A Pattern is a solution to a problem in a context.
The context is the situation in which the pattern applies. This should be a recurring situation.
The problem refers to the goal you are trying to achieve in this context, but it also refers to any constraints that occur in the context.
The solution is what you re after: a general design that anyone can apply which resolves the goal and set of constraints.
Creational Patterns:
- Singleton
- Builder
- Abstract Factory
- Factory Method
- Prototype
Behavioral Patterns:
- Template Method
- Command
- Observer
- Strategy
- State
- Iterator
- Visitor
- Mediator
- Memento
- Interpreter
- Chain of Responsibility
Structural Patterns:
- Proxy
- Decorator
- Composite
- Facade
- Adapter
- Flyweight
- Bridge
In GoF classic Design Patterns, there 23 patterns.
http://c2.com/cgi/wiki?CategoryPattern
http://hillside.net/patterns/education
本文介绍了设计模式的基本概念,包括复合模式、创建型模式、行为型模式和结构型模式等,阐述了它们如何解决软件开发中常见的问题。
1017

被折叠的 条评论
为什么被折叠?



