ASP.NET
  Home arrow ASP.NET arrow Disadvantages of the ASP.NET MVC Framework
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Disadvantages of the ASP.NET MVC Framework
By: Xianzhong Zhu
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 2 stars2 stars2 stars2 stars2 stars / 8
    2008-11-25

    Table of Contents:
  • Disadvantages of the ASP.NET MVC Framework
  • The Second Disadvantage
  • Category Method
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Disadvantages of the ASP.NET MVC Framework


    (Page 1 of 4 )

    The ASP.NET MVC framework is a new and lightweight architectural pattern still in its infancy. Although evolving from Preview 1 to Preview 4, there are still a great many supplements and enhancements necessary. So far, there have not been any real scenarios of ASP.NET applications putting it into practice. Now, I'm going to use scraps of code to list the disadvantages (immaturity) of ASP.NET MVC as far as I know. This is the fourth part of a four-part series that compares ASP.NET Web Forms with ASP.NET MVC.

    (1) Writing View Contents the Old ASP-Like Way

    Let’s first take a look at a piece of the MVC-styled view code, as follows:

    <ul> <% foreach (Article article in this.GetArticles())

    { %>

    <li>

    <img src="<%= "http://img.dummy.net/" + article.ImagePath %>"

    alt="<%= article.Title %>" />

    </li>

    <% } %>

    </ul>

    As you may have noticed above, it uses an inline mode, foreach, to render the .aspx page’s contents. Indeed, code generated in the above mode is spotless whether in the case of cleanness or from the angle of self definition. But……yes, as you have seen, it’s the original ASP mode, just switched to another term—the ASP.NET MVC-styled template! Isn't it ironic? Yet, this is indeed the fact.

    Since a flock of developers are now ready to embrace ASP.NET MVC without  hesitation, are they also ready to deal with the old-style inline mode? Due to the features of ASP.NET MVC (mainly a ViewData transferred from the Controller to the View), the true ASP.NET MVC template syntax requires a plus CAST, such as the following (of course, you can also use the strong-typed ViewData supported by ASP.NET MVC, which can help to avoid such a cast operation):

    <ul> <% foreach (Article article in (ViewData["Articles"] as List<Article>))

    { %>

    <li>

    <img src="<%= "http://img.dummy.net/" + article.ImagePath %>"

    alt="<%= article.Title %>" />

    </li>

    <% } %>

    </ul>

    Now I wonder: is this progress merely from the viewpoint of the View writing? Does ASP.NET MVC go back to the ASP years (of course it adds some HTML helpers)?

    In fact, the crucial characteristic of ASP.NET MVC lies in the isolation of M-V-C, the invocation mode of the business logic, and the new-styled URL Routing drive mode, rather than the template mode. So it’s not true to say the View tier of MVC is more clear than that in ASP.NET Web Forms, because we can also write in the mode quite similar to ASP.NET MVC in an ASP.NET .aspx web form.

    More ASP.NET Articles
    More By Xianzhong Zhu


       · I would like to point out that unit testing is not a requirement of an MVC project....
       · I rated "Disadvantages of the ASP.NET MVC Framework" 4/5 even though I'm a tough...
       · There is no replacement for proper planning and a good design. The first best...
       · MVC is a major boon for my company. We spend on average half the amount of time on...
     

    ASP.NET ARTICLES

    - ASP.NET DotNetNuke Installation with Visual ...
    - Using ASP.NET with a MySQL Database
    - Using ASP.NET with an MS Access Database
    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek