Tuesday, June 23, 2009 4:03 PM tony_lombardo

MVC vs. WebForms, A Clear Loser Emerging

Working with WebControls and WebForms for the past 8 years has taught me a lot about web development.  The one thing that I learned above everything is that the onus is on the developer to write good code.  Now that may not sound like something revolutionary, but the fact is that ASP.NET WebForms makes building web applications easy by abstracting away some of the difficulties of a stateless protocol.  And it also makes it easy to forget about what’s actually happening behind the scenes to make everything possible.  Does that mean WebForms is flawed?  No.

MVC offers a fix for some of the problems that WebForms has been plagued with.  Problems like bloated ViewState, and that ‘pesky postback model.’  On the surface, this looks like an attractive solution for every web developer out there.  A promise to get rid of ViewState – a web application’s mortal enemy?  It has to be good. That is until the application your building needs some sort of state mechanism, and you begin re-inventing the wheel.  I think it would have been much easier just to go back to you WebForms application and disable ViewState. 

The problem right now is that there is so much focus over why MVC is better than WebForms, that everyone is forgetting a basic rule of software development: use the right tool for the job.  I’ve said it dozens of times, MVC has a set of scenarios that it first very nicely, as does WebForms.  One platform does not need to be declared a winner – they’re two equals that should be placed into your metaphorical toolbox.  So who is actually losing right now?  The developer community that is caught in the middle of this faux war.  Developers who think that they have to move to MVC out of pride or fear that WebForms will be replaced by MVC.  Developers who are only hearing one side of the story right now at local community events and tradeshows because let’s face it.. WebForms isn’t sexy anymore at 8 years old.  Ironically, this same issue of “sexy talks” was discussed last week at NDC with Scott Hanselman behind the camera.

Conferences aren’t picking talks about “the old stuff”, because they’d rather focus on what’s new.  New is sexier, and conferences are all about attendance numbers.  But here’s what these conferences don’t seem to understand – every day there’s a new developer joining the community who needs to start from zero.  Developers gauge what’s important by what’s being talked about, it’s why we have trends and tag clouds.  It’s human nature.  If I hear 100 people talking about a subject, it must be important.  Right now I hear 100 people talking about MVC, and no one talking about WebForms, so I guess MVC is more important, right?  That’s the type of thinking happening right now, and it’s nothing new.

“MVC brings web development back into ASP.NET”, is one of the most common arguments I hear for its use.  Yet the whole reason for WebForms existence was to free you of the dirty details of building a web application, and let you focus on your business logic.  To give you a set of functionality to be able to build on top of, the same focus for every library and framework out there.  It’s why you don’t have to write browser specific JavaScript when using jQuery or ASP.NET AJAX, and it’s the reason we don’t still program in machine language.  Can I write a tighter loop in assembly than I can in JavaScript?  Sure.  But for the applications I’m writing that’s not going to be an issue.  Maybe I’m writing an application where performance is the top and only concern.  Now writing the application in assembly doesn’t sound like a crazy idea.  If my requirements were to build a spreadsheet like application that offers filtering, copy and paste and exporting to excel, I’m going to jump to WebForms.  That’s the whole point behind using the right tools for the job. 

I read a blog post today that talked about how you should dump WebForms and go with MVC as soon as possible, so you can get back to web development roots.  The argument just didn’t make sense to me.  It’s like asking me to stop coding in C# and move to C++ because C# developers just don’t understand pointers and memory allocation. 

So here’s my call to action.  Rather than talking about why one framework or platform is better than the other, start discussing when one is better than the other.  What scenarios is MVC geared for?  When would you use WebForms (MVP) instead? 

The best advice I’ve seen so far is that WebForms is the platform of choice for building web applications, where MVC is more suited to building web sites.  This is still a bit abstract since there’s no clear definition of web applications, but I think it’s safe to say that if you’re building a web version of a win client application, you’re building a web application.  If you have a ‘grid’ in your page for purposes above that of just layout, you’re building a web application. 

Filed under:

Comments

# re: MVC vs. WebForms, A Clear Loser Emerging

Tuesday, June 23, 2009 5:07 PM by Dave Tigweld

The undeniable fact about webforms were that they were designed to abstract scarey html and javascript away from existing vb6 developers who didn't want to learn web programming.

ASP.Net Ajax was Shoehorned on in order to keep the old dog going and has never felt like it really belongs.  If you already have a command of Html and Javascript then webforms can feel like bloatware that gets in your way.

I believe that a new MS supported framework was needed. I'm not sure MVC is it however.

# re: MVC vs. WebForms, A Clear Loser Emerging

Tuesday, June 23, 2009 5:34 PM by mhildreth

I think you hit the nail on the head. All I hear about is MVC. When developing business applications, I feel like we spend half our time just throwing up a utility that allows somebody to upload, edit, or download data. MVC is totally overkill for those types of things. Also, for those that invest in learning webforms, being able to develop your own toolbox controls can be a huge time-saver in the long term. It doesn't seem to me that MVC promote such componentized code re-use.

While I agree with Dave that ASP.NET Ajax doesn't really feel like it belongs, it is useful, and can make "ajaxing up" an existing application a snap. If you're building static website, then yes, webforms can feel like it gets in the way, but for constantly evolving business applications, I can't see how you could survive without it.

For those who just like to complain about ViewState, I offer the following:

msdn.microsoft.com/.../system.web.ui.sessionpagestatepersister.aspx

# re: MVC vs. WebForms, A Clear Loser Emerging

Tuesday, June 23, 2009 6:36 PM by Sam Mueller

Oh my goodness, where do I start.

Firstly, ASP.NET MVC is, hands-down, better than WebForms for advanced developers.  The WebForms model was great 8 years ago when developers really wanted to develop for the web in the same way they wanted to develop for windows.  Microsoft thought they could abstract away the fundamental differences between the two platforms.  I think they were successful at their goal, and developers were happy.

But, inevitably, web applications got more and more complex.  That's when the cracks started to really show in WebForms.  In order to push the boundaries of web applications, developers needed to get at the guts of everything.  We needed total control.  And the tools needed to help without sacrificing that total control.  The goal of abstracting the web into something it wasn't turned from being an asset to a giant pain in the ass.

To compound on that, AJAX took the web by storm, and ASP.NET WebForms was *NOT* a framework that helped developers during this paradigm shift.  Just think of the first incarnation of ATLAS, especially the UpdatePanel.  Once again, it seemed like microsoft wanted to abstract all the complexity away in exchange for making things easy.  This time developers rejoiced for all of two seconds before realizing what a mess it was to use the Update Panel for anything even remotely interesting (or maintainable).

At some point, the guys at 37Signals created ruby on rails, which built a framework and tools that embraced the web for what it was, and embraced AJAX for what it was going to be.  Their success is the reason why we have ASP.NET MVC, which follows the same methodologies.

So now we have a choice.  And I am the most thankful developer on the planet for that choice.  My career started with .NET 1.0 Beta, and I've always wrestled with WinForms, especially on complex applications.  Since MVC came out, I've been using it and enjoying every minute.  It's like developing without handcuffs.

Sam

# MVC vs. WebForms, A Clear Loser Emerging - Tony Lombardo

Tuesday, June 23, 2009 6:40 PM by DotNetShoutout

Thank you for submitting this cool story - Trackback from DotNetShoutout

# re: MVC vs. WebForms, A Clear Loser Emerging

Tuesday, June 23, 2009 7:05 PM by Carl

@Sam

Well said. Webforms definitely had its purpose, and now that there is a flood of .NET web devs, it's time to graduate away from postback model, among other bandaids in the framework.

# re: MVC vs. WebForms, A Clear Loser Emerging

Tuesday, June 23, 2009 7:33 PM by Craig

I prefer to use MVC, even for Web "Applications" for three reasons.

1. When designing complex UI the Property/Method/Event model that WebForms uses ends up getting in your way. You are forever chasing events and hoping the right thing will get called at the right time to cause some magic to happen like a grid to get formatted or a value to be updated. It was the same problem I had with Delphi after a while. Event Spaghetti is what I call it.

2. For an experienced web developer who knows the difference between a POST and a GET and isn't afraid of writing some JavaScript then MVC is much more productive. It is hard to believe that manually writing HTML for a web page can be done much quicker than using visual tools, but it is the case.

3. The average developer doesn't understand things like trying to separate business logic from presentation logic and database logic. They just started coding and see where it takes them. MVC at least points them in the right direction.

# Webforms vs. MVC, the desire to rewrite everything, an unexpected benefit

Tuesday, June 23, 2009 10:25 PM by Community Blogs

I read a good post today about the silly wars that go on in versus debates, in this case the arguments

