views:

956

answers:

7

Is there any disadvantage you face it when you using asp.net MVC?

EDIT
If yes can you list some of those drawbacks,

+1  A: 

Things like control state (text in input fields) requires manual handling for one, compares to webforms.. assuming you use it "properly".

All in all you have to do a bit more of the actual presentation work yourself, which is a good thing in my opinion, but in a form intensive application (administrations for example), it can slow you down.

(I mean sure you CAN run most normal asp.net things inside an mvc application, but if you do that extensively, you should probably just run webforms.)

Sciolist
+6  A: 

With WebForms you have a multitude of pre-built UI controls such as Grids, Graphing Tools, etc... There is an entire industry of RAD controls.

Unfortunately with ASP.NET MVC a lot of this stuff is still not quite there yet.

David P
Ha, for you this is a drawback. I see this as a benefit as all those prebuilt things end up being more trouble than they're worth.
John Sheehan
+1 to that. Most of those controls have as much headache packaged in as they do functionality.
Ben Scheirman
I actually see this as a benefit too :)
David P
Grids are the main problem. Charting is there, don't put it on your list.
Andrei Rinea
+1  A: 

ASP.NET requires IIS7 routing (ie, Windows Server 2008 or Vista). You can run it on IIS6 under Server 2003, but you'll lose the extensionless routing coolness.

Jason
Inaccurate. You can get extensionless routing on IIS6 with a wildcard mapping (see http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx)
John Sheehan
+2  A: 

Learning curve and lack of the pre-built controls, which will impair the productivity of a WebForms developer.

I can give you however a very good advantage: if you haven't done so already, you will finally learn the basics of HTML/CSS and HTTP which is needed to do any kind of serious web development, and not just drag-dropping things in the editor.

User
+1  A: 

The biggest disadvantage is that you'll probably be forced into using JavaScript/AJAX to achieve more complex forms. For example, if you have a whole bunch of widgets (say, datagrids, additional side forms, etc.) that aren't directly part of the current View, managing state is a pain.

In ASP.NET WebForms, the viewstate automatically handles this so that you can have multiple independent controls posting back and firing events, without messing up anything else on the page.

In ASP.NET MVC, you need to handle all of that yourself, and the easiest way is to simply move things to be on the browser side.

On the up side of this, after you get it all debugged, it can lead to a nicer user experience overall.

MichaelGG
+2  A: 

It really depends on the type of project. Some people like MVC because of the SEO benefit from clean urls and allowing users to intelligently "hack" urls by making intelligent url guesses. MVC comes with an expense that you'll lose web controls and so no ASP.NET AJAX and no drag-and-drop grid from your UI library.

Just to generalize, a publicly available website might be a better candidate for MVC because of its SEO benefit whereas an internal or business app might be better off having the time used to develop other areas. Then again, if all you want is clean URLs, you can implement the same thing without MVC by means of URL rewriting,

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx http://msdn.microsoft.com/en-us/library/ms972974.aspx

So as far as 'disadvantage' in using MVC, it might be more of a personal one in that,

  • Do you want to undergo the learning curve in doing MVC?
  • Do you rely on controls? Can you code the same thing through good ol' fashioned HTML, CSS?
  • Might you be 'wasting time' in doing MVC when a better part of your project would benefit from the coding time?
  • If all you're looking at is SEO, is URL rewriting a better approach for your needs?

I'd say the disadvantages are really relative to the developer and project.

Anjisan