Blazor server vs. Blazor web assembly + Minimal API
If my project can be created in any of the above. Which one should i go with for better future support and creation of projects (assuming future projects can be created anyone from above).
44 Replies
$itdepends
I can't speak for the future support part, but it depends on what your project goals are
I'm still new to this and took a lot of reading about them myself. But without knowing the long term vision of the project it's hard to say.
The main advantages to each I found are the following:
Server:
Download size is smaller because it runs on server.
The fact it's C# isn't served to clients so doesn't require browser supports webassembly.
0 offline support
Higher latency
Server runs everything so scales worse
Web assembly:
Download is larger as they have to download the app.
Browser has to support webassembly.
Can keep running without Internet after downloading the app.
Much work offloaded to client so less load on the server
Obviously in my research these are the things that influence my decision. But you may want to look at more factors.
Thanks @IceGPT @boom9001 But i did cleared that both can implement my projects
The reason I am posting is not because of the what depends but will it support
for example
Currently It has come to my knwoledge that there are more package support for WASM than for Server
also for Server. There are Views and MVC integration
it makes it complex to edit it but for future
I am not sure where the trend lies
that's why asking this now
I believe it's the other way around. Server is just running natively C# so you should be able to use anything. WASM may have some that aren't supported. Maybe ice can confirm that.
There is something Boom
Server have different parts of .net web frameworks integrated which may or may not support certain features from community
But with WASM, C# can do anything on the browser where system access api allows
Server needs to be connected at all times
I don't know for how long and how many connections a server can establish and maintain
so it's more fuss
Also the community is there
If let's say Blazor server gets hyped or Vice versa and More enterprises start to use (What's Hyped) and I have built projects on the other one then I will be risking my job won't I ?
so we're predicting the future?
More like finding a common ground to secure it now
I mean if you're asking opinion on future. WASM seems like it'd be more popular as it keeps the load on the server smaller. Where server requires the server running the app for each user.,
Hmm, not bad
Because of the increasing size of server prices i must give this one a +1
There's a cost sure, but that's just my thought. If you want to guage community probably get more response in web section rather than just my single opinion.
I forgot that how simple logging archive is not more expansive than hosting a server and since people might start using serverless soon
I know that's why I made it 🙂
i feel like if you care so much about a future of a product, I wouldn't gamble on a baby framework like blazor with an extremely small community in the first place
compared to javascript frameworks
Hehehehe mate I am vue.js developer for more than 5 years
Well help tends to be like help on specific issue. if you're trying to guage public opinnion the #web channel might get you more.
I am choosing my words carefully
very true too
I have more than 50 projects opensource and private
with vue alone
ok and
and tutorials probably
I use Quasar
Leaving Quasar for Blazor is not minor decision i am making
so what was your question again. Should you use blazor wasm or blazor server for a product?
Based on future job secure and where the trend can go, Yes!
I mean for job secure blazor isn't it. Also if you know one and someone needs the other they'll take you. It's not a field with glut of people\
I know, That's the speciallity abou .net tooling
okay ill be real with you. job market for blazor is nonexistant. I live in CA. This is the results
Microsoft is way ahead than the things we thought was important as open-source developer
11 jobs
I know but it is to expand in Azure and .net frameworks and not just Blazor as Boom already suspected 🔍
Giving Blazor in WASM means, I am good at razor components. C# based Bootstrap UI maker and Azure handler
but with Vue
I am just good with Vue or Angular if that resembles and sevelte because that's the lightest and easier one to point out to
For db If i use Node.js and express it's like i do nothing
I use minimal API and I am king of backend
lol
Microsoft takes care of details so clearly that it becomes a thing on it's on using their product for development
if you're hell bent on blazor, who am I to stop you. Just letting you know, blazor is still a baby with lots of issues
wasm takes 20 years to load, SEO is non existant, extremely unperformant
True, Cannot argue with that. But I can when the site is loaded
for example
sorry continue first...
the only thing blazor has going for it is that you can share dto from backend to front end
if you want to make a fancy UI, you will have to play around with jsinterop which is a pain in the ass
That's the reason i choose blazor-server first and later realizing the community mostly support WASM
Having to call StateHasChanged on specific UI actions can be annoying as well, but also has a risk of being unperformant for complicated tasks like nested treeviews
so you would have to build complicated UI with jsinterop, then have an invokable callback to blazor, and manually refresh the state
which again causes performance issues
We're not even going to mention the absolutely random breaking bugs that can happen when visual studio is updated, or chrome is updated
and then have event function for OnStateChanged
yes I can see that where it goes
pls continue...
I can but its time for me to clock out and go home 🫡
i use blazor wasm at work and I have many frustrations with it
got you
Ever heard of bridge.net?
There is still H5 though
i think Microsoft would rather but .net on the browser then js
H5?
GitHub
GitHub - theolivenbaum/h5: 🚀 The next generation C# to JavaScript c...
🚀 The next generation C# to JavaScript compiler. Contribute to theolivenbaum/h5 development by creating an account on GitHub.
Fyi
The mentioning of Bridge.net was a joke
It's horrid
Horrible
Horrendous
Ok, thanks for explaining 😄