# Webforms vs. MVC, the desire to rewrite everything, an unexpected benefit | rapid-DEV.net

Pingback from  Webforms vs. MVC, the desire to rewrite everything, an unexpected benefit | rapid-DEV.net

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 12:45 AM by Steve Sheldon

I generally find it a lot easier to develop applications using MVC.  

Last week I was modifying an existing application which uses the ASP.NET AJAX stuff.  I needed to be able to do a postback from a checkbox in a datagrid to turn the indicated row on or off.

In MVC using jquery, this would have been about 5 minutes work.  Just add the checkbox input with a jquery statement that does a call back to our MVC controller with the appropriate path and inputs.

With ASP.NET AJAX, first I spent about an hour finding out how to do it on google, then I had to write some custom javascript, then I had to make sure I added the ajax httphandler in place and configured pagehandlers.  Took me most of the morning to get it working right and testing the configuration.

And this doesn't even begin to get into the thousands of examples out on the internet using custom ajax functions written for jquery or some other javascript framework that just flat out work out of the box with MVC but require hours of monkeying to make work with the ASP.NET AJAX.  Why not benefit from everything PHP, Ruby or whatever developers do?  Why be different just for the sake of being different?

It's actually the datagrid stuff in asp.net webforms which has caused me the most pain over the years, like my example.  bloody databound events and what not to customize the display.  Bleah!  Just give me a for loop and I'll emit the HTML myself.  Far easier to deal with for non-trivial examples.

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 2:43 AM by shiju

My one year old post on MVC Vs Web Form  weblogs.asp.net/.../asp-net-mvc-vs-asp-net-web-form.aspx

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 3:02 AM by T

100% agree with you, i share same sight to this new model2 wave.

# Webforms vs. MVC, the desire to rewrite everything, an unexpected benefit | Nexo IT - Information Technology News

Pingback from  Webforms vs. MVC, the desire to rewrite everything, an unexpected benefit | Nexo IT - Information Technology News

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 10:16 AM by alessandro

Tony, excellent post. I agree with  you in full 100%.

Thanks for posting this.

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 11:13 AM by docluv

I have not bought into the MVC 'hype', I have seen nothing there to really impress me, yet. Just some new shiney toy to play with. What I have grown tired of is bloated pages generated from Web Controls, etc. So I finally made a concerted effort to put into practice something I wanted to do for several years, create the UI with HTML and CSS. Not using MVC, just using the same ole ASP.NET foundation I created over 300 production sites from the last decade. I just stripped out the web controls and I love it. Face it, if you are going to implement MVC you have to learn these principles in the first place, but sadly MOST MVC zealots are not going to take the time to really do it correctly.

Anyway, you can follow my series as I add new entries: professionalaspnet.com/.../default.aspx

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 11:21 AM by tony_lombardo

@Sam, @Sheldon - Abstraction leads to progress.  That wretched UpdatePanel that you speak of solved a problem that 80% of developers were trying to solve, and did it gracefully.  Admittedly though, it is one of the most overused and abused controls out there.  But to me, WebForms is all about the common (80%) development tasks easier.  By making those tasks easier, developers can focus on the real problem like business logic.  As Sheldon mentioned, for the simpler grid scenario, spitting out HTML is easier, and I agree.  It's when you get to the more complex grids that mimic Excel like functionality that WebForms becomes irreplaceable.  Are there scenarios that MVC makes easier?  Certainly.  The key is to use the tool that fits best, and use it the way it was designed.  

@Craig, thanks for sharing your list of MVC Strengths.  There's no doubt that MVC makes separation of concerns a top priority, and I too grow tired of event spaghetti.  In the end, these are the types of tradeoffs that need to be weighed when choosing between WebForms and MVC, and will likely change from application to application as the requirements change.  As @mhildreth said, for the apps he's building, the MVC separation of concerns is complete overkill.  

Thanks all for your great comments!

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 11:26 AM by tony_lombardo

@docluv - Being a developer who wrote some of that bloated web control markup, I can tell you that I'm entirely with you on the need for clean and concise markup.  The problem has always been the disparity between browsers, and coming up with the least common denominator. Sadly, 7 years ago that meant tables for everything.  The Dark Ages of web development..  Luckily browsers are getting better, and WebControls are being updated.  Hopefully the HTML bloat will be a non issue soon.  I know at Infragistics this is one of our top concerns.

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 11:47 AM by Simone Chiaretta

Tony,

There has been a lot of discussion going on about when to choose one or the other.

WebForm is still great if you have to build heavily datadriven apps, or if need a RAD development, if you are building a prototype, or you have to rely on the component model, either because you need to (a la sharepoint portal, with webparts) or because you deeply invested in control libraries (either custom or 3rd party).

ASP.NET MVC is better if you have a TDD approach, if you want finer control over HTML markup, if you care about writing good code and if you want a more strict guidance for doing it.

Yes, I'd also say that your distinction is fine: if you want to build a web-version of a winform app (a CRM or a ERP) without using Ajax, go for WebForm. If you are building a public facing website, (CMS, e-commerce, government sites, and so on) go for ASP.NET MVC.

In addition to this:

the C# -> C++ vs WebForm -> MVC is not correct.

Now nobody cares about pointers and memory allocations because now PC have loads of memory and because compiler are getting the job better than humans.

The same is not true when it comes to HTML: broadband is not "enough", and unfortunately the "HTML Compiler", which is the WebForm control, is not good enough to replace the human in writing markup... and unfortunately browser are not good enough to render crappy HTML correctly.

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 11:51 AM by Lee Dumond

A closely related post from a few months ago:

leedumond.com/.../10-reasons-asp-net-webforms-still-rock

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 2:30 PM by foobar

-- Simone Chiaretta

unfortunately browser are not good enough to render crappy HTML correctly.

Au contraire.  Browsers, IE in particular, are very, very good at rendering bastardized HTML. This is the single most important reason why web-form lovers believe web forms are the best thing under the sun.  They've never had to worry about bastardized HTML emitted by web-form controls. :-))))))

# I love .NET! » Blog Archive » Webforms vs. MVC, the desire to rewrite everything, an unexpected benefit

Pingback from  I love .NET!  » Blog Archive   » Webforms vs. MVC, the desire to rewrite everything, an unexpected benefit

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 7:31 PM by Simone

@foobar: you are right IE tries to render everything... but unfortunately it renders it in its own way...

given the recent decision of dropping HTML support from Outlook, I guess MS could make webforms emit a Word document... IE9 will probably be Word 2012

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 8:18 PM by alessandro

I'm not aware of one instance in which HTML emitted by the standard webcontrols in asp.net is not XHTML Strict compliant when you set this in web.config <xhtmlConformance mode="Strict"/>

Perhaps you mean it's a little bloated? This is hardly an issue with broadband. Just keep in mind that HTML is HTML regardless.

Further more, if bloated markup becomes a problem, you can easily extend the controls by overriding the rendering. I wouldn't think this to be as easy as editing the html declaratively but the option is there.

In general though, I wouldn't worry about the markup rendered by webcontrols. This is normally fixed and improved with each version of asp.net ; If you recall, asp.net 1.0 emitted non standards compliant markup. This was fixed with asp.net 2.0 and we all got this for "FREE". Everytime there is a problem that demands immediate attention, microsoft has been quick to fix it and these are all fixes we get for FREE again.

Personally, I feel when building web applications, there's a lot more to worry about than an extra "td" here and a nested "table" there.

MVC shines in areas of TDD true and maybe best for some people, but best is subjective and whatever way works for you* is what is *best* in the end.

ASP.NET 4.0 is releasing soon and there are already many new enhancements on the way for webforms : www.asp.net/.../aspnet40 ; Contrary to what many people want to believe, webforms is only getting better. Too many solutions have been built during the past 8 years that will ensure it's *dominance* in the market for many years to come.

Nobody is going to throw out solutions they invested heavily in simply because there is a new model for developing web applications in ASP.NET

As tony points out in this post, MVC gives you choice. It's not here to replace anything and while some may love it, it won't float everyone's boat. Use the tool that fits the job.

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 24, 2009 10:29 PM by Bart Czernicki

This is one of those things where I almost got caught up in the hype.  I started researching MVC and it was great, however it also comes with some challenges over web forms that many people who are on the MVC bandwagon don't advertise too much.

For example, one of the biggest challenges for us is maintaining web part integration..something you still need WebForms for (or at least a partial MVC/WebForms split).  I want to see how well this is also supported going forward in enterprise web applications Microsoft offers like SharePoint.

# re: MVC vs. WebForms, A Clear Loser Emerging

Thursday, June 25, 2009 10:00 AM by webforms

cool. These are the same conclusions I came to myself. MVC is nice on paper!

# re: MVC vs. WebForms, A Clear Loser Emerging

Friday, June 26, 2009 6:34 PM by foobar

-- alessandro

>> microsoft has been quick to fix it and these are all fixes we get for FREE

You're deluding yourself.  You pay for AspNet indirectly.  If you want to run your AspNet-based website you have to have Win2k3 or Win2k8. And you must pay for it.

>> many new enhancements on the way for webforms

Again, you're deluding yourself. Microsoft will never abandon its support for web forms, but it's not going to keep sinking any significant money in web forms either. Microsoft is betting on Silverlight. And that's the technology web-form adherents should be looking into.

# re: MVC vs. WebForms, A Clear Loser Emerging

Thursday, July 02, 2009 9:29 AM by G.S.

You said it all!

I only want to comment  on the comment that "WebForms is for VB6 developers who don't want to learn web and Javascript."

That statement falls apart as soon as some "web and JavaScript" guru faces the development of a true business application. He will either fail to deliver, or if he's really good, he'll end up reinventing 99% of what  WebForms brings to the table.

# Faith &#8211; The Time is Now Again &laquo; ActiveEngine

Saturday, July 18, 2009 8:49 AM by Faith – The Time is Now Again « ActiveEngine

Pingback from  Faith &#8211; The Time is Now Again &laquo; ActiveEngine

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, July 22, 2009 11:01 AM by Jay

A very fast search in the article+comments on words like "test", "architecture", "pattern" makes me totally surprised !

All the debate is about comparing two technologies ! But it SHOULD be about comparing two architectural patterns (Page Controller + Template View vs MVC) !!! And, effectively, you choose one of the patterns in different situations !

Why I will certainly not use Webforms anymore is because of the complexity induces by the ASP.NET lifecycle, which is totally unuseful, except for handling stateful components, and the testability of the framework.

Can anyone inject dependencies in pages in a simply manner ? (Yes, I know about Spring ! I've used it !) Can anyone simply unit-test every event handler of a page ? Can anyone simply mock any dependency of a web page ?

So while testability, and so maintanability, is the primary priority, yes, MVC is the best choice you would ever take. But ASP.NET MVC is more than that ! ASP.NET MVC is about scaffolding.

Tony you should really make a deal with one of your friend who knows ruby on rails, and try to beat him in developping a webapp efficiently. Even with complex ASP.NET components. You would be very impressed... unless your friend is not aware of RoR, or if you have blind eyes ! :)

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, August 26, 2009 6:21 PM by Dave

Tony, GREAT article.  Honestly I'm kind of shocked at how quickly some of the webforms zealots have flocked to MVC.

I remember switching from Classic ASP to .Net webforms thinking about how crazy it was to try and break away from the basic GET and POST concepts, and get into the whole postback thing.  Meanwhile people at conventions would hold their nose up and scoff at the old school ASP developers.  Now it almost seems like the old Classic ASP development is back, especially if you compare it to the old COM WebClasses model.

I've made plenty of websites in both MVC and webforms, and I absolutely agree that the two can coexist as tools in the same toolbox.

Just another religious war for the programmers.  Ignore all the shouting and pick for yourself.

# re: MVC vs. WebForms, A Clear Loser Emerging

Monday, August 31, 2009 12:59 PM by Larry

This post is one of the best viewpoints I've seen on ASP MVC and it has helped to solidify it for me. After doing a years worth of Ruby on Rails off and on as well as .NET web forms, I'm convinced that MVC is a better solution for web sites while web forms is an excellent solution for web-based applications. And I define a web-based application like this...

If the solution would work as well in client-server form but web-based is chosen for ease of access and distribution, then it is an application.

(BTW... you don't have to use an MVC solution to do MVC designs.)

# re: MVC vs. WebForms, A Clear Loser Emerging

Tuesday, September 22, 2009 8:05 AM by sura

hello. sir, i am actually working on a thesis entitled "significance of using MVC Framework in developing a web based application"

is you do have some idea on what parameters should i use in order to measure the data retrieval performance of the web application, please please do let me know...

please email me at engotzz_16@yahoo.com

please help me, i am a 4th year computer science student, and i would really like to graduate this school year.. please please help me.. if you can recommend soem other experts on the matter, plwase please tell them just email me.. thnx

# re: MVC vs. WebForms, A Clear Loser Emerging

Tuesday, October 20, 2009 11:50 AM by Mark Arnold

I'm a WebForms Developer and wanted to know about MVC. Ive just watched 10-15 Videos on the subject at http://www.asp.net and was very interested. However, I still can't make up my mind if I should start using it to create a new application I'm developing. There's a lot to think through..will it have the same look and feel?, can I mix them up (webforms and MVC)?, can I use a 3d party control in an MVC page? I've already spent weeks trying to find out the answers whilst not writing a single line of code or dropping a single control onto a page. Do I realy want to be 2 months into development to find I cant do something in MVC that I could in WebForms? If someone can say "Yes, you can" with authority, I'm going to stick to webforms for now

# U2: Rattle and Hum, 1988

Sunday, December 27, 2009 5:26 PM by U2: Rattle and Hum, 1988

Pingback from  U2: Rattle and Hum, 1988

# re: MVC vs. WebForms, A Clear Loser Emerging

Monday, January 25, 2010 7:19 PM by David Barrett

I know that this is quite an old topic now but I had to post.

There was a user back in July that said "MS will not sink significant money into win forms" to this I must point out that

a. Win forms is currently dominant - and is likley to remain so for some time.

b. MVC.NET is built *ON TOP* of win forms.

I agree 100% with the article use the right tools for the job - I find it quite amusing that > 95% of the comments miss the point of the article and are all bashing one method over another...

Ill use win forms or MVC depending on the app...

One last thing: to the poster that said (Regarding the datagrid control) "give me a for loop and let me emit my own markup" - - -

All I have to say to that is: Emit me a sortable, editable, pageable table that supports inserts...

Do it with less than 10 lines of code...

And then for a laugh put that into a format that I can share between pages/projects (ie web control)

Before bashing me - please note my line above - Im not saying win forms is the be all and end all - but it has its place.

PS. I like events.

# re: MVC vs. WebForms, A Clear Loser Emerging

Friday, January 29, 2010 1:42 PM by Michael

My first impression of Webforms was "it sure is easy to put a page together, and it sure is a pain to debug".   With MVC, "it sure is a lot more work to put a page together, but is sure is easier to debug".  

MVC is harder to learn in my opinion.  You have to grasp the entire concept, where with Webforms, you can muddle along.  

I'm going to use both depending on the job.  If it is a quick and dirty project, where I need to get it done as efficiently as possible, I'll use Webforms.  That's how you make money, and can compete.  If it is a big project, that I'm going to have to maintain over years and years, I'll use MVC.  MVC is more loosely coupled, and easier to maintain and modify.  Also if I have a customer who is especially picky about the way things have to look on the page, I'll use MVC.

Silverlight is another option now.  I'll look at that when Visual Studio 2010 is released.

# re: MVC vs. WebForms, A Clear Loser Emerging

Saturday, April 03, 2010 11:57 AM by David

I don't have anything against a developer who wants to only use Web Forms.  Each project and developer has contstraints you cannot make hard and fast rules about.

I also have nothing against developers like yourself that have chosen to use both Web Forms and MVC depending on the project.

What this article fails to understand is that there are developers like myself that have made a decision to only develop in MVC and never use Web Forms again.  I build both large and small business applications (with the help of my team of developers).  Web Forms get in my way by trying to help me.  How can you say I am wrong for making that decision just because it does not match your decision.

For new developers I would recommend that they learn MVC first.  Then learn Web Forms as needed.

Also, Telerik has a nice grid for MVC that is open source.

# re: MVC vs. WebForms, A Clear Loser Emerging

Thursday, April 29, 2010 7:22 AM by eoling

It seems that the development time for MVC will much be longer then for WebForms for an average web application. I would use MVC only for a very specific purposes.

This question is similar to the endless WinForms vs. WPF.

# Webforms vs. MVC, the desire to rewrite everything, an unexpected benefit | OOP - Object Oriented Programing

Pingback from  Webforms vs. MVC, the desire to rewrite everything, an unexpected benefit | OOP - Object Oriented Programing

# MVC vs. WebForms, A Clear Loser Emerging | OOP - Object Oriented Programing

Pingback from  MVC vs. WebForms, A Clear Loser Emerging | OOP - Object Oriented Programing

# re: MVC vs. WebForms, A Clear Loser Emerging

Thursday, May 27, 2010 3:32 PM by Justice~!

G.S:

"He will either fail to deliver, or if he's really good, he'll end up reinventing 99% of what  WebForms brings to the table."

I must be amazing then, what with my ability to not only deliver successfully almost 100% of the time *and* have managed to do it without reinventing the WebForms wheel.  Don't worry, I'm happy to come help teach you how to do this too, since it appears to be a mystery to you!

# re: MVC vs. WebForms, A Clear Loser Emerging

Saturday, August 07, 2010 5:46 PM by Jim

MVC has really allowed up to improve the look & functionality of our front ends. We were able to hire two superb front end devs that don't come from an MS dev environment.

People always mention separation of concerns, testability, etc when talking about MVC. But for us the biggest plus for MVC has been letting our front end people go-to-town on an app without them needing to have WebForm knowledge or risk of them breaking something.

# re: MVC vs. WebForms, A Clear Loser Emerging

Tuesday, December 21, 2010 2:39 PM by ipad app for note taking

Good is good, but better carries it.

-----------------------------------

# re: MVC vs. WebForms, A Clear Loser Emerging

Saturday, January 01, 2011 9:20 PM by 23 Inch LCD TV

Just want to say what a great blog you got here!

I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!

Thumbs up, and keep it going!

Cheers

# re: MVC vs. WebForms, A Clear Loser Emerging

Saturday, January 08, 2011 3:39 PM by ipad application

-----------------------------------------------------------

"Virtuous what I used to be searching for and fairly thoroughgoing as surface. Many thanks for placard this, I saw a yoke various associated posts but yours was the optimum  up to now. I outlook it stays updated, really like dread."

# re: MVC vs. WebForms, A Clear Loser Emerging

Monday, January 17, 2011 4:50 PM by appliance reviews

I prefer to acquire breaks throughout the my working day and appear by means of some blogs to view what people today are stating. This blog site appeared in my searches and that i could not help but clicking on it. I'm glad I did simply because it had been a really pleasurable learn.

--------------------------------------------------------------------    

Electrical Engineering

# re: MVC vs. WebForms, A Clear Loser Emerging

Saturday, March 05, 2011 12:17 AM by bartekm

In my opinion, the question is becoming blurred with a lot of the cool features of MVC making their way into Webforms.  ASP.NET 4.0 added URL Routing, reduced ViewState, and greater control of the HTML mark-up produced by many ASP.NET controls, now the next version of Webforms will incorporate many more MVC features into Webforms.  http://bit.ly/dNhBd8

# re: MVC vs. WebForms, A Clear Loser Emerging

Friday, March 11, 2011 8:21 PM by doystin

I honestly can't understand the huge deal with MVC.  Yes, the large ViewState can be a pain, but I had already found a way around that.  In my web forms I have [WebMethods].  This is MS's really easy way of getting POST data from $.ajax requests.  I've already been using these to pass JSON objects to my pages to avoid always having to pass the ViewState.  When I pass the ViewState, it is always in preparation to re-render large parts of the page with updatepanels.  The display logic was handled in the code behind.

And my code-behind contains no SQL queries.  I have actually created by own objects that have properties and can be saved/edited/deleted.  I actually wrote these myself, without an ORM.  These objects are edited in my code-behind.

After spending some time with MVC 3, I have to say that I'm not sure I can really find a huge advantage.  My controller (the page behind in my case) was already just working on the models (my objects) and rending my .aspx page (view) with various partial renderings (my user controls).  I guess I just don't see the huge difference.

Now I have a controller class where all my page behind code has moved, my models are the same, and my views have partialviews.  One thing I do like is that component model attributes for validation.  However, according to the previous link this is about to get incorporated into forms.

Another issue I have with MVC, and this just might be my newbishness, is what do I do with my parent view that has child views that need complicated data and I want to use intellisense?  If my page contains views that require 3 different typed IEnumerables (say one for navigation and two in content for selected and possible), do I have to dump all of these in a ViewBag or write a wrapper for them?  I've done the wrapper to get intellisense, but this could leave me with a ton of classes that I don't really want.  

# re: MVC vs. WebForms, A Clear Loser Emerging

Monday, March 21, 2011 2:14 AM by JonathanWood

Thanks for this article. I've have just come to the decision that it's time to learn MVC. More than any other reason, it's because I've been rounding up consulting work and felt awkward saying I don't know MVC, when many people I've talked to said they prefer it.

However, I have a feeling I might like it based on 1) WebForms is sometimes a bit too high level for me (I ended up writing lower-level stuff to gain more control), 2) although GridView is useful, I've always found it a little cumbersome and too abstract from what's going on underneath for my liking, and 3) I love the clean HTML MVC produces.

