Discover the key differences between `Blazor Server` and `Blazor Web Assembly`, and find out which hosting model is suitable for your ERP application with 250 concurrent users.
---
This video is based on the question https://stackoverflow.com/q/66468315/ asked by the user 'Accessories' ( https://stackoverflow.com/u/14905029/ ) and on the answer https://stackoverflow.com/a/66470291/ provided by the user 'Remi THOMAS' ( https://stackoverflow.com/u/184405/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions.
Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Blazor Server vs Blazor Web Assembly
Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l...
The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license.
If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com.
---
Blazor Server vs Blazor Web Assembly: Which One to Choose for Your ERP Application?
When embarking on the development of an Enterprise Resource Planning (ERP) application using the .NET 5 Blazor Framework, you may find yourself at a crossroads: Should you go for Blazor Server or Blazor Web Assembly? Given that your application will consist of 300 pages and anticipate 250 concurrent users, it's essential to choose the correct hosting model that aligns with your needs. Let's examine each option to help you make an informed decision.
Understanding the Basics
Blazor Server is a hosting model where your application runs on the server, and user interactions are handled via a real-time connection using SignalR. On the other hand, Blazor Web Assembly runs entirely in the client's browser using WebAssembly, allowing for a more distributed execution model.
Key Considerations:
Resource Consumption: Both Blazor Server and Blazor WebAssembly will consume similar resources if they maintain the same level of functionality, such as API calls and bi-directional communication.
Concurrent Users: Since you're dealing with a sizable user base, how each model scales under load is a critical factor.
When to Choose Blazor Server
For intranet applications with fewer than 5000 concurrent connections, Blazor Server could be the better choice for the following reasons:
1. Direct Business Logic Access
In a Blazor Server setup, you can directly access your business logic from the page code. For example, you can execute a command like cmd.ExecuteQuery() directly in your application without needing to set up an API.
Developing an API can be a considerable early stage development task, and cutting out this requirement can accelerate your timeline.
2. Simplified Debugging
Debugging in a Blazor Server application can feel like debugging a desktop application. This ease of debugging can be a significant advantage, making the development process smoother, especially in the early phases of your application.
When to Choose Blazor WebAssembly
If you're looking to build a more scalable solution that doesn't heavily rely on WebSocket connections and utilizes client-side processing, consider the following benefits of Blazor WebAssembly:
1. Better Scaling for CPU Intensive Processing
If your application performs CPU-intensive processes that need to run on the client-side and require fewer API calls, Blazor WebAssembly tends to scale better. This capability allows for smoother user experiences without overwhelming the server, as the workload is distributed to client machines instead.
2. Network Latency Management
Because much of the processing is handled locally on the user's machine, Blazor WebAssembly can offer advantages in situations where network latency is a concern, provided that API calls are minimal.
Making the Right Choice for Your ERP Application
Ultimately, the decision between Blazor Server and Blazor WebAssembly will depend on your specific requirements, such as:
The expected load and number of concurrent users.
The complexity of business logic and interactions.
The capabilities for managing development timelines and debugging processes.
In a scenario where you have reasonably limited concurrent connections and prefer a faster development cycle with straightforward debugging, Blazor Server shines brightly. Conversely, if your focus leans towards scaling and having a more responsive application, especially for CPU-intensive tasks, then Blazor WebAssembly would be the way to go.
Whichever model you choose, both Blazor hosting options have unique strengths that can serve your ERP application well. Consider the factors outlined above, and you will be better positioned t
Информация по комментариям в разработке