ASP.net MVC Vs ASP.net Web Form

 
Software Architects have been involving lot of debates about different approaches and architectures. Some of the examples are ORM Vs Store Procedures, REST Vs SOAP, etc. There is a debate happening inside the Microsoft community about ASP.net web form Vs ASP.net MVC. Many people thinking that ASP.net MVC will be replace webforms at least eventually and others are thinking that ASP.net MVC will not be replace webforms. Will ASP.net MVC replace webforms?. ASP.net MVC is an alternative approach to webforms rather than a replacement. It will not replace webforms and webforms will not replace ASP.NET MVC. The fact is that ASP.NET MVC and webforms will co-exist and that ASP.NET MVC is not a replacement for webforms. If you prefer ASP.net MVC use it and you feel webform is more comfortable, you can use it. . Both approaches are just choices and different approaches and choices are good things. Different choices are available for other platforms especially in the Java platform.

Problems with ASP.net Web Form

What are the problems with webforms? In webforms, Microsoft has tried to make windows form model development for web application development. That model was attracted lot of windows form developers especially VB 6.0 developers. Many of VB 6.0 developers had moved to ASP.net web development without knowing the basics of HTTP and web. For simulating windows form model development experience, webforms introduced event-driven approach and also introduced Viewstate and Postback. The end result is that web forms breaks the stateless nature of the Web. Both Viewstate and Postbacks have been made lot of problems and increased complexity of the web application development. Many web pages having hundreds of KB size of Viewstate that affected the performance of the applications sometime. Developers do not have the control of the rendering HTML of web forms and Server controls that render html with mixed inline style and deprecated tags that does not follows standards. Another problem with Web Forms is the integration of JavaScript frameworks due to the naming conventions of rendered HTML. The page life cycle of the Web Form is too complex and has the tightly coupling between all things in the ASP.net framework and a single class is used both to display output and handles user input. So unit testing is almost an impossible task. Today unit testing is very important in modern software development especially when we following agile methodologies and practices. Since web is a stateless thing, Events, Postbacks and Viewstate are not a good way. Today many ASP.net web form developers are facing different type pf browser compatibility issues when developing public face internet applications

The ASP.net MVC way

The ASP.NET MVC simplifies the complex parts of ASP.net Web Forms without any compromise of the power and flexibility of ASP.NET platform. ASP.net MVC implements Model-View-Controller UI pattern for web application development that lets you allows to develop applications in a loosely couples manner. MVC pattern is separating the application in three parts- Model, View and Controller. A view is responsible for rendering the user interface (UI) of the application and it is nothing more than html templates that filled with application’s data passed by the controller. The Model implements the logic for the application's data and it represents the business objects of the application that using the View for rendering user interface. Controllers are handles and responds to user input and interaction. The web request will be handled by the controller, and the controller will decide which model objects to use and which view objects to render. The MVC model replaces the Web Form events with the controller actions. The main advantages of the MVC models are clear separation of concerns, unit testing facility, and more control over the URLs and HTML. The MVC model does not use Viewstate, Postbacks, Server controls, and server-based forms that enable full control over the application and html rendered by the Views. MVC model is using Representational state transfer (REST) based URLs instead of file-name extensions used by the Web Form model so that we can make search engine optimization (SEO) URLs published by the application. Currently MVC supports only .Net Framework 3.5 and if you want to use with .Net Framework 2.0, visit Scott Hanselman’s blog entry Deploying ASP.NET MVC on ASP.NET 2.0

The below code shows the implementation of MVC application.

ProductsController.cs (Controller)

 


In this sample, I have used extension methods to the HtmlHelper class to display ordered list of information.

OrderListExtensions.cs


Category.aspx (View) 

 

Advantages of MVC Model

  1. Enable clean separation of concerns (SoC) .
  2. Enable full control over the rendered HTML.
  3. Enable Test Driven Development (TDD) (built with TDD in mind).
  4. SEO and REST friendly URL.
  5. Easy integration with JavaScript frameworks.
  6. Support third-party view engines such as NVelocity, Brail, NHaml.
  7. No ViewState and PostBack events.
  8. Follows the stateless nature of web.
  9. Extensible and Pluggable framework. 
  10. Ideal platform for Web 2.0 applications.

Advantages of Web Form Model

  1. Provides RAD development.
  2. Easy development model for heavy data-driven LOB applications.
  3. Provides rich controls.
  4. Familiar model for windows form developers.

Which is the best approach?

The choice would be vary on different people. If you want more control over the HTML or you want Test Driven Development (TDD), or you care about web standards, accessibility, or you want to build SEO based URLs, you can choose MVC model. If you want rich controls and state oriented event-driven web development, you can choose Web Forms model. If you feel more comfortable with MVC, choose that model and you feel Web Form model is more comfortable, choose that model. Both are just choices. If you start your career with ASP.net Web Forms and do not have full knowledge of Web, it will be very difficult moving to MVC model.

I prefer MVC over Web Forms and I feel that Microsoft is going to a right direction through MVC. Its technical features as well as the open source nature are attracted me a lot.The MVC model allows me full control over the HTML and enables Test Driven Development (TDD). We can easily integrate with jQuery and other JavaScript frameworks with MVC. Using extension methods of C# 3.0, we can make powerful and rich HTML helper methods. I believe that tesatbility, refactoring capability and maintainability are the main factors for a successful project and prefer these factors than RAD capability. The MVC model allows to build highly testable, maintainable loosely coupled applications with good practices such as TDD, Seperation of Concerns (SoC) and Dependency Injection (DI). You MUST use ASP.NET MVC for public face internet applications.

Published Wednesday, July 09, 2008 11:38 PM by shiju
Filed under: ,

Comments

# re: ASP.net MVC Vs ASP.net Web Form

Thursday, July 10, 2008 8:43 AM by rrobbins

I'm studying CakePHP which brings MVC to PHP web application development. This will help me to understand Model-View-Controller without getting into ASP.NET beta technology. I don't plan to get too deeply into CakePHP. But it is easier than trying to learn MVC using Ruby On Rails.

# ASP.NET MVC Archived Blog Posts, Page 1

Thursday, July 10, 2008 9:02 AM by ASP.NET MVC Archived Blog Posts, Page 1

Pingback from  ASP.NET MVC Archived Blog Posts, Page 1

# ASP.net MVC Vs ASP.net Web Form

Thursday, July 10, 2008 9:36 AM by DotNetKicks.com

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# re: ASP.net MVC Vs ASP.net Web Form

Thursday, July 10, 2008 11:10 AM by FTeR

I was quite excited about this new stuff. But recently I can't help to think that this is a huge step back.

I come from php, so I don't lack of knowledge about the web and I done this MVC stuff without realizing it, I thought about it as templating.

While I'm pretty good at css, javascript and html, I think the greatest thing about WebFroms, that you don't have to know about thees things and their platform dependent natures. You only have to learn/use ASP.Net.

For that standard breaking problem, there is now that CSS friendly adapters package (you can use jquery with them without a problem). One of the great thing about WebForms, that you actually have full control over the output html (trough these adapters), and you have to do this stuff only once (for every platform you target) and hopefully, someone else already done this for you. You don't have to care about these every time you build a site.

About breaking the stateless nature. It is not a problem with WebForms, this is the greatest feature. It's a problem with the web, that is stateless.

I feel this is a step back, bec I would have to do all coding by myself again, considering all the pains of the web. (After the gridview it is really painful to type <table>)

This TDD may be a good approach (and this was the first thing that made me excited, the 2nd was routing), but it is not worth sacrificing the benefits of the WebForms.

I realize the limits of the WebForms considering the SEO, but it's not always has the top priority.

Maybe the best approach would be to use WebForms (DynamicData) for back end / administration sites (despite the lack of unit testing) and use MVC for front end. I'm talking about RAD.

# re: ASP.net MVC Vs ASP.net Web Form

Thursday, July 10, 2008 1:08 PM by Peter

To say this article is one sided is an understatement.

"The end result is that webforms breaks the stateless nature of the Web." Breaks?! Why such a negative word? It works around the limitation, I would hardly call that breaking anything.

"Even simple web pages broke more than 100KB size of Viewstate that affected the performance of the applications sometime." I call this BS; it's not like you are forced to use the ViewState, just disable the ViewState and the problem is no more. You will have to architect your pages differently, but with WebForms at least you have the option of disabling the automatic state, with MVC there's no such thing.

"The page life cycle of the Web Form is too complex," again, this is debatable. If you jump into it, then yes, it's more complex than MVC, but the learning curve is much smaller than with MVC. With MVC you have to know most of the details upfront before you even start, with WF you can learn as you go.

"Developers does not have the control of the rendering html of webforms and Server controls that render html with mixed inline style and deprecated tags that does not follows standards." You have control over the html, you do not have control over the html that each control renders, but that's a control issue, not a WF issue. When MVC will have a control model the MVC control will most likely suffer from the same issues.

The one true limitation of WF is testability, however you can work around this to a certain point by moving your methods in testable libraries and using the aspx and codebehind like you would use the views in MVC.

On the other hand, right now, MVC is missing a lot of pieces of the puzzle. There's no component model, simulating state is a big pain right now; and you have to simulate state one way or another, or your clients will scream at you. The nice thing about WF is that everything is a node in a tree, so naming conflicts are taken care of. No such story with MVC as far as I know.

MVC has potential, but it's not there just yet while WF is fairly mature with lots of existing controls and libraries.

# re: ASP.net MVC Vs ASP.net Web Form

Friday, July 11, 2008 5:21 AM by Vipul Limbachiya

Thanks for the post. It was easy to understand difference and why to choose what after reading.

# re: ASP.net MVC Vs ASP.net Web Form

Tuesday, July 15, 2008 10:20 AM by Jiang Tang

More control of the generated HTML for MVC, yes.  But the embedded HTML tag is really ugly.  I think we need an abstraction layer to get rid of those HTML tags.

Ideally, you will have a GUI designer and layout your page and the plumbing code for controller, model, view should be automatically generated for you.  If I have to write the HTML tags all over the place, I would rather work with some other languages and tools.

What about a side by side comparison to implement a gridview like UI using both WF and MVC?  It will take tons of code and effort to do that in MVC.  Yes, you can write test code easily, but you have to realize that by using GridView for WF, all the tests have been done for me by the people who developed GridView versus you have to write your test code to test your "gridview" like construct in your MVC code.

ASP.NET MVC at the current stage should not be used for any serious enterprise level development.  It's only good for "Hello world" type of academic excercise.

# re: ASP.net MVC Vs ASP.net Web Form

Tuesday, July 15, 2008 1:24 PM by Steve

Thanks for the post.I think MVC is the best way to go.

# re: ASP.net MVC Vs ASP.net Web Form

Friday, July 18, 2008 6:57 PM by Mike

Thanks for the article,

