What is the relationship between MVC and Project Standards?

Asked

Viewed 549 times

4

We know that the MVC Standard (Model View Controller) is not a Design Pattern, but an architecture standard. It’s also not a layered pattern, because it tells you how to group components while MVC tells you how components interact.

MVC uses some standards. What Project Standards Use MVC?

1 answer

3


In the book Design Patterns: Elements of Reusable Object-Oriented Software, considered the Desing Patterns Bible, the MVC standard is cited in the Smalltalk language. According to the book, the MVC standard uses the following Patterns design:

Observer

Used in Model View Decoupling so changes in the Model reflect in all Views.

Composite

Used for using nested views and creating complex components as controls.

Strategy

Used in the View - Controller interface. By changing the controller instance the view responds to, you change the View handling strategy.


The book also cites the following Patterns design that can be used in MVC, but are somewhat specific to the Smalltalk implementation to which the book refers.

Factory Method - Can be used to set the default instance of a Controller for a View.

Decorator - To add scrolling to a View

Can read here the passage that specifically speaks of this.

However, each specific MVC implementation will use one or another Design Pattern more or less. O ASP.NET MVC for example, use something very close to Pattern Command when using the ActionResult in return. Different returns as JsonResult, ViewResult or PartiaViewResult replace different commands that will be executed by the framework at the return of control.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.