I always seem to be running behind. I've been so busy, it seems like I just barely got comfortable with WebForms. I've been a developer for over 20 years and I didn't like my first look at MVC because of the way it mixes markup and code. However, Razor helps here a little and I think it's time for me to make the jump.

# re: MVC vs. WebForms, A Clear Loser Emerging

Thursday, April 14, 2011 9:21 AM by moojjoo

You know I came across your post after watching MIX 2011.  You are 100% correct.  New technologies is what conferences are for.  I have been developing with ASP.NET since 1.0, 1.1, 2.0, 3.0, 3.5.   After you have great patterns and practices in place web development for APPLICATIONS is a snap.   I think I will be sticking with Webforms.

# re: MVC vs. WebForms, A Clear Loser Emerging

Tuesday, May 24, 2011 12:40 PM by weblogs.asp.net

Mvc vs webforms a clear loser emerging.. Awful :)

# re: MVC vs. WebForms, A Clear Loser Emerging

Saturday, June 04, 2011 10:25 AM by reality101

I have developed in asp.net for years and have had great success.  The author's that diminish this technology appear to be entry level developer's who know little or nothing about OOP and how it is nicely applied to the event model in asp.net to produce powerful frameworks that can be used again and again.

The worst comments I hear for MVC "its pure" seem to be written by web graphic artist types that think that once they complete there html markup the job is done!!  What a pathetic joke.

