Model-View-Controller MVC模式

萧英睿
2023-12-01

A compound pattern combines two or more patterns into a solution that solves a recurring or general problem.

  1. View根据用户的操作调用对应的Controller的方法。
  2. Controller从Model获得当前状态的信息,并修改Model的状态。
  3. 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:
  1. Singleton
  2. Builder
  3. Abstract Factory
  4. Factory Method
  5. Prototype

Behavioral Patterns:
  1. Template Method
  2. Command
  3. Observer
  4. Strategy
  5. State
  6. Iterator
  7. Visitor
  8. Mediator
  9. Memento
  10. Interpreter
  11. Chain of Responsibility

Structural Patterns:
  1. Proxy
  2. Decorator
  3. Composite
  4. Facade
  5. Adapter
  6. Flyweight
  7. Bridge
In GoF classic Design Patterns, there 23 patterns.

http://c2.com/cgi/wiki?CategoryPattern

http://hillside.net/patterns/education

 类似资料: