Are we moving on to classic ASP using the MVC framework in .NET 3.5?

Looking at the MVC framework, it seems we need more classic ASP knowledge, and then relay ASP.NET and Viewstates. Are we moving back to the complex logic of the UI + code in the actual layout of the HTML interface?

+7
asp.net-mvc tags asp-classic
source share
5 answers

We return to not trying to distract fundamental concepts such as HTML and HTTP requests. At the end of the user interface, this means that the views are more closely integrated with the output, which is not so bad. the classic ASP model has been translated to ensure that everything is tightly integrated with the output, which is bad.

+8
source share

You could argue that the MVC paradigm is a step backward, if you think the ASP.NET paradigm is a step forward, I think. Personally, I always thought it was much easier to write clean, split code in classic ASP rather than .NET, where the output text usually falls into blocks of code where it was impossible to access with a standard HTML editor. I always thought that ASP.NET architecture is more about promoting .NET than improving the overall structure of the application, so in this sense, MVC is a step forward.

+2
source share

It's funny that you mentioned it ... Today I talked with a colleague.

Is this a step back? I don’t think so ... while in classic asp you had some complex logic in the user interface, from what I see with MVC, complex logic should still be in your business objects, and any complex interaction with The object should be using a controller.

The goal, again, from what I see is to take away the user interface and adapt when it comes to the actual business logic. Any additional bloating may be caused by the fact that the user interface is more convenient for the user, for example, AJAX and JQuery.

This is just my initial point about MVC. This is a very cool technology, especially with the way it sits on top of REST, which makes it easy to work with other technologies.

I look forward to trying this on several future projects!

+1
source share

If you see complex code logic in a view regarding models and controllers, then perhaps you are approaching it incorrectly.

In its purest form, you should be able to disable the view (instead of XML, instead of HTML), with minimal work. This can only happen if the data logic is contained in the models and the business logic is contained in the controllers.

So, if you showed a shopping cart, in the view there can only be a code that records the quantity and total values ​​of the product. The model class will contain data about the product, and the controller will do all the processing, such as adding products and checking.

+1
source share

The entire MVC point is for code separation. Models should contain all your business logic, the view should just process the output for the user, and the controller should glue these two parts together.

0
source share

All Articles