Why not 23 design patterns MVC

GoF (Gang of Four, foursome, "Design Patterns: Elements of Reusable Object-Oriented Software" author / "Design Patterns" book: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides) and did not mention MVC as a design pattern, but it as "a set of classes used to build a set of user interfaces." In their view, it is actually the evolution of the other three classic design patterns: Observer Pattern (Observer) (Pub / Sub), Strategy Mode (Strategy) and a combined mode (Composite). Depending on the MVC implementation in the framework may also use the factory pattern (Factory) and decorators (Decorator) mode.

What is MVC?

  • Model: Model Data Layer
  • Controller: Yewuluojiceng
  • View: View layer

Advantages: decoupling, Modular Code

Summary: MVC actually fit three modes, one of the goals of this model is to establish many relationship between a subject and observer, when the subject changes observer will be updated. The different relationships are between View and Controller, Controller View to help deal with different user input different response, this is a very good strategy mode.

Guess you like

Origin www.cnblogs.com/ButterflyEffect/p/10942390.html