News for hackers. Stuff that matters.
Re:ASP.NET Core Blazor by aardvarkr on Friday October 06, 2023 @08:58PM (#37798107)
Avoid blazer like the plague. I use it in my work and the only reason why is because everyone uses C# and can’t be bothered to learn a second language. Take a wild guess which company that is. It’s an awful architecture that only exists because some exec at Microsoft willed it into existence. There’s a reason why Java doesn’t get used to program real website front ends and I’d never use C# for web dev if I weren’t forced to.
Re:ASP.NET Core Blazor by xky on Friday October 06, 2023 @09:37PM (#37798310)
We evaluated a few options and settled on Blazor after tiring of the build chain and dependency complexity of the TypeScript world. So far, it’s been nothing but a breath of fresh air to work with. It’s also important to clarify which model you’re working with when discussing Blazor. A lot of complaints seem to stem from using the Blazor server websocket model outside of its specific use cases. The web assembly and prerendered models are more comparable to other modern developments in other ecosystems.
Re:ASP.NET Core Blazor by yungporko on Saturday October 07, 2023 @03:22AM (#37799725)
i'm currently working on a large blazor project, and it's pretty much been the same experience as all other shitty microsoft frameworks i've used, where its super nice to work with at first when there isn't too much complexity or edge cases, and all the magic under the hood makes everything super convenient and you find yourself asking why everyone doesn't use this for everything, but by the time the application is too big to consider scrapping it or rewriting it with different technologies, the cracks start to show and it's so much work to even develop the rest of it that you start looking for another job
Re:ASP.NET Core Blazor by bouke on Sunday October 08, 2023 @01:12PM (#37812387)
So what are the cracks that have started to show that have made you start looking for another job?
Re:ASP.NET Core Blazor by kumarvvr on Friday October 06, 2023 @09:19PM (#37798224)
Curious to know more. I have developed a few web apps using it. I actually like the pages + Components separation paradigm and asp.net is pretty fast.

Could you explain your perspective on Blazor?

Re:ASP.NET Core Blazor by DaiPlusPlus on Friday October 06, 2023 @09:32PM (#37798295)
Blazor is based on a build of .NET (CLR + BCL) for WASM - though it is highly optimized and unused code is aggressively removed from the WASM bundles it still means your users will need to download (at least) 6MB of WASM while your SPA loads - which makes Angular look anorexic in comparison.

...which basically restricts Blazor's use to corporate LAN environments, kiosk applications, and (maybe) PWAs - but it's otherwise completely unsuitable for use on the wider public Internet.

...but we know it'll end-up being used on the public web eventually anyway because developer time is worth more than the end user UX.

Re:ASP.NET Core Blazor by blackoil on Friday October 06, 2023 @09:38PM (#37798313)
Which may look huge but not big problem for enterprise web apps. First load may be slow but it is then cached.
Re:ASP.NET Core Blazor by mgh95 on Friday October 06, 2023 @09:36PM (#37798307)
This is just the adage software is a gas. linkedin.com now takes 5.1mb; users are simply becoming accustomed to larger web based applications.
Re:ASP.NET Core Blazor by xky on Friday October 06, 2023 @09:43PM (#37798332)
The .Net team has made pretty significant strides in minimizing the bundle size and I would expect that to continue. It’s now also possible to combine pre-rendering and streaming with web assembly to improve the loading experience.
Re:ASP.NET Core Blazor by 4rt on Friday October 06, 2023 @11:11PM (#37798704)
You're talking specifically about Blazor client-side framework which is designed for e.g. games or drawing apps where 6mb of downloads isn't particularly onerous.

The far more common use-case is Blazor server-side which doesn't have this huge download overhead and works like server-side rendering in e.g. React, the download is approximately 150kb.

Re:ASP.NET Core Blazor by kgeist on Saturday October 07, 2023 @02:41AM (#37799529)
>it still means your users will need to download (at least) 6MB of WASM

Isn't it like 1 second of scrolling through Instagram?

Re:ASP.NET Core Blazor by jmkni on Saturday October 07, 2023 @06:53AM (#37800655)
Angular has really improved in this area, the addition of standalone components mean your initial payload can be very small indeed, and then just lazy load the rest as/if you need it.
Re:ASP.NET Core Blazor by CharlieDigital on Friday October 06, 2023 @10:15PM (#37798459)

    > I’d never use C# for web dev if I weren’t forced to
.NET Web API is where it's at. I built an Express backend today and it feels primitive. The new minimal templates Web API templates are really good and even easier to get rolling than Express.
Re:ASP.NET Core Blazor by jmkni on Saturday October 07, 2023 @06:51AM (#37800647)
I've been using NestJS recently and it is a nice middle ground between the 2.

You get the power of Types with the flexibility of Express (as well as access to the entire node ecosystem), I like it.

Re:ASP.NET Core Blazor by CharlieDigital on Saturday October 07, 2023 @11:34AM (#37802578)
I've used Nest and what really got me was that it seemed like a weird compromise.

It performs almost an order of magnitude worse than ASP.NET Core and isn't any simpler (TechEmpower; considering only the EF + PG non-middleware cases).

I feel like if a team is comfortable with TypeScript and considering Nest.js, C# and .NET Core Web APIs are not any harder, but you get much better throughput for your compute spend.

Re:ASP.NET Core Blazor by DarkNova6 on Friday October 06, 2023 @10:25PM (#37798508)
> There’s a reason why Java doesn’t get used to program real website front ends.

The reason being native browser support for JS and nothing else. Java assumes a powerful runtime and c# much less so. WASM is a godsend for interoperability in the browser and I personally hope it delivers us from the curre scourge in the long run.

Re:ASP.NET Core Blazor by merb on Saturday October 07, 2023 @01:56AM (#37799335)
Java is/was heavily used in the browser. GWT is actually a thing. Since Google dropped it, it lost a lot of users basically. But there are still some big users.
Re:ASP.NET Core Blazor by cebert on Saturday October 07, 2023 @05:40PM (#37805802)
I thought GWT transpiled into JS, no?
Re:ASP.NET Core Blazor by merb on Thursday October 12, 2023 @02:52PM (#37861376)
Well kinda. It’s more like a Java to js compilation than just a transpilation.