KEMBAR78
Moving from ASP.NET Web Forms to ASP.NET MVC | PPTX
Kim Painter
@kgpainter
kimpainter1984@gmail.com
Provides:
     Familiar control and event based programming model

     Rich controls that encapsulate HTML, CSS & Javascript

     Availability of many rich controls

     Browser differences handled for you

     SharePoint builds on Web Forms
The MVC pattern was invented in the '70s as part of Smalltalk.

MVC divides your UI into three distinct objects:

   the controller, which receives and handles input;
   the model, which contains your domain logic;
   and the view, which generates your output.
Provides:
     A "separation of concerns”

     Significant control over rendered HTML

     Supports Unit Testing, TDD and Agile methodologies

     Encourages the use of design patterns by convention

     Encourages more prescriptive applications

     Extremely flexible and extensible
By Nick Berardi
By Vaibhav Jain
Time
Challenges/
Priorities
“Many companies have a huge investment in Web
Forms technology that they just simply aren't going to
throw out - training, third party controls, experience
and so on. “

“Many companies don't buy into the whole Unit Test
pitch behind MVC. Many companies simply don't test
at all.”

                Quotes from Mike Brind
                http://mikesdotnetting.com/
Quotes from Scott Guthrie’s blog on
About Technical Debates (and ASP.NET
Web Forms and ASP.NET MVC debates in
particular)
Authentication
Authorization
User Membership
Role Security
Output Caching
Session State
Configuration
Deployment
Ajax
others...
Conversion Project
Side-By-Side – Preexisting Web Forms app
Side-By-Side – New MVC app
http://codingatilivedigitally.wordpress.com/2012/07/10/9-steps-to-switch-from-asp-
net-web-forms-to-mvc/
http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPN
ET4WebFormsApplications.aspx
Why?

Keeping rich functionality of some desired server
controls – such as the Report Viewer
http://weblogs.asp.net/rajbk/archive/2010/05/11/running-asp-net-webforms-and-
asp-net-mvc-side-by-side.aspx
Root.master
<%@ Master Inherits="System.Web.UI.MasterPage" … %>

MVC.master
<%@ Master MasterPageFile="~/Views/Shared/Root.Master" Inherits="System.Web.Mvc.ViewMasterPage" … %>

WebForm.master
<%@ Master MasterPageFile="~/Views/Shared/Root.Master" Inherits="NorthwindSales.Views.Shared.Webform" %>

Code behind:
public partial class Webform : System.Web.UI.MasterPage {}
So back to the question…

Is it really worth moving from ASP.NET
WebForms to ASP.NET MVC?

It depends
Comparison Sites:
    http://coderjournal.com/2008/12/introducing-aspnet-mvc-part-2-aspnet-mvc-vs-webforms/
    http://blog.gadodia.net/choosing-between-webforms-and-mvc/
    http://msdn.microsoft.com/en-us/magazine/dd942833.aspx
    http://www.asp.net/web-forms/videos/how-do-i/choosing-the-right-programming-model

Converting from Web Forms to MVC:
     http://codingatilivedigitally.wordpress.com/2012/07/10/9-steps-to-switch-from-asp-net-web-forms-to-mvc/

      http://www.asp.net
      http://aspdotnetmvc.com/

      ASP.NET MVC in Action (1-4)
      Programming Microsoft ASP.NET MVC
      Programming Microsoft ASP.NET 4

Moving from ASP.NET Web Forms to ASP.NET MVC