Tuesday, March 19, 2024

Blazor For Beginners

Currently, web application development involves two main approaches server-side and client-side.
Server-side development mainly uses programming languages like C#, Java, or PHP, while client-side development involves JavaScript frameworks such as Angular, React, or Vue. Consequently, to become a full stack developer, we must learn client- and server-side programming.


However, Blazor offers an alternative by enabling developers to create interactive web UIs using C# instead of JavaScript. With Blazor, developers can use their existing C# skills to build web applications without needing to learn a separate client-side programming language.

How C# codes directly run in the browser?

The answer is WebAssembly

Blazor can run C# code directly in the browser, using WebAssembly. It runs in the same security sandbox as JavaScript frameworks like Angular, React, Vue, etc. Not just C#, in fact, we can run any type of code in the browser using WebAssembly.

Advantages of Blazor framework:

• .NET Ecosystem for our front-end application.
• C# (LINQ and asynchronous programming)
• Ability to share the code between front-end and back-end
• Working with components

The next section we discussed about Blazor hosting model.