r/Blazor Feb 10 '22 Gold 1

Two weeks of blazor.. I'm sold

Have been doing development since the 90s and generally have always found the mix of js, html, css and c# to be laborious.

Even react which I find to be the least annoying js framework is painful. Most of the time I would just go back to html, css and jquery to get stuff done quicker.

But blazor, wow, just doing server side blazor for two weeks and I'm making stuff with such little faff. Everything works so painlessly.

Using radzen ui components but not their ide, this is seriously impressive stuff.

Has anyone tested how well server side blazor scales when using azure signalr service? . Now I have used this there's no going back.

114 Upvotes

22

u/propostor Feb 11 '22

Blazor becoming the next big thing. Hell fucking yes.

I'm working on a new internal web app at work and casually suggested MVC/jQuery was an oddly old choice for a new project. We are now writing it in Blazor and everything is just wonderful.

7

u/bobafett8192 Feb 11 '22

My job is thankfully slowly moving everything over to Blazor. We had a new small project that a lead dev decided to test out in Blazor that’s suddenly becoming our core project, and everyone loves it.

-8

u/godlikeplayer2 Feb 11 '22 edited Feb 12 '22

Blazor becoming the next big thing. Hell fucking yes.

meh, if they don't get these huge bundle sizes for wasm blazor in check it will stay relatively niche.

edit: rofl at the downvotes without any counterarguments. Says a lot about the blazor and c# community.

10

u/propostor Feb 11 '22

Nah. Internet these days is so fast that your website can be 10mb and nobody cares. Do you notice Facebook being upwards of 20mb?

The only important factor now is development time, and Blazor websites are the quickest development turnaround of any available framework at the moment, by far.

Also, Blazor isn't even large. 2mb or less, last I checked. I don't know what you're on about, frankly.

1

u/Mordeor Feb 11 '22

It's small until you start including project dependencies. One Nuget package I was looking at, and decided against, was over 11 MB.

-2

u/godlikeplayer2 Feb 11 '22

Do you notice Facebook being upwards of 20mb?

uhm no? it downloads like 1,3mb of javascript for me. Including all that tracking bs and other stuff.

Internet these days is so fast that your website can be 10mb and nobody cares

mobile users? hello?

The only important factor now is development time, and Blazor websites are the quickest development turnaround of any available framework at the moment, by far.

for people who know their js/ts and the established frameworks are most likely still faster. Using blazor for anything outside of throwing a prebuilt component library together is a pain in the ass and requires js skills anyways.

Also, Blazor isn't even large. 2mb or less, last I checked. I don't know what you're on about, frankly.

just for the base runtime. Compare that to vue with is like 17kb gzipped. Also, wasm is not as compressible as js and c# doesnt generate the most size efficient wasm binaries.

an example page of blazor wasm downloads like 10+mb https://blazorclientside.computercodeblue.com/

the same page in vue only needs 41kb js https://vue3-realworld-example-app-mutoe.vercel.app/#/

performance is also pretty bad (for now) https://krausest.github.io/js-framework-benchmark/current.html

4

u/propostor Feb 11 '22

Um... I'm on my laptop now and a quick inspection of network transfer tells me - via "Empty cache and hard reload":

Facebook: 5Mb

My own personal React website: 2.6MB

My own personal Blazor website: 704kb

And this is the base data transfer. Not extra resources and assets that are counted separately.

If you think Vue is better because it's 17kb, you are a long way from doing useful web development. The people who pay for this shit are not interested in the difference between 17kb and 700kb, that's absolute peanuts for any web connection in the modern world.

The only thing people care about is how long it takes to finish the work. I have worked professionally on all frameworks - MVC, jQuery, Knockout, React, Angular, Blazor - and Blazor is the most productive I have ever worked on, by far.

-2

u/godlikeplayer2 Feb 11 '22 edited Feb 11 '22

Facebook: 5Mb

first 20, now 5... the fb spa is around an mb of initial downlaod gzipped. The rest are images and other assets that get lazy-loaded.

My own personal React website: 2.6MB

i guess you have misconfigured something then. 2,6MB is huge for a spa. use compression and a bundler to treeshake and split different views into different chunks and not load everything on the initial page load.

this statement alone shows that you simply don't know what you are doing...

If you think Vue is better because it's 17kb, you are a long way from doing useful web development. The people who pay for this shit are not interested in the difference between 17kb and 700kb, that's absolute peanuts for any web connection in the modern world.

you are funny. Reading your comments I know that you never shipped a frontend to the web.

Accessibility and performance are huge success factors. Amazon found that every 100ms in added page load time cost them 1% in sales.

Also, google takes page load times into account for its ranking as well.

Sure, if you only build some internal apps that just a few people use you don't need to know anything of that, but competing on the web is something entirely different.

that's absolute peanuts for any web connection in the modern world.

again, there isn't 5g everywhere and mobile users a huge part of almost any userbase.

