+ 5

Which ASP.Net should I learn?

I have experience in developing system using php and now I want to learn ASP.Net. So, I check it official website but which one should I learn? WebForm, MVC or WebPages? I have started a bit with WebForm and in the documentation it says that WebPages is the most recommended for beginner with knowledge in PHP. The following are the word from that documentation. "ASP.NET Web Pages targets developers who want a simple web development story, along the lines of PHP. In the Web Pages model, you create HTML pages and then add server-based code to the page in order to dynamically control how that markup is rendered. Web Pages is specifically designed to be a lightweight framework, and it's the easiest entry point into ASP.NET for people who know HTML but might not have broad programming experience — for example, students or hobbyists. It's also a good way for web developers who know PHP or similar frameworks to start using ASP.NET"

13th Dec 2018, 7:01 AM
Muhd Adam Mohd
Muhd Adam Mohd - avatar
6 Antworten
+ 5
Adam WebForms are very outdated. You'll only need to know this for legacy applications or migrating to current frameworks. WebPages is Microsoft's attempt to cater to people who focus mostly on HTML and CSS. However, I've never known of a project that utilized people that specialize only on HTML and CSS. I would avoid both of these. ASP.NET MVC with Razor Templates is a fantastic framework if you prefer server rendered HTML. This will be similar to many of the PHP MVC frameworks, but, in my opinion, so much better. After learning ASP.NET MVC, I would learn ASP.NET WebAPI with ReactJS as your frontend SPA (Single Page Application). It's good to know both approaches for many modern web applications.
13th Dec 2018, 9:34 AM
David Carroll
David Carroll - avatar
+ 4
Adam The differences between WebForms and MVC are huge. WebForms uses a concepts like as PostBacks, ViewState, and Code Behind files that are non existent in MVC. With MVC, the model, view, and controller are completely decoupled as intended by the pattern. The view is managed via a template engine, like Razor. Partial views are another level of decoupling for greater flexibility and reuse via AJAX calls. MVC implements routing, which makes things so much more flexible and easier to work with for navigation, reuse, friendly URLs, extracting data from URLs, etc. These are just a few of the features that come to mind about MVC. That said, it will likely have a much higher learning curve. But, it's so much worth learning.
13th Dec 2018, 10:03 AM
David Carroll
David Carroll - avatar
+ 2
Oh... and implementing AJAX callbacks via partial views is a thousand times better than the hacks used to make that work with WebForms. Also... WebAPI, is a RESTful API Framework built on top of the MVC framework.
13th Dec 2018, 10:08 AM
David Carroll
David Carroll - avatar
+ 2
David Carroll r f thank you, I will look into it
13th Dec 2018, 10:43 AM
Muhd Adam Mohd
Muhd Adam Mohd - avatar
+ 1
David Carroll thank you. But I'm currently doing an internship and it seem the company are still using webform and also MVC based on the system being develop. so I guess I will finish with webform and then proceed to MVC. Is the difference between each of them that big? For example after I finish webform, do I have to start from 0 again with MVC or the knowledge that I have gathered from WebForm could help me with MVC?
13th Dec 2018, 9:48 AM
Muhd Adam Mohd
Muhd Adam Mohd - avatar