3 ms·
I went to a meetup focusing on Blazor recently and was really surprised when I found out that Blazor is not "run C# in a browser using WASM" like I thought, but
by JamesSwift 7y ago
I went to a meetup focusing on Blazor recently and was really surprised when I found out that Blazor is not "run C# in a browser using WASM" like I thought, but was instead "use your browser as a thin client to C# on the backend". The whole time I was thinking "but why??".
The WASM side of it is really interesting for me as a Xamarin proponent, because it has the potential of true single shared-codebase between mobile and web. I'm not sure why I would use Blazor right now though.
- asdfman123 7y ago> I went to a meetup focusing on Blazor recently and was really surprised when I found out that Blazor is not "run C# in a browser using WASM" like I thought, but was instead "use your browser as a thin client to C# on the backend That's not true. It can run client-side on a WebAssembly-based .NET runtime or server-side in ASP.NET core. I find MS has generally been taking a Manhattan-project style approach these days, trying everything at once and keeping what sticks. https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-3.0 https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-...
- JamesSwift 7y agoI'm not saying it can't, but the primary focus (and current release) is the server-side version. I didn't realize (before that meetup) that server-side Blazor was even a thing, everything I heard about it before this was that the client-side version _was_ Blazor. I don't know if thats a disconnect in marketing, or me not paying attention, but like I said I was really confused.
- asdfman123 7y agoYeah, a confusing spate of offerings and terminology is just part of working with the Microsoft stack. It took me like 3 years of professional C# development to finally sort it all out. But the reason they're pushing server-side Blazor is because loading client-side Blazor just takes too long in production deployments. Right now, you have to wait several seconds before the page loads, which is unacceptable for most users. I feel like server-side has to be the future, though, and they'll address the speed issue soon enough.
- arisAlexis 7y agowhat's the difference between server side and just serving everything on the server and jQuery? sounds very similar
- JamesSwift 7y agoBlazor server-side maintains a websocket to a running client and does some Magic to communicate DOM updates to the client.