. I have worked professionally on all frameworks - MVC, jQuery, Knockout, React, Angular, Blazor - and Blazor is the most productive I have ever worked on, by far.

sure buddy.

3

u/propostor Feb 11 '22 edited Feb 12 '22
  1. We aren't all trying to rewrite Amazon

  2. Amazon looks like it was written in 1998 and never updated and is slow as fuck so I don't know why you use that as an example.

  3. The only place I see people talk about download size of SPAs is in boring dick-swinging matches on the internet where they try to look like they're a web development ace because "this framework is smaller than that framework". Seriously no one cares, I already told you development time is more important than a few kilobytes difference in initial download. Server latency is usually a bigger factor than how many kB your website is.

  4. 5G, 4G, H+, 3G, whatever. Again, no professional developer halts production and goes into emergency mode because their users in the mountains with poor signal might have trouble connecting. WTF point are you trying to make regarding mobile phones, I don't get it.

  5. If you're going to accuse me of never releasing any website then I'll just do the same and accuse you of only releasing toy projects that nobody is ever going to use, because if your main result is the proud ability to look in the mirror and say to yourself, "Yeah, that website was SMALL", you really aren't developing anything of value. In all my years nobody anywhere at any level has ever made framework size the defining issue. Conversely, we're now writing a Blazor project at work and everyone is amazed at how fast development is. And so I go back to my original point - development time is important. The only area of optimisation I've ever seen focused on is server speed and database query efficiency, because that can get ugly pretty fast if you don't know what you're doing (unless you're only writing a toy website where the only thing worth caring about is how many kB it is on the client side).

  6. Yes buddy.

0

u/godlikeplayer2 Feb 12 '22 edited Feb 12 '22

We aren't all trying to rewrite Amazon

what about the countless e-shops out there?

Amazon looks like it was written in 1998 and never updated and is slow as fuck so I don't know why you use that as an example.

doesn't change anything I wrote or their findings regarding the loss in sales due to longer page loads

The only place I see people talk about download size of SPAs is in boring dick-swinging matches on the internet where they try to look like they're a web development ace because "this framework is smaller than that framework". Seriously no one cares, I already told you development time is more important than a few kilobytes difference in initial download. Server latency is usually a bigger factor than how many kB your website is.

ROFL, you are so out of touch. /r/beta for example is full of complaints about the not so optimal Reddit spa. just the top comment in the top post: https://www.reddit.com/r/beta/comments/sq6rb7/comment/hwjly2o/?utm_source=share&utm_medium=web2x&context=3

If you're going to accuse me of never releasing any website then I'll just do the same and accuse you of only releasing toy projects that nobody is ever going to use, because if your main result is the proud ability to look in the mirror and say to yourself, "Yeah, that website was SMALL",

don't worry, I helped to ship SPA's and SSR sites for several major European governments and big corporations. UX and accessibility are very important there.

The whole "I don't care about UX" attitude is so naive and something you only hear from some juniors or people working for startups.

people like you kinda make me hate web assembly in general since it allows to push out garbage that makes the web worse. Next week the one-trick java ponies gonna ship the whole JVM to render a UI because they can't learn the right tools.

2

u/propostor Feb 12 '22

UX is a whole lot more than 100ms page load times.

lol.

1

u/godlikeplayer2 Feb 12 '22

yeah, performance is still an integral part of UX.

1

u/firedream Feb 11 '22

People here don't think payload size is important. Until they reduce that, blazor wasm is just niche.

But I believe blazer server is going to thrive sooner than later, despite being less scalable than wasm.

1

u/godlikeplayer2 Feb 11 '22

But I believe blazer server is going to thrive sooner than later, despite being less scalable than wasm.

I'm sure that blazor server gets used a lot in .net shops, nothing wrong with that. The concept is not new. Vaadin and Phoenix live view offering the same concept for years if not for over a decade and you didn't hear about it outside of their respective ecosystems.

8

u/lux44 Feb 11 '22

Dan Roth had a blog post a couple of years ago, IIRC they could serve over 20 000 clients and ran out of RAM of the VM, not CPU.

8

u/BoredBSEE Feb 11 '22

You bet.

Your quote about "js, html, css and c# to be laborious" is 100% spot-on.

Javascript is annoying, and patching it all together with all these other things and frameworks and other crap to make it vaguely useful is tedious and unintuitive.

Blazor is a neat streamlined experience that uses only one language geared to get one result. It's WAY better.

Edit: And oh yeah, Radzen is wonderful as well. Lots of the work of making an application is already done for you. Radzen FTW.

6

u/Mordeor Feb 11 '22

Similar question about scaling Blazor server-side. Assuming you're not doing anything fancy with SignalR, what is the benefit to scaling with Azure SignalR service as opposed to just spinning up more instances of the web app? Similar to scaling a web API.

12

u/mjhillman Feb 11 '22

I’m with you. Never going back.

3

u/similiarintrests Feb 11 '22

