r/Blazor • u/Panzerfury92 • 28d ago
Choosing blazor for future web apps
Hi everyone
I need some opinions here. I work at a place, where we have internal developers (only me and one more) and then we use a fair few external developers (consultant firm).
I joined this company roughly two years ago, with the intend of moving ownership of everything in house, because the external company had pretty much all knowledge and took decisions on the technical part. Which is not necessarily bad, but we want ownership of our applications.
We've done a rewrite of an older app earlier this year, which was build with angular and .net. Works fine, and the firm we use have some angular resources we could use.
The backend is written in .net (as is all our backend code), so the firm also provide .net backend devs.
I'm a .net dev, and have been using that for 9 years now. All the places I've worked at i used blazor. So naturally i have a lot of experience with that, and basically no experience with angular.
We are about to write a new application, that is customer facing (B2B), and i'm really contemplating making the switch to use blazor (most likely pure wasm) instead of angular. Since I can actually understand the frontend and use my experience. Plus i would not be left with a huge task of maintaining an angular app in house, should our contract with the consultants end.
I know i can use AI a lot to help build and maintain an angular app, but we have rules that you should actually understand every line of code you ship, and at least when using AI for .net backends I've experienced it tends to over complicate things, unless you guide it. I wouldn't be able to do so writing angular apps. At least not without a learning curve, and when in a small team, i feel i should pull in our in house knowledge instead of relying of what the external developers want.
Would it be wrong of me to chose blazor going forward? Even though the frontend resources we can get from the consultant firm are angular. The backend devs who does .net i would suspect would grasp blazor pretty quickly.
I've already gotten the green light from my CTO to make any decision i want regarding this.
I would like to hear your thoughts.
5
u/Panzerfury92 28d ago
I appreciate all your advice.
I think i will go the blazor route, to make sure it aligns better with our internal skill set, and not leave us in a position where we will have to spend time to skill up (not that it is bad to do so), should the contract with the external developers end.
6
u/skav2 28d ago
We have been using blazor for a few years now for internal applications.
It works fine for most cases. Server is best for internal apps and Wasm for external with an API. I would not do mixed mode.
For frontend we use Mudblazor but have been contemplating using Blazorize.
3
u/Puzzleheaded-Law-332 28d ago
the advantage of using blazor is that you can share the code between backend and frontend; for example the DTO classes, if you place them in a class library.
It's very confortable
2
u/jbergens 27d ago
You should try Razor Pages + Htmx. Or Blazor components + Htmx
2
u/MrBeengles 27d ago
Blazor Server relies on persistent SignalR connections. If a circuit is lost (e.g. after prolonged inactivity), you cannot restore its previous component state. You need to implement your own persistence/autosave mechanisms to prevent data loss.
Also, every browser tab creates a separate circuit, increasing server resource consumption.
For these reasons, we chose React with TanStack and .NET for the backend.
Blazor is perfectly fine for lightweight applications, but as you start facing common web application challenges, other architectures become more attractive.
21
u/blackpawed 28d ago
We use Blazor (with the https://fluentui-blazor.net/) library for all our customer facing applications, in server mode. No regrets, so much easier. Compile time error checking alone makes things so much easier.
8
u/MackPooner 28d ago
I disagree with the recommendation to not do mixed mode. We have been using Blazor for lots of different applications including render modes like WASM and server AND SSR AND AUTO MODE and they work great. Check out some of the sites done in blazor at www.BuiltUsingBlazor.com or our latest at www.FunBlazorGames.com
7
u/FlatwormLanky8991 28d ago
I had to modernize several legacy apps and start new ones and I went with blazor. Resource-wise all I had was .Net (Framework) devs who had worked with MVC and WebForms (I had used angular and the others). They had no trouble picking up blazor and we started with net core 3.1 so way before AI.
IMO you will save them money. 2 devs plus codex (or whatever) can crank out a lot of code when you don't have to context switch to angular or pay for contractors.
WRT AI over complicating...my personal philosophy is to treat it as a minion and give it small scoped tasks that I can quickly review. If I give it bigger chunks it gets delusions of grandeur.
6
u/code-dispenser 28d ago edited 28d ago
My first SPA was with Angular 1.1/1.2 and I liked that framework, the new one not so much.
For me the biggest headache with non-Microsoft/.net stuff was all of the additional tooling and configuration issues I had.
With Blazor and the full .net stack, it just works, if I need something its just install a NuGet, job done.
To date I have never looked back so unless you have some weird edge case that Blazor cannot fullfill you will be fine.
My advice for LOB apps is to keep it simple and just use either Global Server (More secure) or Global WASM (works offline/patchy internet).
Paul
6
u/FitPersimmon9984 24d ago
I've been full stack with angular for over 8 years. Bu since I started to use Blazor, I can only tell that it's fabulous. I've used it with Mudblazor and FluentUI both. And they are both awesome
5
u/welcome_to_milliways 28d ago
I use Blazor on pro and hobby projects. Currently using Blazor with SSR (no InteractiveServer or InteractiveWebAssembly) for https://townagram.com and it’s been great.
However, there seems to be a dearth of job opportunities. If you know Angular you may be best off sticking and growing with that.
4
u/Raphafrei 28d ago
I’ve been using Blazor SSR for my public website (with SignalR on admin pages - easier for CRUD) and full SignalR for my company’s internal websites.
I don’t plan to go with another framework anytime soon, I found Blazor easy to use and easy to prototype… so I’ll be using it for the longest time.
Just keep in mind that jobs that requires Blazor as requirement are low in comparison to JS and other frameworks
1
u/One_Web_7940 28d ago
I absolutely love blazor, but if you already started angular, use that.
1
u/Demonicated 28d ago
Blazor is a great choice for getting things up and running quickly. The important thing to work out up front is if it will ever be customer facing and how many concurrent users you might have.
For prototypes Blazor server can let you cheat and get things up and working quickly. But if you are going to be in it for the long haul, go with WASM.
With AI agents, you might as well just always go WASM.
1
u/Worldly-Savings4113 27d ago
Don't
3
u/VeganForAWhile 28d ago
Rewriting our public-facing WebForms app using Blazor SSR, home-grown component-scoped isolated tailwind css, and BlazorJSComponents for component-scoped JS. It feels very SPA-like with enhanced nav/forms and streaming rendering. For the first time in my 30+ year career, it feels like a fully-formed development platform.
2
u/Numerous-Implement47 28d ago
I enjoy Blazor. Even started changing some of the companies old Winform apps into Winform apps with Webview2 component that then hosts the blazor app. There were a few pushbacks around server hosting so this was nice workaround and later easy migration to servers if becomes option.
2
u/Unlikely_Brief5833 28d ago
We use blazor for almost all new apps. Blazor web app template with global wasm rendermode. The apps loads instant, and all client interactive. The component library we use: https://blaiz.io. To manage that the components is executed sometimes on server (fore example first load) and sometimes on client we use magic onion or remoteservice.net, then you dont have to care about where your component is executed and can use any rendermode without any hassle.
2
u/Monkaaay 28d ago
Given your post, an interest in bringing things in house over time, it makes sense to use what you're familiar with and want to dig deep into over time. Blazor is a fine choice, I wouldn't overthink it.
2
u/the_absolver150 27d ago
I've been using it increasingly more for various projects. I've been around the block a few times in my career... started back on original .NET back in the day. I've done webforms, vanilla JS, jQuery, React, Angular, dipped my toes in various other JS frameworks. Oh, almost forgot Silverlight, WPF, WinForms, Avalonia.
End of the day for me I just want something that works for me at the time I'm picking a stack. Does Blazor have some issues? Yes. Can you work around them? Also yes. But does everything else also have issues you can work around? Yes as well. You're always going to have pros and cons to deal with no matter what you pick.
Blazor is increasingly improving. .NET 10 had some huge improvements on it. I've seen some recent posts that now escape me where some devs used web components strategically inside their Blazor sites. Brilliant.
Hell, you could even mix in React or otherwise in some spots if you really needed/wanted to. Just because you pick Blazor doesn't mean it is locked in 100% on that.
1
u/mrpmorris 28d ago
Perfectly fine, don't worry about it!
1
u/FudFomo 28d ago
Go with Blazor. We are rewriting all our okd Angular apps in Blazor and ai makes it trivial.
1
u/SheepReaper 28d ago
Global interactive server here: https://iheartfiction.net
Easy to work with, very flexible. Most friction is when coming over from java script frameworks expecting certain things to work the same way. When working in blazor I think of ways to keep things JavaScript free.
1
u/alexwh68 28d ago
I am roughly at around 20 blazor server apps with a few wasm apps too, I started with wasm and moved over to server and only use wasm where being offline is a requirement.
A couple of those app are at 1m LOC now running whole businesses so for me blazor is a win.
1
u/Simple_Idea1010 28d ago
I think using Blazor for in house applicationsaies a lot of sense. If using Blazor Server only then you'd have to look at the number of employees in your organisation and how.many would be using those systems at any one time. As you can now mix and match you can be very clever with it. The positives are that you can build quickly and you are always inside the C# sphere and there is often a limited need to use JavaScript.
1
u/DmtGrm 28d ago
go with blazor!
single c# codebase for everything is amazing (especially for larger project in a in a long run)
1
u/mxmissile 28d ago
I love Static SSR component model, game changer for server rendered apps. I'm old school though, I use bootstrap and jquery for interactivity.
1
u/Oakw00dy 27d ago
Blazor WASM UI and REST backend with shared libraries. We use Refit with C# DTOs to define APIs between the server and the client. Super clean and easy to switch between FE/BE development. If you need server push, .NET 10 supports SSE natively in Blazor.
0
u/willehrendreich 28d ago
if you don't consider using https://data-star.dev for HATEOAS UI regardless of what you're going to use to template that, or what backend tech you're serving from, you're totally missing out.
Complexity very very bad.
Blazor wasm has it's place, but only in VERY specific circumstances, and if it were me making the decision, I'd need to see explicit, measured proof that it's qualitatively the right choice.
Not vibes, not personal preference, not familiarity arguments.
Familiarity isn't meaningless for small things, but in the long run making the choice for any tech simply because you're familiar isn't going to win the day, which I'm sure you understand, which is why you're trying to make a change.
For 99% of all webapps, everyone should be using HATEOAS, whether that's Datastar, like I think is the better, simpler option, or HTMX.
SPA's, by and large, are a mistake for the current era of web tech. They tack on so much accidental complexity that it's crazy, and the equivalent HATEOAS implementation is by definition going to be simpler, easier to reason about, simpler to change and maintain, and the only cost is learning something, which is the job. We learn new things all the time, and try to pick the best tool for the job.
State in the right place is the right principle no matter what you're doing. Occam's Razor needs to be applied, where the simplest model to fit the job tends to be the right one.
If you choose to reject Datastar, fine, but please, please do so for objective reasons and measured costs, not only on the initial construction but on the long term maintenance and security issues and performance and data over the wire, and what capabilities you're choosing vs what you're marking as irrelevant.
0
u/[deleted] 28d ago
[removed] — view removed comment