LinkTogether™ Official Blog

Find Out What’s Going On With LinkTogether

Should I Migrate My Site To ASP.NET MVC?

Jun 26th, 2009 by admin

I’ve been getting paid to write software since 1992 and at least half of that time has been spent developing for, or in the vicinity of, Microsoft technologies such as C/C++, Visual Basic, COM, DCOM, and .NET.  If there’s one thing about the company it’s that they routinely put out new technologies and toolkits from well-intentioned teams within the company bent on carving out a niche for their technology or vision for the industry (ActiveX or Windows DNA, anyone?)   Consequently, it’s no surprise that many experienced developers tend to look at “offshoot” products from Microsoft with a somewhat skeptical eye.  Dozens, if not hundreds, of valuable, well though-out projects have been released upon the development community to mild or even great acclaim, only to suddenly or gradually be phased out a short while later, due to changing political winds or conditions within the company.

Against this backdrop, ASP.NET MVC (http://www.asp.net/mvc) is a recent release designed to provide ASP.NET developers with a true model-view-controller (MVC) implementation for use in their ASP.NET applications.  For the uninitiated, model-view-controller is the name of a pattern used to separate an application’s business logic (the model) from the presentation layer (the view), all managed by one or more controllers that act as traffic cops and handle the passing of data between the model and the view.  In contrast, standard ASP.NET Web Forms are more accurately referred to as a Model-View architecture, with the ASPX itself being the “View” and the ASPX code-behind file filling the role of the model.  The primary difference between ASP.NET and ASP.NET MVC is the introduction of a controller that dynamically routes application data from the client to the model to the view and back to the client.  This sort of architecture has several advantages including:

•    Cleaner separation of business logic from presentation code
•    Ability to reuse views for multiple models or, conversely, the ability to reuse models for multiple views
•    Better support for unit testing; usually done against controller actions (models)

While ASP.NET MVC certainly represents a “cleaner” step forward, as compared to the Web Forms model, and it will be an approach familiar to many Java developers used to working with Struts, PHP developers with Cake experience, and Ruby On Rails fans, the question remains:  should you migrate your existing ASP.NET site to ASP.NET MVC?  This is obviously not an easy question to answer in a vacuum without knowledge of the specific business environment in which you operate (could you afford to spend 1, 3, or even 6 months rewiring/rewriting an application that currently works just fine?).  A cost-benefit analysis would need to be performed to determine if the amount of time invested into the shift to ASP.NET MVC (i.e. the cost) will be returned to your team in the future (i.e. the benefit) based on improved maintenance, possibly faster development, and improved unit testing of the overall application.  In addition, there is a bit of a learning curve involved with the switch to an MVC implementation so ideally your team has at least a few members who’ve worked with alternative MVC frameworks, probably on other development platforms.  Fortunately, the ASP.NET MVC site includes a wealth of documentation and samples that go a long way to alleviating any immediate fears you may have.  Be sure to check those out and perhaps prototype out a few sample screens from your current application to get a feel for the complexity and the time that will be required to complete the shift before plunging in feet first.  Good luck!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • Sphinn
  • Technorati
  • Yahoo! Buzz
  • LinkedIn

3 Responses to “Should I Migrate My Site To ASP.NET MVC?”

  1. Shadow Says:

    Норм

  2. Joe Says:

    Однако

  3. Светлана Says:

    Хм

Leave a Reply



© Copyright 2010 Network Solutions. All rights reserved. Terms of Use, Privacy Policy, Support