Is MVC easy for a classic ASP guy to learn

I worked a lot with classic ASP forever, since it was released almost ... But I have problems adapting to the ASP.NET platform.

I was asked to switch to PHP as it is spaghetti code (I LIKE SPAGHETTI CODE) and it just looks like classic asp. But I heard about studying Apache servers and ensuring their security, this is another big project that you can study yourself .. And since I know more about MS servers, I prefer to stay with MS.

But I really want to learn another platform, and I was looking at the MVC framework and what does MVC 1, 2 or 3 look like spaghetti code? Maybe I'm wrong. I assume MVC3 is better now?

In any case, from the classic ASP, which would be the easiest and most difficult to understand, do you think? ASP.NET, with all the compilation and use of visual studio, reminds me of when I used applications in Visual Basic, but I really like the spaghetti code more than compiling the material.

If someone who made this transition from classic asp before, what did you do and why, how easy was it to understand the new platform? (Preferably MVC)

+4
source share
6 answers

Well, MVC is more like classic asp than webforms. However, it uses structure and scope to reduce spaghetti code and makes it more convenient. You have to apply a lot of new concepts so as not to struggle with the wireframe.

For example, a strong separation of view, model, and controller. This is not what you would do in classic asp or even in general php (you can do mvc in php, but it requires more discipline and the use of frameworks).

On the bottom line, spaghetti will always bite you in the long run.

Asp.net supports a mode in which you do not need to compile anything, you just edit the files on the server and automatically compile them at runtime. This is the so-called "Website" model. However, MVC does not work this way and requires a "web application" model that compiles (although you only need to compile the code, not the markup).

+7
source

I am now in the middle of my first major ASP.NET MVC project after (and at the same time) programming in classic ASP for many years. I also programmed in ColdFusion, and I tried using Python as an alternative to ASP.NET MVC.

If you want to stick with Microsoft technology, MVC comes closest to classic ASP. Webforms is indeed Microsoft's way of making web applications look like application development. Microsoft has tried to distract from the fact that the Internet is a stateless environment. However, this leads to pretty ugly things, such as a viewstate (a hidden form field that tries to preserve the state of all form fields) and controls that generate HTML that you have absolutely no control over.
MVC gives you more control and allows you to handle statelessness, as classic ASP does.

I still found that there is a steep learning curve; you will need to learn a lot if all you ever did was vbscript / ASP:

  • Syntax C # or VB.Net
  • Object-oriented programming in general (inheritance, dynamic and static, etc.).
  • Concepts like lambda expressions, delegates, etc.
  • MVC Template
  • Most likely also data access technology such as LINQ or Entity Framework

I am still struggling with some of them, but I get there. It requires a lot of work and perseverance. Not everything is better or simpler than classic ASP. Especially for me, since I used WSC in classic ASP for many years, which allows you to use n-tier applications in classic ASP and completely excludes spaghetti code.

As I mentioned, I also looked at Python as an alternative; Although we switched to ASP.NET MVC at the company I’m working on, I really found switching to Python a lot easier. The only reason we went with MVC was that when using C # / MVC, it was easier to get new developers. (In retrospect, this was not really true, it is very difficult for us to find a suitable programmer in C # where we are)

Remember that in Python you still have to learn basic object-oriented programming, but the implementation is much easier to use than .NET, and Python (IMHO) is more like vbscript than VB.NET.
I also liked the fact that I do not need to determine the type of each parameter / parameter / parameter. It sometimes drives me crazy in C #; if the type of the function changes, it can affect many other functions and variables, which all must be changed. In addition, the syntax is easier to select because the language is simple and there are not hundreds of ways to do the same.
You can choose between different frameworks, MVC or non-MVC, and you can use Python in many other areas (application programming, scripting - for example, XBMC).
There are also ORM solutions available as Entity Framework for .NET, and I found the one I was looking at (SQLalchemy), much more powerful and easy to read than EF.

So, at work I am currently learning ASP.NET MVC, at home I am slowly building Python. I suggest you try a very simple project in different technologies and choose the one with which it is easiest for you to start.

Hope this helps.

+3
source

If you like spaghetti served by Microsoft, try any version of Windows that supports IIS7. PHP works fine and is very easy to configure using the web platform installer .

Given this, there is no real reason why you should choose any one web technology over another. You can mix and match as needed, even in one application.

If you want to get into MVC, forget about 1 and 2 and go straight to 3. MVC is much closer to metal than ASP.NET WebForms. With your background in classic ASP, you'll probably enjoy it when you hang it.

Update: If you are serious about learning MVC, PHP, Ruby, or any other web platform that you like. Get a good book. Sit down, read it and follow along with the sample code. I usually decide which book to buy based on reviews on amazon. Then, if you need more information on specific topics, go to official blogs on this subject. For ASP.NET MVC, you'll probably want to check out blogs from Brad Wilsons and Phil Haak .

+1
source

I started using Classic ASP back in those days, but then switched to WebForms using / recognizing MVC 4.

Here are my thoughts.

For me, the classic ASP was interesting and easy to learn, because it was simple and did not have a large learning curve, CRUDS data was also not complicated, and it worked quite efficiently, but randomly.

WebForms required a higher learning curve, but helped with a lot of plumbing code with drag and drop controls, but sometimes they were difficult to modify and customize.

With MVC, I found that this requires a wider learning curve than the other two, this is mainly due to the fact that it is controlled by HTML5 and client infrastructures such as Knockout, etc. To get a good understanding, one also needs to study the OO, Entity Framework, LINQ, WebApi templates, and I did not find this easy to digest initially.

+1
source

What is easy for you? Which part is hard for you? Read about the state of HTTP statelessness and find comparisons between web forms and MVC - this should do a few understandable things.

Read some information about the MVC pattern as a whole. MVC is a general term that first appeared more than 30 years ago. MVC in .NET 4 is a variation of this pattern, but we are all used to calling it MVC. Make sure that you have knowledge of OO to zero, as well as knowledge of basic design patterns, mainly SoC (Seperation of Concerns) and SRP (single responsibility principle).

0
source

if you want to study / start with the mvc framework, I could recommend a Contoso University textbook or NerdDinner one ( http://www.asp.net/mvc/tutorials#NerdDinner )

0
source

Source: https://habr.com/ru/post/1369618/


All Articles