For those of you who assume that MVC isn't capable of developing "real world systems"  Your wrong-  I'm using MVC to build a production system at work, and it's working out great. I don't even miss being able to drag and drop grid views! (and no, it doesn't take that long to write a for loop to create a table in HTML). Yes I understand the gamble of the ever changing previews, but it hasn't been a problem so far.

Keep in mind that the proprietary web implementations of MS (abstractions from HTML, css and javascript etc) was part of the problem with web forms in the first place. We don't need to be abstracted from what the end product will be.

The fact is I'm getting more done, faster with ASP.NET MVC and there's been little compromise.

Granted, its not as mature as web forms, but its close relationship with core web technologies makes it easy to step outside the framework and take over, which can't be said with "Old School" ASP.NET ;).

...I hate to be "That Guy", and I know it's not the point of this article but ORM's and Stored procedures aren't mutually exclusive.

# re: ASP.net MVC Vs ASP.net Web Form

Monday, July 21, 2008 5:15 AM by Ervin Ter

Steve, I got the same thought as you. WebForm is too heavy if compare to MVC.

# re: ASP.net MVC Vs ASP.net Web Form

Monday, July 21, 2008 10:23 AM by Kim

MVC pattern is the better way to develop web applications and this has been proved by Ruby on Rails (RoR) for the past few years.

# re: ASP.net MVC Vs ASP.net Web Form

Monday, July 21, 2008 1:19 PM by Mike

Indeed the MVC Pattern is the "Proper" way to develop all applications, not just web based. Ideally we'll move to a framework where the views can be swapped out (web for windows etc.) leaving the model and controllers untouched.

It's been around since the 70's but credit should be given to Jakarta Struts (Java) for making it popular for web development 8 or 9 years ago.

# re: ASP.net MVC Vs ASP.net Web Form

Tuesday, July 22, 2008 9:20 AM by FTeR

"(and no, it doesn't take that long to write a for loop to create a table in HTML)"

yes, but gridview is not just that. and designers don't like for loops. it's a programmatic term and they are not programmers.

MVC don't have to be anti webforms. you should check DynamicData. It's webform using models, views and controls.

maybe you should try achieve the same result in ASP.Net MVC. DynamicData will do it for you in secounds (and you have full control over the output) while you will spend days with ASP.Net MVC, working on the same task.

I realize DynamicData can't be used for front end sites. It was just an example of MVC used in WebForms.

# ASP.NET2.0 - ASP.net MVC和ASP.net Web Form

Wednesday, September 24, 2008 2:09 AM by 我的心

weblogs.asp.net/.../asp-net-mvc-vs-asp-net-web-form.aspx

# re: ASP.net MVC Vs ASP.net Web Form

Thursday, September 25, 2008 5:06 AM by Myles

MVC is a step back to the dark ages of ASP if you ask me.  Viewstate is not evil.  If you want to keep the size of the page down then there are various avenues open e.g. store it in a SQL Server table, use IIS compression etc etc.  

# re: ASP.net MVC Vs ASP.net Web Form

Friday, October 10, 2008 11:21 AM by Derek Smyth

Hi, interesting article. I am new to ASP.NET MVC and have came from a Windows development background so the Web Forms approach of ASP.NET is more my thing.

However...

I'm seeing the advantage of the MVC and I think when combined with jQuery using ASP.NET MVC will be very straightforward and powerful.

# re: ASP.net MVC Vs ASP.net Web Form

Monday, October 13, 2008 12:49 AM by shiju

New articles about ASP.net MVC

ASP.NET MVC Tip: Ajax and Validations using jQuery -

weblogs.asp.net/.../asp-net-mvc-tip-ajax-and-validations-using-jquery.aspx

ASP.NET MVC Tip: Dependency Injection with StructureMap - weblogs.asp.net/.../asp-net-mvc-tip-dependency-injection-with-structuremap.aspx

# ASP.NET MVC Beta Released

Thursday, October 16, 2008 4:10 AM by Shiju Varghese's Blog

The wait is over ! Microsoft has been released ASP.NET MVC Beta. You can download the Beta version from

# re: ASP.net MVC Vs ASP.net Web Form

Saturday, October 18, 2008 10:58 PM by kushin

Thanks for this post. I am in the process of enumerating the advantages of MVC over webforms and came across this and it helped me make a decision.

I used webforms for more than 6 years now and definitely it has matured into a very stable platform, with myriad of third party controls and fast development cycles. In this respect, I tend to agree with most of the points made by commenters, that most of the list under problems with webforms, already have solutions, be it viewstate that can be disabled or search-engine friendly urls(using httpmodules).

Coming to MVC, it does hold promise as it has been proven by ROR

and many other python & php frameworks(I did work with ROR & Django). However, in its current state(beta) it is still too early for prime-time.  

If you were to compare webforms and asp.net MVC, the advantages/disadvantages are not really the manner to approach,

it is just that webforms is like a young adult and asp.net MVC is

still an infant.

# re: ASP.net MVC Vs ASP.net Web Form

Monday, October 27, 2008 2:38 AM by Iain

"MVC don't have to be anti webforms."

Exactly!!

MVC /MVP are just patterns! You can and (always could)

implement these testable patterns with web forms if you choose to.

MVC is just another development option. For some  projects (and developers) it will be more suitable, for others web forms will.

For wide audience facing “web sites” I’d say MVC is a good option.

For line of business web based applications, I’d insist on all the benefits of a well constructed web forms architecture, still using a MVx pattern for the UI layer.  

# re: ASP.net MVC Vs ASP.net Web Form

Wednesday, October 29, 2008 5:52 AM by shiju

ASP.NET MVC Tip: Dependency Injection with Unity Application Block  weblogs.asp.net/.../asp-net-mvc-tip-dependency-injection-with-unity-application-block.aspx

# re: ASP.net MVC Vs ASP.net Web Form

Wednesday, October 29, 2008 6:04 AM by shiju

@Iain,

Implementing testable MVC pattern for a web form would be very difficult due to its architecture. The main problems are Logic resides in code-behind has tightly coupling between view and code-behind. And has Lack of interfaces or Abstract Base classes that required for better testability.  

# re: ASP.net MVC Vs ASP.net Web Form

Wednesday, October 29, 2008 7:11 PM by iain

It's not that hard. It's all about how you design your view. We've implemented it in many line of business applications. I do agree it does take more effort to get it right. It's not out of the box, and does require a solid knowledge of webforms.

The ironic thing i find about MVC at it's current stage is while it is more natively testable, it struggles with complex UI layers which are often needed for intranet and business apps /portals, these are the types of apps that often require most testing.

# re: ASP.net MVC Vs ASP.net Web Form

Thursday, October 30, 2008 12:26 AM by shiju

@lain

ASP.NET MVC is not for everyone. It is just an option and it is not a silver bullet for every applications. MVC framework will appeal some people and some people will prefer web forms. Different people have different objectives while developing applications and people are adopting different methodologies  and practices for software development life cycle. Someone prefer RAD and at the same time others would be prefer loosely coupled architecture and testability. If RAD is your primary concern, I would say, web form is good for heavy data driven LOB applications. And MVC is good for public face internet applications and web 2.0 model applications. For LOB applications, you need to have a infrastructure framework for MVC to show complex data. But you can do it. If you are not doing Big Design Up Front (BDUF) methodology, you must use MVC model for TDD.

The MVC framework is just reached the Beta stage. But some people already started with MVC. http://stackoverflow.com/ is a killer web 2.0 application developed with ASP.NET MVC.

# re: ASP.net MVC Vs ASP.net Web Form

Thursday, October 30, 2008 12:44 AM by ian

Please dont get me wrong, I think we are i agreeance on many fronts. I totally agree that MVC offers another and very very valid development option. As you said there is no silver bullet either way.

The point I was tryin to make is WebForms is far from a failed architecture and there are pros and cons each way.

# re: ASP.net MVC Vs ASP.net Web Form

Friday, October 31, 2008 12:12 AM by brian

I am an ASP.NET developer start my career with classic ASP. The web form model is sucking me due to its leaky abstraction. I will use the new MVC model. RoR has proved that MVC is a successful pattern for web applications.

# re: ASP.net MVC Vs ASP.net Web Form

Friday, November 07, 2008 6:38 AM by Alex

ASP.NET MVC is ROCKING!!!!!!!!!!

# re: ASP.net MVC Vs ASP.net Web Form

Saturday, November 15, 2008 9:51 AM by Sumit

No one ever mentions that Java has had multiple MVC frameworks for years (Struts, JSF, Spring etc).  Coming from that background, I found WinForms model really clunky for the web.  It is a hack to get Windows programmers comfortable with the web.  I see ViewStates of 300KB or more everyday at my job and that just gives me heartache.  Not to mention that many links are not crawl-able due to postback. Sure you can avoid these problems with discipline, but the architecture itself does not encourage it.

Hope we see leaner web apps through adoption of MVC.

# re: ASP.net MVC Vs ASP.net Web Form

Tuesday, December 02, 2008 4:15 AM by Dave

Yes, I can't help but feel Microsoft has been a bit slow on the uptake with MVC. It would have been nice if they had provided it as an option in ASP.NET 1.0 right from the start.

WebForms is a perfectly valid pattern for web apps. I acknowledge its problems, but I have been involved in some great LOB applications despite these problems. With a bit of thought and some compression, I generally manage to keep ViewState well under 10kB. ViewState gets out of control quickly by developers who don't get the web and small-state design, and when the DataGrid is used instead of DataList or Repeater controls. ViewState really rocks when you understand how to use it. Compared to manually programming hidden form fields for state management, ViewState is a far better option.

ASP.NET MVC is very attractive to me, as the WebForms model lacks control over HTML, URL's and depends too much on postbacks. I'll certainly be looking for the right opportunity to use it.

If you are looking for the "one pattern to rule them all" you need to open your mind a bit. Perhaps you are looking to simply something that cannot be simplified any further. In fact, I think the future may open up even more design patterns for us to choose from. Good programmers & architects will need to understand the pro's & con's of them all.

# re: ASP.net MVC Vs ASP.net Web Form

Monday, December 08, 2008 5:46 AM by sany

well.. looking into future ..dont think it'll take 2-3 years may be 5 yrs, when internet technology will have  more bandwidth and speed for data transfer via internet..

... web-form will win the race..!!

# re: ASP.net MVC Vs ASP.net Web Form

Wednesday, December 10, 2008 11:55 PM by R. Lawson

I have read quite a bit on this pattern, and although I haven't used it in a project yet, I am concerned about the time it will take to implement as well as the inability to visualize the UI in design mode.  Many of the problems it solves I don't see as problems in the vast majority of web applications I have worked on.

I am a big fan of IoC, and strong believer in seperation of concerns.  But I also believe there needs to be balance.  Developers are usually very bad designers.  I like the idea of designers using drag and drop tools to create the UI, think about UX, and doing it in a way that the designer doesn't need to concern themself with complex development.  I also like to easily show a business analyst or client what the end product will look like without actually tying everything together.

Can you point me to an "elegantly designed" web application that followed the MVC pattern?  I can't imagine a designer using Expression * to design the layout while working with a developer.  Can you also quantify the impact on a project in terms of time?

# re: ASP.net MVC Vs ASP.net Web Form

Sunday, December 21, 2008 3:37 PM by Joe

I see the need for both, but I have to say this article is one sided. It started out saying how both are needed, but in no way shows the cons of MVC or the pros of web forms. It’s like a C# dude writing an article how VB and C# are equal and then downing all the VB things like optional parms. Well I guess the good news is that C# 4.0 will make C# VB with curly brackets, so at least that bashing will end.

# re: ASP.net MVC Vs ASP.net Web Form

Wednesday, December 24, 2008 11:54 PM by webform

Nice post !

Thanks for the hard work and the valuable information for sharing with us.

# re: ASP.net MVC Vs ASP.net Web Form

Saturday, December 27, 2008 7:58 PM by Lars-Erik Kindblad

Totally agree with Iain. MVC is just another pattern - and hyped up by clueless developers with no web- or Web Form knowledge. You don't need MVC to get a well architected, SEO-friendly and testable application.

Web Forms:

1. Separation of concerns and TDD - use e.g. MVP (model-view-presenter).

2. Full control of rendered HTML - create your own base control library where you either inherit from the built-in ASP.NET controls or any 3. party controls. Override the rendering to suit your needs and to get valid HTML. Optionally create your own controls from scratch.

3. SEO-friendly sites - if you want your content indexed, stay away from using anything but plain hyperlinks, this goes for both Web Forms and MVC. And do URL-rewrite to get friendly URLs.

4. Web form is as flexible, extensible and pluggable as MVC.

5. Unskilled developers will do as many stupid and bloated things with MVC as they do with Web Forms.

# re: ASP.net MVC Vs ASP.net Web Form

Saturday, December 27, 2008 11:11 PM by Luis

I have been using MVC and it is better than webform model.

# re: ASP.net MVC Vs ASP.net Web Form

Sunday, December 28, 2008 1:48 AM by satish

that's a quite good explanation..most of them seem to think Web forms are good... but its makes your Job tough when its come to separating the Business Logic and the HTML.. just Think i have seen lot of people writing Business Logic in the code behind Page and using the business Layer to Just call Databases with some parameter sending option..but tats where the concern is ... if You want to expose your Business logic as the service then You have to look at the dependency.... i am not saying Asp.net MVC can provide it by default..but its Provides good platform to do...

# re: ASP.net MVC Vs ASP.net Web Form

Sunday, December 28, 2008 11:36 PM by shiju

@Lars-Erik Kindblad

Web form is not extensible and pluggable as MVC. Because the Framework has lack of interfaces and abstract classes. Can you change  the default view engine of webform?

The MVP pattern enables you Testability in webforms but at the same time the framework is not developed with TDD in mind. From TDD perspective, MVC is great and RAD perspective, webform is great.

# re: ASP.net MVC Vs ASP.net Web Form

Friday, January 09, 2009 11:40 PM by Lucas

Great article. ASP.NET MVC is natural way for web development.

# re: ASP.net MVC Vs ASP.net Web Form

Monday, January 19, 2009 11:22 AM by thedude

Microsoft has a hack for everything and WebForms is no exception. Like it or not WebForms is a nightmare to implement in large teams of developers as they all have to learn the specific company and project guidelines and code flow.

Webforms SUCKS to have a nice cross-browser support and you have to be lucky to get the "advantages" of gridviews and so forth in multiple browsers and even multiple OS.

There is a reason why MS is releasing the MVC as an alternative, and that is that most Web20 software devs use the loose coupling MVC in their projects.

Ever tried to port webforms into cellphones? forget it its a huge project on itself for most already develop projects. On MVC it should be as simple as adding the new format.

The web IS a stateless protocol and until they change it, we should be AWARE of it and not to fall in the MS view that viewstate is secure. I have had problems with grids not working right due to cache problems, sometimes even IE 7 would not show pages because the lack of proper xml or xhtml output which you cant change on calendar controls and so forth.

The javascript generated by the webform engine IS bulky and most times unnecessary.

Im looking forward to see a nice MVC abstraction from MS and hopefully they add the advantages of WebForms into MVC. Which from what i read in MS website is possible to mix them both.

I agree that webforms could be powerful to add admin stuff and things that do not render to thousands of users. Webforms is also a good choice for small projects when u just want to build quick apps with less than 1000 users.

# re: ASP.net MVC Vs ASP.net Web Form

Monday, January 19, 2009 3:16 PM by Jeff Ancel

I believe you have some really good points here.  I don't think "Replace" is the right word.  MVC Attracted me to .Net as it was my deciding factor in some of the applications I am working on.  I also feel forms has its place, but I believe their place is in small applications (though larger ones can be pieced together).  

I think the more appropriate large application structure is MVC though, why else spend so much making it happen.  I believe MVC will have some Ole Faithful "Java" developers coming this way (if it hasn't already).

# re: ASP.net MVC Vs ASP.net Web Form

Friday, January 23, 2009 2:28 PM by Greg

I see the MVC model as much more powerful, but yet much more expensive (at least nowadays) option. It is much more powerful because of total freedom to create from scratch. And this is the reason why it'll be more expensive to develop. Another thing that I see, - web sites with the extreme traffic can save money on number of boxes, needed to handle this traffic.

# ASP.net MVC Vs ASP.net Web Form

Saturday, January 24, 2009 12:57 AM by DotNetShoutout

Thank you for submitting this cool story - Trackback from DotNetShoutout

# ASP.net MVC Vs ASP.net Web Form

Sunday, January 25, 2009 1:04 PM by ASP.net MVC Vs ASP.net Web Form - DotNetBurner

DotNetBurner.com - hot .net content! DotNetBurner

# ASP.NET MVC 1.0 Release Candidate (RC) Released

Tuesday, January 27, 2009 9:57 PM by Shiju Varghese's Blog

After 5 CTP versions and 1 Beta version, Microsoft has finally shipped Release Candidate version of ASP

# re: ASP.net MVC Vs ASP.net Web Form

Sunday, February 01, 2009 12:17 PM by micaleel

This is a great artcle, thanks. However, I'll stay with my ASP.NET Web Forms for simplicity reasons until the ASP.NET MVC Framework is matured enough.

# re: ASP.net MVC Vs ASP.net Web Form

Friday, February 13, 2009 12:43 AM by Alex

Great article. I will choose ASP.NET MVC over webform.

# re: ASP.net MVC Vs ASP.net Web Form

Friday, March 27, 2009 2:19 PM by Tuan

Good article and great comments contributed by other fellow developers. Helped me a lot.

# re: ASP.net MVC Vs ASP.net Web Form

Tuesday, March 31, 2009 11:08 PM by Steve

I definitely see value in .Net MVC. But it does not seem like it should be used for every project. Saying that you can easily change an app from web to windows or to a cell phone fails to mention several things.

<rant>

The MVC application has to be written correctly for it to be easily changed. Most developers are of average skill, so expecting a team of developers to think and code perfectly for each use case under tight deadlines to allow proper separation of concerns assumes a lot. There are always issues that pop up in even the simplest upgrades/migrations, so selling MVC by saying that you can change views easily is an over simplification.

Also, how often do you develop a web app and then then suddenly decide you want to make it a windows app or a cell phone app? Only rarely would this occur. If you are starting a project then you would have considered this ahead of time and put the required effort and plannig into the project from the start. Also, I would think if you wanted to create a cell phone app you would want to use an SDK specifically for the platform in question. So just because you can do something because of MVC doesn't mean you should.

</rant>

Web forms and MVC both have their place. If you choose the wrong one for your project then life can get ugly.

# re: ASP.net MVC Vs ASP.net Web Form

Wednesday, May 06, 2009 6:28 AM by Ho Huynh

Thanks for the post! Your information helps me so much in decision between MVC and WebForm.

# MVC vs. ASP.NET | Using jQuery Grid in MVC applications for better user experience &laquo; Technical leaders&#8217; Blog

Pingback from  MVC vs. ASP.NET | Using jQuery Grid in MVC applications for better user experience &laquo; Technical leaders&#8217; Blog

# re: ASP.net MVC Vs ASP.net Web Form

Sunday, June 14, 2009 3:58 AM by bhavtosh

informative content. good work

# re: ASP.net MVC Vs ASP.net Web Form

Monday, June 15, 2009 6:27 PM by Jero

I am trying understand MVC but dont end to get it. If presentation is totally separated from the controller how is possible <ol>, <li> tags and others are included in the OrderListExtensions.cs example you provide??? Sorry for the question if it's too obvious, but I am newbie.

# re: ASP.net MVC Vs ASP.net Web Form

Wednesday, June 24, 2009 1:42 PM by Mario

Anyone thinks they will more than 50% of mvc programmers anytime soon?

# re: ASP.net MVC Vs ASP.net Web Form

Friday, July 24, 2009 9:15 PM by cnua

thanks for taking the time to write this article. I am a professional developer with 11 years of web development experience and with the last hour and half or so of digging into MVP with intent of finding out its usefulness for the kind of work i do day in, day out i have come to the following conclusion

MVP is not a challenger to the productivity of using WebForms so the .net developer can dispel with any such concerns and get on with their jobs. the reason i say this is because MVP for the non .net developer is a solution package for languages like PHP, easing the application building process and sophistication over basic CGI like capabilities

experienced .net web developers will achieve most of the points listed as advantages of MVP with savy WebForm development. i disagree with you that the webform page life cycle is too complex and urge you to master it and enjoy commercial productivity from n-tiered development. those that have spent years using classic asp javascript html etc to build business applications will relish the power of webforms

# re: ASP.net MVC Vs ASP.net Web Form

Thursday, August 20, 2009 1:38 PM by Calvin

nice article & comments! nothing is complex once you master it :) but if you see internally how things works - when you talk about asp.net gridview, its a bit ugly code comparing to asp .net mvc. any component/ 3rd party component developers will agree on this. and the SoC is damn good thing in asp. net mvc. and if you worry about writing more code for creating your own controls, you got 3rd party vendors who already developed asp .net mvc grid and other controls. and i am not saying that asp .net mvc is a replacement for asp .net – but its just a better way of doing :)

happy coding!

# ASP.NET MVC: What is it and should I use it?

Wednesday, September 02, 2009 9:18 PM by Microsoft Support Team's IIS Blog

In March of this year, we released ASP.NET MVC. Since then, many ASP.NET developers have been perplexed

# re: ASP.net MVC Vs ASP.net Web Form

Tuesday, September 08, 2009 9:35 PM by jason

right

# re: ASP.net MVC Vs ASP.net Web Form

Friday, September 11, 2009 6:39 AM by Manoj

I am new to MVC and haven't formed an opinion or take decision on which way is better. With MVC, is it possible to find what caused the Post to occur considering I have multiple submit buttons (each one doing a separate action at the server end) on the form.

# re: ASP.net MVC Vs ASP.net Web Form

Saturday, September 12, 2009 2:01 AM by shiju

@Manoj You can possible to use multiple submit buttons. Check this link stackoverflow.com/.../how-do-you-handle-multiple-submit-buttons-in-asp-net-mvc-framework

Leave a Comment

(required) 
(required) 
(optional)
(required)