Michael Bradvica joined Saxony Partners in 2020 as a Software Engineer on our app dev team. Previously, he has worked as a Full-Stack .NET Developer for technology services firms. You can read more of his thought leadership at MichaelBradvica.com – from which the blog post below has been adapted.
Choose From 3 Blazor Hosting Models for Your Next App Dev Project
Blazor presents three different ways of hosting your application. I am not talking about hosting in the sense of using a cloud service or having a server farm in a physical location. Hosting, in Blazor’s case, revolves around where the web application will live.
The wonderful thing about all three options is that your code remains the same. Your decision, then, is mostly concerned with how the application will be delivered to the client and the capabilities of their connection. The three hosting methods are via WebAssembly, a progressive web application (or PWA), and ASP.NET Core.
The default WebAssembly application is for end-users who use browsers that support WebAssembly. This is almost all modern browsers such as Firefox, Chrome, and Edge. If your customer base has a large portion of people on older browsers, this may impede their ability to use your application. One of the easiest remedies is to check users’ browsers when they visit your application and kindly remind them that newer, more secure options are available.
Another option is a progressive web application. This type allows your customers to interact with your application in a traditional browser. Or, if they prefer, they may run your application in a separate window akin to a traditional desktop application. Choose a progressive web application when an end-user may need to use the application but may not have a constant connection or wants to run the application in a separate window.
ASP .NET Core Hosting
The final hosting option is to host your application server-side. Instead of loading an entire application into a browser, the application state remains on the server and interacts with the browser via SignalR. The main advantage of using the ASP.NET Core hosting model is that the initial application load is much smaller. Furthermore, there are no compatibility issues with older browsers because you are bypassing the requirements for WebAssembly.
Hosting Options Abound with Blazor
The best ability is availability, and thus Blazor is great because you may choose multiple options at once. Want to go with both WebAssembly and PWA? You can! You can even combine these options retroactively. Because the differences between the hosting options are mostly at the infrastructure level, your UI code can stay intact even while introducing new solutions.
Making Digital Practical with Saxony Partners
Technology and digital strategy can be complicated, but our goal at Saxony Partners is simple: Make Digital Practical.
Saxony Partners will meet you where you are and help you get where you want to go. Our pragmatic approach helps ensure early success by leveraging proven technologies and practical solutions in a cost-effective way.
Our team of app dev experts, full-stack developers, and software engineers work with clients to optimize their technology investments and leverage that technology to meet and solve business needs and challenges.
If you or your company is looking for help with software development, reach out to us here.