Blazor Client-Side vs Angular

Arun Siripuram 801 Reputation points
2022-08-16T05:48:25.523+00:00

Please help us with a detailed Comparative Analysis of Blazor Client-Side vs Angular

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,500 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lohith GN 511 Reputation points
    2022-08-17T03:04:09.23+00:00

    @Arun Siripuram

    You are asking for an apple to orange comparison. What I mean is - although at a very high level both Blazor & Angular allow you to build Single Page Applications - the nature of the stack & philosophy of the stack are completely different.

    Angular is completely JavaScript based. That is your front end is built completely using JavaScript. You use JavaScript as the primary language, you use the Angular framework. The output from an angular project is a bunch of JS files along with the HTML + CSS. You can use any web server to serve your HTML/CSS/JS files to the client i.e. browser.
    Angular documentation already has a section titled Features & Benefits. Here is the official link: https://angular.io/features

    Blazor on the other hand is completely based on the .NET framework & C# language. Blazor comes with 2 flavours - WebAssembly & Server. If you have predominantly C# developers then developing Single Page Applications using Blazor is native to those developers as they reuse their C# & .NET skills. That's the biggest difference you need to understand.
    Secondly, in Blazor WebAssembly flavour - because this is .NET based, the output of your app is a DLL. So when you host a Blazor WASM based SPA, instead of JS browser needs to download your application dll to browser and execute your .NET code. Depending on your project scenarios - downloading DLLs inside a corporate network may be not allowed for security reasons. In that case you cannot use Blazor WASM flavour. You can use Blazor Server. But Blazor Server philosophy is - every action on the browser is executed on server & delta is sent back to browser & painted on DOM. This is pretty similar to Server Side Rendering that other SPAs provide. The official documentation will provide you the features & benefits documented. Here is the official documentation link for Blazor: https://learn.microsoft.com/en-us/aspnet/core/blazor/?view=aspnetcore-6.0

    Now coming to the detailed comparative study - that needs to be done by you & your team keeping in mind the project needs. This is a open community forum. We will not be knowing your requirements. So keep your project requirements - you will need to check features provided by Angular & Blazor and see which stack you & your team is comfortable with and then pick the stack.

    That is what we do in my team if we have to pick a stack.

    Hope this helps.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,731 Reputation points
    2022-08-16T17:33:22.063+00:00

    Blazor binding and component design more closes matches react rather than angular. In blazor you code in C#, in angular typescript. Blazor requires WASM, to host the blazor code. Blazor uses the razor template engine, while angular is more directive oriented. angular is much more popular (but declining). Both are in the early phases of support for server pre-render to supports search engines.

    1 person found this answer helpful.
    0 comments No comments