The author has not been in contact with the software industry for a long time. He has been in contact with three architectures, namely ASP.NET MVC, ASP.NET Core & Blazor, and ASP.NET Core & Angular. Since ASP.NET MVC was a newcomer to the software industry, I completed the project in a daze under the leadership of my predecessors, so I didn't have much insight. I just had a rough understanding of the differences between the front and back ends. The front end sends an HTTP Request to retrieve data from the back end, and the back end sends the data back, and then presents the results on the page.
By the end of the project, the supervisor pushed for the transformation to switch to ASP.NET Core & Blazor and assigned the author to make a template. The author searched Internet resources and pieced together to find a suitable architecture. At that time, he only felt that there was a big gap between Blazor and ASP.NET MVC. The front end did not require weak types of JavaScript, and the front and back ends were both strong types, which was of great help to my lazy personality. Unfortunately, due to customer needs, I had to switch to ASP.NET Core & Angular. There is no way to delve into Blazor.
However, if you lose, you will always gain. Under the high-pressure intensity of the new project and the guidance of my colleagues, I have a general understanding of Angular's Module, Component hierarchical architecture, and Observable-like Ajax-like concepts. Although I still have a partial understanding, I am also roughly familiar with Angular. I found that the concept of Component is similar to Blazor's, which can be said to have the same goal.
Since the purpose of my participation in the Ironman Race is to record my experiences, the descriptions in some places will be more cumbersome. In addition, I do not have rich experience in the software industry. If the content of my article is incorrect, please do not hesitate to enlighten me.
This time, I want to use Blazor to complete a website where users can enter their logs. It is expected that the projects covered will include:
- Introduction to Blazor
- Blazor Server, Blazor WebAssembly 2 Hosting models and project structures
- Introduction to Component, Event Handling
- ASP.NET Core
- EF Core
- Login, authorization
Blazor is written in C#. Although it can also be written in VB and F#, I am only familiar with C#. C#belongs to the. NET framework, and the. NET framework is more convenient to develop in Visual Studio, so I will use Visual Studio to develop it, and the version is. NET 5. Regarding the differences between ASP.NET,. NET Framework, and NET Core, I have previously seen someone elaborate on them and find it very helpful. If time permits, I will share them again. In addition, I will use git as a version control tool during the process, and the final program code will be placed on github.
** Note: The code in this article is refactored through. NET 6 + Visual Studio 2022. You can click on the original link to compare and learn the refactored code. Thank you for reading and support the original author **