# re: MVC vs. WebForms, A Clear Loser Emerging

Wednesday, June 15, 2011 10:22 AM by Cash For Mobile

Is viewstate still an issue. Sure, I've seen some forms where people have added controls dynamically ad-infinitum that result in 500kb of viewstate, but generally, in my day to day work it doesn't really get in the way of what we do. I had a look at MVC and it seemed kind-of basic. I think people are jumping on the bandwagon as it seems the cool thing to do. Not knocking it, just saying....

# re: MVC vs. WebForms, A Clear Loser Emerging

Sunday, July 03, 2011 11:43 PM by disaia

“MVC brings web development back into ASP.NET”, is one of the most common arguments I hear for its use.  Yet the whole reason for WebForms existence was to free you of the dirty details of building a web application, and let you focus on your business logic. "

This sums up how I feel about it quite nicely.  Why do I want to go back to the drudgery of hand coding HTML/Javascript?  It seems like a step backwards.

# re: MVC vs. WebForms, A Clear Loser Emerging

Monday, August 15, 2011 12:02 AM by Eamon

I've used both and have to say web forms is a better rad tool, with rapid development being the goal. MVC is better when many people are working in the same app (a little better). This is just all snobbery mostly, with MVC you can fool yourself your more advanced even though your making your client wait longer for product, reminds me of the vb vs c# debates. Intelligent web forms with good understanding of view state etc and good third party tools is the way to go in my opinion, if you care about time to market.

# re: MVC vs. WebForms, A Clear Loser Emerging

Monday, August 22, 2011 4:49 AM by rtyecript

I really liked the article, and the very cool blog

# Web Froms vs. ASP.NET MVC &laquo; Evolving Every Single Day

Tuesday, September 27, 2011 11:41 AM by Web Froms vs. ASP.NET MVC « Evolving Every Single Day

Pingback from  Web Froms vs. ASP.NET MVC &laquo; Evolving Every Single Day

# re: MVC vs. WebForms, A Clear Loser Emerging

Tuesday, September 27, 2011 2:23 PM by david

I read until line 13 when you misspelled "you're" and that's as far as I would let myself go.

# re: MVC vs. WebForms, A Clear Loser Emerging

Friday, October 21, 2011 2:19 PM by testifyerisback

Hormis cela, avec leur modèle culturel quel vous pouvez la connaissance même à l'intérieur du les ressources et maisons cela devrait approvisionnez vous.    

http://www.testifyer.com

# re: MVC vs. WebForms, A Clear Loser Emerging

Friday, November 11, 2011 9:52 PM by fat loss

Thankfully some bloggers can write. My thanks for this piece of writing...

Leave a Comment

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