Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the disadvantage in using asp.net MVC?

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

EDIT
If yes can you list some of those drawbacks,

like image 601
ecleel Avatar asked Feb 06 '09 19:02

ecleel


People also ask

Which of the following is the disadvantage in ASP?

ASP files frequently combine script code with HTML. This results in ASP scripts that are lengthy, difficult to read, and switch frequently between code and HTML. The interspersion of HTML with ASP code is particularly problematic for larger web applications, where content must be kept separate from business logic.


3 Answers

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.

like image 79
David P Avatar answered Oct 12 '22 09:10

David P


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.

like image 4
MichaelGG Avatar answered Oct 12 '22 09:10

MichaelGG


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.

like image 3
Anjisan Avatar answered Oct 12 '22 09:10

Anjisan