What is ASP.NET MVC?

Can someone explain to me what MVC is, why we use it and how we can use it. Benefits of using this? and can we use ASP.NET MVC in ASP.NET 2.0 (VS 2005)

+2
source share
7 answers

Model View Controller ( MVC ) Also Microsoft ASP.NET MVC Framework. It is built on top of VS.NET 2008. It is best deployed on Windows 2008 Server. It will work on Windows 2003 Server, but you will lose some of the coolest bits.

Benefits of the ASP.NET MVC Framework include:

  • REST as urls i.e. / products / 1/456
  • There are no aspx file extensions displayed on your site.
  • A very clean output model, more like classic ASP and then ASP.NET WebForms.
  • It is much easier to create a test site, then using WebForms.

Disadvantages of ASP.NET MVC

  • It is in beta
  • It should be running on Windows 2008, if you are using Windows 2005, you will need to provide an extension for all of your pages.
  • This is very new.
+4
source

You will use MVC if you need full control over HTML output from ASP.NET. It also allows you to improve / simplify unit testing. It is based on the architecture of the Model View Controller.

Scott Guthery offers well here: Scott Hooke Blog

+8
source

ASP.NET MVC is a Microsoft-tagged implementation of the Model-view-Control Pattern for creating web applications, which allows for a clean separation of the problem from your business level (Model) and your presentation level (presentation submitted by controllers). This is an alternative to using Microsoft Webforms technology and makes it easy to test the device, which is almost impossible using the Webforms method.

+5
source

MVC is a way of dividing a program into three separate units:

  • Model: handles data access, business logic, etc.

  • View: generates a user interface.

  • Controller: processes input from the user interface, possibly extracts information from the model, and depending on this information returns a view to the user.

Benefits:

  • easier to maintain when, for example, data access logic is stored separately from the user interface.

  • maybe unit test different parts separately

  • ASP.NET MVC-specific: typically reduced page sizes compared to ASP.NET web forms

ASP.NET MVC is Microsoft's technology for implementing the MVC pattern on a website. This is an alternative to ASP.NET web forms, which are somehow forms of winnings for the Internet. ASP.NET MVC is considered by many to be cleaner and faster than web forms, but usually requires more knowledge of html, javascript ...

There is more detailed information here: ASP.NET MVC . The current beta version of ASP.NET MVC requires .NET 3.5.

+3
source

MVC is a template where the responsibility for displaying data is delegated to Component View, the user processing responsibility and input system are delegated to controller components, and the responsibility for processing business logic and data is delegated to model components. ASP.NET MVC is an implementation of the MVC template for ASP.NET web programming.

ASP.NET MVC complies with ASP.NET WebForms, where a clear separation of duties is not expected (although good projects often try to use an MVC-like design). In WebForms, typically rendering viewing, processing I / O (web requests), and business logic responsibilities are often mixed between label and code on ASPX pages. For example, in WebForms, you can embed SqlDataSource with selection logic directly in your label and bind it to the GridView. It is very difficult to verify that the selection logic works using unit tests. In ASP.NET MVC, data selection will be handled by a controller action that generates view data that will be transmitted and displayed in the view. The correct operation of this controller action (this is just a method on the controller class) can be much more easily verified using unit tests.

ASP.NET MVC uses REST-based URLs, not the WebForm PostBack model, to interact with the user. MVC can use any HTTP method, with the standard expectation that RESTful URLs are the norm. WebForms typically only uses GET / POST methods.

Although ASP.NET WebForms is relatively mature and has several controls designed for it, including third-party controls, ASP.NET MVC is still in beta (starting on 12/2008) and has far fewer controls available. Some argue that this is perfectly acceptable, as one aspect of MVC is to give the developer more control over the rendering of the view. Others may find this a serious flaw and may wish to wait until additional controls that work with the MVC model are developed.

For comparisons with other languages โ€‹โ€‹/ frameworks, among others, see Ruby on Rails (Ruby), Java Struts or Spring MVC (Java), and Django (Python).

+2
source

See how Rob Conery works on the MVC Storefront

0
source

Asp.net MVC is based on the MVC design pattern. Now the question is: what is an MVC design pattern . The MVC design pattern allows you to develop an application with loosely coupled components. It divides the application into different levels, for example Data , business logic and presentation logic . To learn more about Asp.net MVC. Follow the link below.

https://youtu.be/m_9FnAc5k8c

0
source

All Articles