Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is ASP.NET MVC a step backwards in some ways?

I ask this not to start anything negative. Rather, after looking at ASP.NET MVC it hit me (duh) that I am not using controls like on webforms but coding html markup by hand (gasp.)

Is this a move backwards? I remember coming from classic asp to asp.net and dragging and dropping controls, creating a bll, etc. now it seems I am doing all that by hand, again, like classic, except I have good mvc design.

I guess I'm trying to figure out why this is a move forwards from what was a rapid development environment to what appears to be more tedious.

EDIT:

I always thought Visual Studio .NET was one huge reason to go with ASP.NET with all its controls and automation. Now with MVC it is makes me think it's just like any other MVC with a decent IDE, since I'm doing everything by hand now.

like image 446
johnny Avatar asked May 21 '09 19:05

johnny


People also ask

What are the three steps of an MVC?

-MVC is an architectural pattern consisting of three parts: Model, View, Controller. Model: Handles data logic. View: It displays the information from the model to the user. Controller: It controls the data flow into a model object and updates the view whenever data changes.

Is ASP.NET MVC backend or frontend?

Net comprises both frontend and backend languages. As for example, ASP.NET is used as backend and C# & VB.NET are used for frontend development.

How does ASP.NET MVC application work?

In an ASP.NET MVC application, a URL corresponds to a controller action instead of a page on disk. In a traditional ASP.NET or ASP application, browser requests are mapped to pages. In an ASP.NET MVC application, in contrast, browser requests are mapped to controller actions.


10 Answers

  • "Classic" ASP.NET hasn't gone anywhere - you can still use it if that's what you want or need
  • Though you may or may not get "drag-and-drop" functionality, between AutoComplete and the various render helpers you can easily get a working view in minutes
  • Creating the views is only a small fraction of the overall project
  • Even in ASP.NET I rarely used the visual editor. I always felt that it got in my way and made decisions for me, wrongly.
like image 114
GalacticCowboy Avatar answered Oct 16 '22 07:10

GalacticCowboy


Is a step forward:

  1. the code is fully testable
  2. you gain full control of what the server is generating
  3. no more viewstate!
  4. increased server response speed
  5. less server cpu load without the WebForm's Page lifecicle
  6. a programming model which is more close to the web (webforms aimed to bring to the web the desktop programming model).
  7. ....
like image 21
Andrea Balducci Avatar answered Oct 16 '22 08:10

Andrea Balducci


Funny you should mention this - I just finished reading a chapter in "Professional ASP.NET MVC 1.0" that answers this exact question.

The book they compare the difference between Web Forms and MVC as the difference between leading an orchestra and composing a song. MVC doesn't give you the same level of immediate response as web forms, however it does give you a level of granularity a lot of web developers have come to expect. It's well known that ASP.NET controls, even in their later versions, inject more HTML than is desired.

So, functionally yes it's a step back, but only because you've been given complete control over what gets put on the page. As always, pick the right language for the job.

like image 32
Mike Robinson Avatar answered Oct 16 '22 09:10

Mike Robinson


It's a step sideways, rather than forwards or backwards; just another way of doing the same thing, with a different emphasis. With ASP.NET forms, it's easy to "draw" the page so it looks roughly like you want it to look, but it's hard to make it behave like a proper web application. With ASP.NET MVC, it's not as easy to throw together the appearance of it, but it's actually easier to make it behave like a website, with URLs that describe the content being returned in a predictable way.

like image 31
Daniel Earwicker Avatar answered Oct 16 '22 07:10

Daniel Earwicker


Tell me about it. I'm still trying to work out why I'm subjecting myself to this. Ultimately the number #1 sell is Unit Testing. For those of us who don't subscribe to this, the advantages are few, if any, IMHO.

That said, I'm open to be convinced otherwise. I think that MVC is a good foundation, but like you say, it's very very tedious at times. The RAD system of drag/drop controls from the toolbox used to be terrible, but since vs2008 it's been quite a pleasure. I expect the major toolkit vendors like Telerik, Infragistics, ComponentOne et al will soon ship MVC friendly toolkits (I hope!).

I'm only learning it because I'm currently on a project that was built on it (not my design). Don't forget though that YOU DONT HAVE TO USE IT. Classic ASP.NET didn't disappear. :)

-Oisin

like image 40
x0n Avatar answered Oct 16 '22 08:10

x0n


Some people might say that ASP.Net was a step backwards in that it can constrain the flexibility of the application by locking you into using pre-built controls.

Classic ASP was immature, but it did give you very fine-grain control over the mark-up code, which many find is lacking in vanilla ASP.Net.

As I see it the ASP.Net MVC paradigm gives the developer closer control over mark-up, while still giving access to all of the advantages of the .Net framework.

like image 22
alchemical Avatar answered Oct 16 '22 09:10

alchemical


I think it was a necessary step backwards, or better yet backtracking a few steps to move ahead.

The web had evolved in a direction that diverged significantly from ASP.NET's core design premise.

In the end, comparing ASP.NET to other agile web frameworks, I believe it was a case of "you can't get there from here".

like image 20
loudej Avatar answered Oct 16 '22 07:10

loudej


For me, getting rid of viewstate and the page life-cycle has been an addition by subtraction. :) Not to mention a boon to my knowledge of web programming because of having to get my hands "dirty".

like image 32
Casey Williams Avatar answered Oct 16 '22 08:10

Casey Williams


I thought part of the point of the ASP.Net MVC Framework was giving the developer more control over the HTML. Something the drag-and-drop controls make a mess of.

like image 27
Geoff Avatar answered Oct 16 '22 07:10

Geoff


ASP.net MVC is not for everyone or for every application (some may argue this through!). MVC is a framework you can use in its basic form or extend to your hearts content. It allows you full control over what is rendered to the user.

MVC has a number of advantages:

Seperation of concerns resulting in better testability, arguably better design and easier to modify UI

Full control over what is rendered - which can result in standards compliant, smaller, faster pages

Clearn SEO friendly URLs although ASP.net 4 has routing features

In its purest form without use of session load balances very well.

It also has some disadvantages:

Learning curve and change of thinking required

Lack of 3rd party support although this will change

Pages can look cluttered

Can be more difficult to develop certain types of controls e.g. something like a reorderable data grid or something with many steps like a wizard

like image 28
alexmac Avatar answered Oct 16 '22 08:10

alexmac