Time to Forget JS

Fortunately, with the creation of WebAssembly, we can use other languages to write web applications. You can compile your C, C++, or Rust source code to WebAssembly byte code and run it in the browser. As the next step in web development, engineers from Microsoft have compiled mono runtime to WebAssembly and ASP.NET Core Team is now working on an amazing framework called Blazor. This platform gives you the possibility to write component-based web applications using C# and VisualStudio (VS Code is also supported).

Finally, no more stupid runtime errors because you are using an object of the wrong type (we all love C# for static typing). We can finally share code (assemblies) between client and server. You can define enums, validation logic, some business rules, etc. once and use them everywhere. And of course, it’s gonna be the same language across the whole system.

To be clear, there are two “hosting models” for Blazor, client-side (runs in the browser on a WebAssembly-based .NET runtime) and server-side (runs on the backend, the client will get HTML and will interact with the server using SignalR).

In this article, I’m gonna talk about client-side Blazor. But the main concepts, the app and component models, are the same.

#.net #asp.net core #webassembly #blazor #javascript

Blazor - It's Time to Forget JavaScript
5.45 GEEK