In MVC framework, a URL is seen as the mean to address a logical server resource, but not necessarily an ASPX file to parse. MCV Framework employs a centralized HTTP handler that recognizes an application-specific syntax for links.
- Enables clean separation of each component.
- All contracts within the MVC framework are interface based and easily mockable.
- Highly extensible and pluggable.
- Include powerful URL mapping that enables to build applications with clean URLs.
- MVC framework supports using the existing ASP.Net, aspx, ascx and .master files as view templates.
- Supports existing Asp.net features like forms/windows authentication etc.
Representational State Transfer (REST)
REST is an architectural pattern that defines how network resources should be defined and addressed in order to gain shorter response times, clear separation of concerns between the front-end and back-end of a networked system. Rest is based on three following principles
1. Application expresses its state and implements its functionality by acting on logical resources
2. Each resource is addressed using a specific URL syntax
3. All addressable resources feature a contracted set of operations.
Here each page is splitted into distinct components - controller and view - that operate over the same model. This is opposed to the classic code-behind model where no barrier is set that forces you to think in terms of separation of concerns and controllers and view.
We can view MVC Framework as, having a central HTTP handler that captures all requests to resources identified with a new extension. This HTTP handler analyzes the syntax of the URL and maps it to a special server component known as the controller. The controller supports a new of predefined actions. The requested action is somehow codified in the URL according to an application-specific syntax. The central HTTP handler invokes the action on the controller and the controller will process the request up to generating the response in whatever response format you need. The response is generated through a view component.
No comments:
Post a Comment