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

5,823 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
5,823
On SlideShare
0
From Embeds
0
Number of Embeds
149
Actions
Shares
0
Downloads
67
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

  1. 1. Kim Painter@kgpainterkimpainter1984@gmail.com
  2. 2. 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
  3. 3. 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.
  4. 4. 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
  5. 5. By Nick Berardi
  6. 6. By Vaibhav Jain
  7. 7. TimeChallenges/Priorities
  8. 8. “Many companies have a huge investment in WebForms technology that they just simply arent going tothrow out - training, third party controls, experienceand so on. ““Many companies dont buy into the whole Unit Testpitch behind MVC. Many companies simply dont testat all.” Quotes from Mike Brind http://mikesdotnetting.com/
  9. 9. Quotes from Scott Guthrie’s blog onAbout Technical Debates (and ASP.NETWeb Forms and ASP.NET MVC debates inparticular)
  10. 10. AuthenticationAuthorizationUser MembershipRole SecurityOutput CachingSession StateConfigurationDeploymentAjaxothers...
  11. 11. Conversion ProjectSide-By-Side – Preexisting Web Forms appSide-By-Side – New MVC app
  12. 12. http://codingatilivedigitally.wordpress.com/2012/07/10/9-steps-to-switch-from-asp-net-web-forms-to-mvc/
  13. 13. http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPNET4WebFormsApplications.aspx
  14. 14. Why?Keeping rich functionality of some desired servercontrols – such as the Report Viewerhttp://weblogs.asp.net/rajbk/archive/2010/05/11/running-asp-net-webforms-and-asp-net-mvc-side-by-side.aspx
  15. 15. 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 {}
  16. 16. So back to the question…Is it really worth moving from ASP.NETWebForms to ASP.NET MVC?It depends
  17. 17. 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-modelConverting 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

×