Dofactory.com
Dofactory.com
 Back to list
Views:   124.7K
Replies:  8
Archived

Why should we use MVC vs normal ASP.NET?

Why should we use MVC?  Can we do rich GUI controls like we used to in regular ASP.NET applications?
Can we use Session, Javascript, Validators, Ajax controls, and others in MVC?

Are MVC applications faster than normal ASP.Net application?
Can we do everything in MVC just like we can in normal ASP.NET application?
Rahul Tripathi, Feb 23, 2011
Reply 1
MVC is lightweight framework with clear separation between code and HTML. It has following major benefits.

  1. With Model (Business logic), View (UI logic) and Controller (Input logic) being separate entity, Test driven development is possible
  2. It does not have viewstates (which is both positive and negative)
  3. Business logic is stored in a single state called model where in traditional asp.net platform, each page has its own business logic making it complex.

There are other benefits as well but these are the most logical statements that shifts the favor to MVC.
Hemang Rindani, Mar 27, 2017
Reply 2
Who wants to have more control over things they are responsible for , well every one wants to have more and better control over things they are involved in. So whole concept of the story in our programming world is we don't want rigidity, fragility, immobility,and tight coupling What MVC brings to us is a Pattern that divides the chain of responsibilities into Model, View and Controller. But with this adaptive and flexible behavior comes the cost and time values so if the target application is a small scale one then ASP.Net is good to start with. But when the application is big and we aspect changes to be a regular visitors to our development area so we really need to separate the whole application into components and modules and create a chain of responsibilities with those components (Every Component have single responsibility ) and since all those components are self sustaining so we can even test those components without depending of any other components, thus we isolate i.e we divide then test then re-factor and eventually conquer. So the question is street fight or war, what are you getting prepared for.
Sanjay Mahara, Feb 23, 2013
Reply 3
ASP.NET and MVC are getting a little closer with each release of Visual Studio (examples include Routing, the Razor engine, and more).
I can see that over the next few years ASP.NET borrows more and more from MVC until the two are like twin sisters...

My 2 cents.
Henry Wong, Feb 21, 2013
Reply 4
Your question depends whether you're contemplating a move from WebForms ASP.NET to ASP.NET MVC or making a choice between the two if you're starting with ASP.NET.

If you're starting go with MVC. If you're a seasoned WebForms developer and maintaining current WebForms apps, stay with WebForms. Converting apps is time consuming, error prone and time could be used to add/enhance app functionality.
WebForms is still a very viable platform. It gets better with every .NET/Visual studio version while reducing prior limitations.

If you depend on third party GUI Frameworks like from Telelrik, Infragistics, ComponentArt, DexExpress, their controls are more mature for WebForms than MVC.  These controls offer high productivity, have good looking output and you don't have to worry about browser inconsistencies and bugs. They take of these issues for you. This also means you probably have less control of their html output. Something to think about if you want to spend your development time in the backend and business aspects of the app and less on the front end and GUI stuff.
Abdu Bukres, Apr 22, 2011
Reply 5
One main benefit of ASP.NET MVC is that you can easily and quickly write RESTful implemenations. Also, ASP.NET lends itself more towards pure browser coding of controls and usage of jQuery, true seperation of concerns. Things are more cumbersome with the old ASP.NET server controls.
Saleh Najar, Apr 11, 2011
Reply 6
If I were to use/learn a .Net web framework today, I would most certainly go for ASP.Net MVC mainly due to the benefits pointed out in the excellent post by Rajesh. But, if I were to choose any web framework (not limited to .Net), I would probably use Rails or Django as they seem (to me) to be far easier to work with.


Good Luck!
Robert Blixt, Mar 08, 2011
Reply 7
I would continue to use Webforms.

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.

What’s coming in the next version of ASP.NET Webforms?


Bartek Marnane, Mar 05, 2011
Reply 8
There are various positive points to moving towards MVC

1.  TDD support out of the box as most of the design is based on interfaces.
2.  SEO friendly URL by design (though now this is possible in ASP.NET 4 as well)
3.  No ViewState (this may seem a bit of moving backward to some), but overall a good design decision.
4.  Clean View Markup (no additional HTML emitted)
5.  100% extensible.  You can add your own controller with IOC, switch view engines at will, control model binding at wish etc.
6.   Rich UI support (possible through client side JS libraries like jQuery UI and others).  Telerik has released some controls for MVC which includes Grid control as well (which are merely HTMLHelpers)
7.  Session, JS, Ajax works.  Validation is even more powerful with DataAnnotations and jquery.
8.  Is MVC faster?  Yes by default because of lack of viewstate and clean markup.  But performance is subject and MVC by design is more performant that traditional ASP.NET webforms (though webforms can be made as fast as required.
9.  Out of the box support for mitigating antiforgery attacks and XSS vulnerability (though asp.net does has this to some extent)
10.  Out of the box minimal IOC support.
11.  Full control over rendered HTML
12.  Pluggable architecture
13.   And much more....

Couple of limitations (though not exactly)
1.  Learning curve as most asp.net developers are used to windows form model for web development.


NOTE:  Webforms is not bad.  But by design it encourages many bad practices.  A webform at the hands of careful developer is as or could be even more productive than MVC.  Just my thought.

Additional readings at http://msdn.microsoft.com/en-us/magazine/dd942833.aspx

Hope this helps.


Rajesh Pillai, Feb 23, 2011
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.