views:

835

answers:

14

There are lots of articles and discussions about the differences between ASP.NET WebForms and ASP.NET MVC that compare the relative merits of the two frameworks.

I have a different question for anyone who has experience using WebForms that has since moved to MVC:

What is the number one thing that WebForms had, that MVC doesn't, that you really miss?

Edit

No-one has mentioned the WebForms validation controls. I am now working on some code that has a few dependant validation rules and implementing client-side validation for these is proving slow.

+15  A: 

nothing :)

I really like the way ASP.NET MVC works. I want to control my HTML. I don't need controls. We can get the same functionality with HTML helpers and third party tools, e.g. jQuery and all the available plugins.

Here's an example on how to use a gridview-like with jQuery grid on ASP.NET MVC.

Although Ruby on Rails is a more mature framework, I do think that ASP.NET MVC is on the right track.

Rodrigo Guerreiro
been using jqGrid a bit over a month now with MVC, works nicely. :)
Tracker1
+1 for nothing :)
UpTheCreek
+8  A: 

I miss the gridview, the simplicity of getting built in sorting and paging in with very little effort. I use grid functionality all the time and have still not found a good alternative in mvc

TT
jqGrid (http://trirand.com/jqgrid/jqgrid.html) is great - have you tried that?
Bayard Randel
+2  A: 

The simplicity of having only one form on a page. I think the html form functionality is kind of awkward and not very intuitive and I guess there is a good reason why the webforms creators tried to abstract away form handling in webforms.

TT
A: 

Nothing as well.

WebForms do so much automatically but frequently I had to hack it to suit my needs. MVC let me do what I want and I can hack it to get things done better/faster.

I love to control the output and prefer clean, lightweight style.

twk
+2  A: 

One difference, which I am sure will be rectified over time, is the expansive amount of reference material and examples online for web forms versus the relatively sparse amount for MVC. However, one could argue that a lot of the material on web forms covers topics such as the page life cycle which MVC no longer makes necessary (thank goodness).

Lance Harper
That's true. However if you get the book Pro ASP.NET MVC by Steven Sanderson, that somewhat mitigates the issue!
RichardOD
However, a lot of the webforms code on the web is very hacky.
UpTheCreek
+20  A: 

As a PHP/Classic ASP person, I ventured into webforms world about 5 years ago. After having to handcode things like table grids, calendars, etc, in scripting languages, it seemed like webforms would be a tremendous helping-hand. It was...that is until you need even a slight bit of customization beyond alternating row colors and the like. Yeah, you could have a gridview running with a few drag-and-drop motions. But customizing even what would seem like a simple thing could turn into hours of torture and research.

I also think a lot of the examples given in .NET online are oversimplified for the effect of making webforms look "easy". Sure you can get that gridview to show only 10 records of a 100,000 record table, but do you realize that ALL of the records are being loaded into memory by default? As an example of the over-complicatedness of rectifying that problem, I spent a while creating a pageable gridview that only loads chunks of records, but it wouldn't work. After an hour of research, I found that you had to delete an extra property that the IDE inserts into the codebehind. Not fun when stupid stuff like that sets you behind.

And at every turn, it happens.

Don't even get me started on viewstate.

But then the clouds parted, and .NET MVC was handed to us. Now THAT is a framework. If you are a web developer, you should know whats happening when someone makes a request to your webserver. The abstraction and layer of cruft that webforms put on top of that is a disservice.

For the most part, I'm able to develop applications at the speed of PHP scripting and FINALLY have TOTAL control over the UI. That's what it's all about.

And as an additional note: People need to stop complaining that they are creating "tag soup" in MVC views when they find they have to use <%= %> tags and the like. Drag and drop your gridview onto the page, set all the properties, then view the crap it gives you. And your not nearly done yet, now you have to attach events and put more gridview-related code in your codefile. Talk about messing up the coding experience. I'll take a simple foreach loop anyday.

+1!
Andrei Rinea
So - you miss the most tinkering around gridview? :)
Arnis L.
How does this answer "What is the number one thing that WebForms had, that MVC doesn't, that you really miss"? :)
bzlm
A: 

yes my tools box :S

Yassir
tools box? Can you provide more information?
Richard Ev
in MVC you can't use the controls in visual studio's toolbox :D
Yassir
+2  A: 

Until now nothing really.

I definitely miss MVC every day at work while I look at the ugly WebForms code I want to wipe it all out and now make everything transparent, clean and beautiful.

Of course only time will show whether the new girl is really better than your old wife.

User
+1  A: 

As crazy as it sounds, I miss the calendar control. Not for datepickers or that sort of thing, but for scheduling apps where you want to show a full page month-at-a-glance/outlook style events calendar with selectable or clickable links that you inject via the day render event.

If anyone knows of an MVC alternative, please share! Rolling your own in this case is doable, but kind of a pain.

Have you seen this one? http://www.codeproject.com/KB/aspnet/asp-net-mvc-calendar.aspx
Dan Diplo
+1  A: 

Well I do miss something :

the ability to have a pageable grid in seconds.

Although it wouldn't be very fair since I also had to create a class to feed to the ObjectDataSource to have an efficient pagination. And also the pagination would work only with the JavaScript on or I would have to write code to read the QueryString (for ex. &pag=2 etc.) and so on.

In fact... I guess there isn't much too miss.

Andrei Rinea
Checkout the Grid in MvcContrib.
jfar
+1  A: 

Viewstate is the thing i miss - until i remember problems it causes.

Then i bend my mind and look for another approaches (smarter model binding, ajax etc.) which usually turns out to be better (but slower to find & implement).

Arnis L.
A: 

Output Caching is not really implemented in ASP.NET MVC (as of version 2). There are tricks to get it working, like using Web Controls with the OutputCache directive, or using WriteSubstitution, but all these tricks go against the nature of MVC in some way. Output Caching for anything other than entire action methods is really tricky to get working in ASP.NET MVC, and always induces enormous technical debt. Since Output Caching, especially in the newer versions of IIS, is incredibly performant compared to data layer caching, this is a shame.

bzlm
What's wrong with OutputCacheAttribute?
erikkallen
Nothing - for caching entire action methods. Hence "Output Caching for anything other than entire action methods" in my answer. Output Caching in ASP.NET Web Forms is very flexible - not so in ASP.NET MVC.
bzlm
A: 

simplicity in Dragging and dropping controls. might be seeing some of this in the near future maybe in mvc4

mazhar kaunain baig
God, I hope not
UpTheCreek
A: 

The main thing I miss is the documentation. WebForms, because of it's relative maturity, has a lot of official documentation and also a lot of 3rd party examples and snippets available. However, this is improving all the item and, as MVC gains momentum, I hope it will be on a par.

Dan Diplo