Achraf Ben Alaya
No Result
View All Result
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume
SUBSCRIBE
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume
No Result
View All Result
Achraf Ben Alaya
No Result
View All Result
ADVERTISEMENT
Home Blog blazor

The Differences Between Blazor Server And Blazor WebAssembly

achraf by achraf
January 10, 2021
in blazor, Blog
3 min read
0
The Differences Between Blazor Server And Blazor  WebAssembly
0
SHARES
544
VIEWS
Share on FacebookShare on Twitter

If you didn’t hear about it yet ,Blazor is a revolutionary client-end User Interface framework developed by Microsoft’s mighty ASP.NET Expert team. Since its launch, it has become a big talking point among the tech organizations and Developer community. Blazor offers an amazing ability to code enriched web User Interfaces/User Experiences by using CSS, C#, and HTML instead of using JavaScript, a proposition most of the Developers have been dreaming of for long .

What is Blazor?

Blazor is an open-source and freely available framework, which allows developers to develop highly interactive web applications by using C# programming language. It allows a single programming language C#, HTML or Razor to write both the Client-side and Server-side code. Blazor achieves this by using .NET runtime which is compiled into WebAssembly bytecode. The .NET runtime functions into the browser and can allow any .NET DLL to execute, including the code we have written in C# programming language.

Blazor is composed of two hosting Models and we are going to see them one by one

1-Blazor server side

2-Blazor WebAssembly

  • Blazor server side

With the Blazor Server hosting model, the app is executed on the server from within an ASP.NET Core app. UI updates, event handling, and JavaScript calls are handled over a SignalR connection.

A Blazor application can easily run on an ASP.NET core backend and could be accessed easily by a browser. The ASP.NET Core applications can either be running on IIS or could be hosted as self-contained applications. Blazor application or website could be accessed by any browser at client-side. Blazor Server utilizes a JavaScript file to function and use CSS and HTML to render its user interface (UI). Here it is important to note that Blazor Server does not use WebAssembly.

  •  Blazor WebAssembly

The second Blazor hosting model is running client-side in the browser on WebAssembly. The Blazor app, its dependencies, and the .NET runtime are downloaded to the browser. The app is executed directly on the browser UI thread. UI updates and event handling occur within the same process. The app’s assets are deployed as static files to a web server or service capable of serving static content to clients.

Blazor WebAssembly is supported by all the renowned modern web browsers available in the market for both mobile and desktop. Its execution is quite like JavaScript, where it allows the WebAssembly applications to execute securely on the end-users device, that too within the browser’s security sandbox. It offers an ability to the applications so that they could be deployed as a true standalone static site, without any .NET server component. The applications can be amalgamated with ASP.NET Core, which ensures a full stack web development with the help of .NET ecosystem, that is where the application code can be effortlessly shared with the server and the client.

 

  • Difference : (what should I use ?)

If you are going to develop a standard application that will be used even with a very bad internet connection than the WebAssembly is the ideal one because it can run without server connection,

More than that ,the  WebAssembly application offer offline mode ,the application can continue to run even without internet connection while the server application become useless in this case.

The Web assembly application will be download by the end user and will run on the browser ,so here we don’t need to scale anything ,while on the server side , Microsoft says that a server with a single CPU and 3.5 Ram can handle 5K concurrent connections .

  • In Summary

Keep it simple and build something small, with a couple of screens, just to see how each of the hosting models work and than you can go and start building your own project .

 

ShareTweet
Previous Post

My 2020 Review

Next Post

Background Tasks With Hangfire And .Net 5

Related Posts

Switch to Azure Container Registry from Docker Hub
Azure

From Docker Hub, switch to Azure Container Registry & AKS

January 16, 2023
132
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)
Azure

How to configure an ingress controller using TLS/SSL for the Azure Kubernetes Service (AKS)

November 25, 2022
229
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)
Azure

How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

November 23, 2022
102
How to setup nginx reverse proxy for aspnet core apps with and without  Docker compose
Azure

How to setup nginx reverse proxy for aspnet core apps with and without Docker compose

November 23, 2022
153
Win free certifications at the Microsoft Build Cloud Skills Challenge | May 2022 🎁
Blog

Win free certifications at the Microsoft Build Cloud Skills Challenge | May 2022 🎁

May 28, 2022
107
Generating report for SSL Certificates for Websites with PowerShell
Azure

Generating report for SSL Certificates for Websites with PowerShell

April 10, 2022
386
Next Post
Background Tasks With Hangfire And .Net 5

Background Tasks With Hangfire And .Net 5

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Terraform

Certifications

Microsoft certified trainer (MCT)

Recommended

Achraf First Post

Achraf First Post

April 26, 2020
286
Why you need to ensure updating your Xamarin.Android Application to Supports 64-Bit Devices and how to do that .

Why you need to ensure updating your Xamarin.Android Application to Supports 64-Bit Devices and how to do that .

April 21, 2020
322

How To host an Angular app on Azure

September 29, 2020
1k
Kubernetes is deprecating Docker runtime support !

Kubernetes is deprecating Docker runtime support !

December 3, 2020
469
Xamarin.forms,Blazor and Web API

Xamarin.forms,Blazor and Web API

December 3, 2020
927
Installing WordPress with docker image of XAMPP

Installing WordPress with docker image of XAMPP

April 21, 2020
665
Facebook Twitter LinkedIn Youtube
Switch to Azure Container Registry from Docker Hub

From Docker Hub, switch to Azure Container Registry & AKS

January 16, 2023
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

How to configure an ingress controller using TLS/SSL for the Azure Kubernetes Service (AKS)

November 25, 2022
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

November 23, 2022

Categories

  • Apps (1)
  • Azure (39)
  • blazor (2)
  • Blog (62)
  • c# (7)
  • Cloud (37)
  • Dapr (4)
  • docker (3)
  • Games (1)
  • General Tips & Fix (1)
  • motivation (2)
  • Motivation (3)
  • News (9)
  • Resume (1)
  • sql (4)
  • Tricks, Tips and Fixes (3)
  • xamarin (5)
No Result
View All Result
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume