关闭

Model-View-Controller MVC模式

255人阅读 评论(0) 收藏 举报
分类:

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

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:64970次
    • 积分:2025
    • 等级:
    • 排名:第19041名
    • 原创:145篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条