In this tutorial, we will see how to create a simple CRUD application for ASP.NET Core Blazor using Visual Studio 2019, .NET Core 3, Entity Framework and Web API. Blazor is a new framework introduced by Microsoft. Blazor: Blazor has two kind of Application development on is Blazor Client app which is in preview now and also Blazor Server app. Blazor Client app runs in WebAssembly, Blazor Server app runs using SignalR. Blazor apps can be created using C#, Razor, and HTML instead of JavaScript Blazor WebAssembly Works in all modern web browsers also in mobile browsers. The main advantage we have in Blazor is C# code files and Razor files are compiled into .NET assemblies. Blazor has reusable components, Blazor Component can be as a page,Dialog or Entry Form, Blazor also used to create Single Page Applications. Blazor is used to create two kind of applications one is Blazor Client-Side App and another one is Blazor Server Side APP.
Blazor Client App:
- Blazor Client Side is still in preview.
- Blazor Client side uses Web Assembly
- In Blazor Client Side all the.Net dll’s will be downloaded to browser. The download size might be bigger and might be some time delay in loading due to all downloads happen in client browser.
- No need of server-side dependency for the Blazor Client-side application.
- All similer kind of JavaScript coding can be done in Blazor Client app and it’s not really needed to use of JavaScript Interop.
- It can be deployed as Static site which means it support offline as well.
- Debugging is more complicated than Blazor Server side.
- In client side leaking of database connectivity and also all the application code will be in client side and security level is not much good.
- All the Component Process will be happening in the Server.
- Blazor Server uses SignlR Connection to connect from the web server to browsers.
- In client side leaking of database connectivity is not happen as all will be happen in Server.
- All the form connection will be happening in the server side and no dll’s download to the client side.As all the dll’s will be in web server.
- Small download size and faster loading time than the Blazor Client App.
- We can use .Net core in Blazor server side.
- Debugging is great in Blazor Server Side.
- Runs in any web browser as no need of WebAssemble.
- Each browser session is open with SignalR connection.
Tags
Blazor