What are the advantages of ASP.Net MVC over ASP.Net Web Forms?

Views:
 
Category: Education
     
 

Presentation Description

ProfoundEdutech is well known for its .NET Classes. Dot NET Course of Profound covers ASP.NET MVC in-depth in its Advanced .NET ADJT course. To know more visit https://profoundedutech.com/core-java-classes-training-institute-pune

Comments

Presentation Transcript

slide 1:

Profound Edutech Pvt Ltd What are the advantages of ASP.Net MVC over ASP.Net Web Forms Asp.Net MVC is one of the Programming Model in Asp.net framework. It is a lightweight and highly testable open source framework built on the top of Microsoft .Net Framework for building highly scalable and well designed web applications. ASP.NET MVC is a framework that allows developers to apply the MVC pattern in the development of an ASP.NET application which results in better reusability and easier testing. It is must for a .NET developer to have hands on exposure on ASP.NET MVC. ProfoundEdutech is well known for its .NET Classes. Dot NET Course of Profound covers ASP.NET MVC in depth in its Advanced .NET ADJT course. The MVC framework is not a replacement for the web-form programming model but its an alternative programming model it is for those who want to have a better control and want to be able to test the presentation logic. It is integrated with existing ASP.NET features such as master pages and membership- based authentication. The MVC framework is defined in the System.Web.Mvc assembly. Difference between Asp.Net MVC and Asp.Net WebForms is given below. Asp.Net Web Form Asp.Net MVC ASP.NET Web Forms uses Page controller pattern approach for rendering layout. In this approach every page has it’s own controller i.e. code-behind file that processes the request ASP.NET MVC uses Front Controller approach. That approach means a common controller for all pages processes the requests. No separation of concerns. As we discussed that every page .aspx has it’s own controller code behind i.e. aspx.cs/.vb file so both are tightly coupled. Very clean separation of concerns. View and Controller are neatly separate. Because of this coupled behavior automated testing is really difficult. Testability is key feature in ASP.NET MVC. Test driven development is quite simple using this approach In order to achieve stateful behavior viewstate is used. Purpose was to give developers the same experience of a typical WinForms application. ASP.NET MVC approach is stateless as that of the web. So here no concept of view state. Statefulness has a lots of problem for web environment in case of excessively large view state. Large view state means increase in page size. As controller and view are not dependent and also no view state concept in ASP.NET MVC so output is very clean.

slide 2:

Profound Edutech Pvt Ltd ASP.NET WebForms model follows a Page Life cycle. No Page Life cycle like WebForms. Request cycle is simple in ASP.NET MVC model. Along with statefulness microsoft tries to introduce server-side controls as in Windows applications. Purpose was to provide somehow an abstraction to the details of HTML. In ASP.NET Web Forms minimal knowledge of HTML JavaScript and CSS is required. In MVC detailed knowledge of HTML JavaScript and CSS is required. With a lots of control libraries availability and limited knowledge of other related technologies ASP.NET WebForms is RADRapid Application Development approach. It’s a step back. For developers decrease in productivity. It’s good for small scale applications with limited team size. It’s better as well as recommended approach for large-scale applications where different teams are working together. It’s better as well as recommended approach for large-scale applications where different teams are working together. ASP.NET MVC application uses URLs Routing concepts. Means URLs are separated in Controllers actions and others.It is based on Controller not on Physical file. http://server/application/home.aspx URL are handle by Http handler http://server/application/Products/show/beverages Where product is Controller show is Action and beverages is category . URL are interpreted by a Route Handler .

authorStream Live Help