📜 ⬆️ ⬇️

Transition from ASP.NET to Angular2 with features (personal experience)

Expanded Theme: Splitting ASP.NET into Front-End (Angular) and Back-End (WebApi)

Features: corporate development (hence the main browser - IE, web server - IIS, environment - Windows); this is a partial refactoring, but rather a redesign of the web part (there is a legacy code, orientation to the existing UX);

Causes and goals: The goal is to redesign the architecture of the web component (in the current version of ASP.NET Forms + WCF), because of the impossibility / complexity of solving the problems and new requirements (complete update of the pages after the postback, resubmitting the form, complex navigation and related problems with data in forms).
image

Everything described is based on personal experience (or, accordingly, its absence - just a month ago I knew nothing about the Node.js and Angular except the name). If you are interested in a brief description of the article, let's begin.

In the midst of a search for a new architecture (at that time I tried to use ASP.NET MVC) I came across a video from channel9 “ Building web apps powered by Angular 2.x using Visual Studio 2017 ” and its text variation . After reading parallel to the official website of Angular, I penetrated and began to try to discover the following advantages:
')

Naturally found and cons:


So I began to read, understand, and came across a simple WebApi + Angular 2 project template based on the official Visual Studio 2015 QuickStart tutorial. Having repulsed from this template, I began to modify the project for myself (you can read the entire code from the link to GitHub below):


Still to do:


The final draft can be found on GitHub (at the time of writing, commit 74e54cf ).
I am pleased to answer questions and discuss on the subject “why this is so, and not that kind of business.”

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


All Articles