Hell even using server side for some of our public facing portals, pick your favorite UI pack and off you go. Development speed as C# dev is just insane.

If you dont know JS like the back of your hand then dont bother with imo

3

u/AperiodicCoder Feb 13 '22

And as a team that’s been working on a big Blazor project for over 2 years, refactoring is a pleasure! I’ve done some major refactors I’d shudder to think about in JS.

3

u/jcradio Feb 11 '22

I started with blazor server, and have now been building a few applications with wasm. Love it. They have documentation on things to consider between server and wasm. Scaling is one of the cons for server, I believe.

2

u/Sonos Feb 12 '22

I work for a local authority and we are rolling the beta version of the website out shortly and it's blazor server. With some sub applications that aren't. But they are using a RCL for shared components where needed. A long as it's a .net core site you can do whatever you want really.

It's so powerful

3

u/VkeZiV Feb 11 '22

They said on net conference that it can scale a lot

7

u/zaibuf Feb 11 '22 edited Feb 11 '22

Azure SignalR has a limit of 100 000 concurrent conections. So unless you have more than 100 000 users visiting at once it isnt an issue. But I use Blazor mostly for business apps that have 100-200 users.

5

u/Footballer_Developer Feb 11 '22

That's what I'm using BS for, mine has around 1-2k concurrent users at best and it is doing absolutely fine.

4

u/[deleted] Feb 11 '22

Been doing a ton of work in Blazor, but Vue.js is pretty nice too.

5

u/dathtit Feb 11 '22

I belive in the future of blazor but at the moment it's not suitable for critical products yet. The perfomance of most UI components are just meh compare to other js UI library

6

u/zaibuf Feb 11 '22

Blazor server is fine for internal apps. We use it for several admin dashboards.

5

u/similiarintrests Feb 11 '22

Not everyone is building a FAANG company.

Idea to market is sometimes more important

3

u/grauenwolf Feb 11 '22

Given how bad typical internal business apps are, I don't think the component speed would even be noticeable. I'm used to minute plus load times just for my SAP timesheet.

2

u/BawdyLotion Feb 11 '22

I’m in the same boat. Blazor is so comfy to work with!

You mentioned using radzen components, while I have a lot of feelings about their ide, I strongly suggest anyone doing rapid development at least test it. It’s suuuuper slick as a way to one click scaffold an existing data set to a working code base. I would argue as soon as you’re past the initial prototype you’ll probably ditch the ide side of things but it just generates a blazor project at its core so all the core functionality is still there to build off of.

Supposedly their 3.0 version will solve basically all the complaints I have with it but given it’s not had much news I won’t hold my breath on that side of it.

1

u/beingmusical Feb 16 '22

I've been using radzen controls for 2 years. They are solid and reliable. The Radzen IDE, s a great pieces of work but once you start tweaking it beyond crud, it can become cumbersome. Had to roll back too may times when changing things produced an error, so I abandoned it and just wrote by hand. It's awesome to spin up a quick nice looking CRUD app with authentication.

1

u/BawdyLotion Feb 16 '22

Completely agree. My approach has been to use it to produce a project boilerplate and then handle any more advanced page logic by hand ditching the ide past that stage.

Still wouldn’t use it in a larger project because the benefits to rapid development would be overlooked by the somewhat unique project structure I’d have to work around down the road but for smaller stuff it’s easy to just pretend the ide doesn’t exist after the scaffolding and start writing your own pages and logic in visual studio

1

u/beingmusical Feb 16 '22

I've been developing solo in Blazor for 2 years now. With a history that goes back to Microsoft Access 1.0. I've been working server-side since it was first out, but switching to more webassembly. So nice to not have to integrate 5 different things into an app.

1

u/Ok-Audience-8993 Feb 24 '22

It's been 4months in this technology basically a fresher. I didn't know it's that fascinating, after reading your post definitely I'm gonna try this. Any suggestions lecture videos?

1

u/L-Jaxx Jul 03 '22

I've been following Carl Franklin's Blazor Train videos on YouTube. Everything explained step by step. Check it out.

1

u/Z010X Mar 03 '22

js, css, and html not only bring pain, they also bring their estranged frameworks which contains separate venues of nodejs, npm, typescript and browser compatibilities.

.net solved those problems very well in 3.1 and even better in 6. I'll never look at js the same way again because all my years of c# under my belt got boost productivity instead of the tedious hassles of frontend work.

1

u/zenstain Mar 04 '22

Same. I had avoided it altogether, even to the point of not trying to find out what it actually is and does (I know, stupid of me). I had such negative experiences with Razor that I figured (assumed) it to be Razor 2.0. And on a new Core/Vue.js project that we started last fall, figured screw it, let's do a quick demo using Blazor. And we have not looked back at all, it is awesome.

1

u/LeighPointer Jun 04 '22

And you will not look back! I have been developing since the birth of Visual C++ and Blazor is the nuts!

1

u/krynium Jun 04 '22

One of the largest loyalty webites in australia runs in blazor serverside.