Remix.run Logo
martinald 5 days ago

Thing is I'm spoilt by asp.net, which has so much bad 'stigma' in the (esp startup) dev community but it is _extremely_ well designed.

You get a very batteries included approach(es) but you can always punch out of it and override it. I've never got into a situation where I'm feeling like I'm fighting the framework.

I also really like both Blazor Server and Blazor Webasm which allows you to write the frontend in C# too. Blazor server is great for internal admin panel style apps, and blazor webasm is good for saas apps, and for everything else plain old server sider rendering works great.

I'd really recommend anyone who is annoyed with their web framework to give it a go. It's extremely cross platform now (the huge drawback until about a decade ago was it was very hard to run on Linux, which isn't the case at all now - in fact, it's the opposite, harder to run on Windows), very fast and very easy to use. It takes a while to figure out the mental model of the design in your head but once it comes together you can quickly figure out how to override everything when you hit limitations (which tbh, is pretty rare compared to every other framework).

AstroBen 5 days ago | parent | next [-]

It's weird how C# can elicit such an eugh response, and TypeScript gets so much love. They're.. made.. by.. the.. same.. people

I agree people really need to update their mental model of where dotnet is at. I worked with it on Linux and it's a great experience

porridgeraisin 5 days ago | parent [-]

Probably because the standard way of writing C# is too OOP-ish (for lack of a better term). Typescript lets you write just usual functions handling mostly typed objects, which is about as much abstraction as most people want (except for 1-2 classes for stuff like `BTree`), and as much typing as most people want.

DanielHB 5 days ago | parent | next [-]

It is because C# uses nominal types (C-like) and typescript uses structural types (ocalm-like).

https://en.wikipedia.org/wiki/Nominal_type_system

https://en.wikipedia.org/wiki/Structural_type_system

Although nominal types doesn't necessarily mean OOP-ish (inheritance-heavy) it is a pre-requisite (for inheritance-heavy code).

The distinction between the two is not a black/white thing but (modern) typescript (and Flow as well) is heavily focused on structural typing while C# is heavily focused on nominal typing. In fact the whole composition vs inheritance discussion fundamentally is about making types that behave in a more structural manner.

mrsmrtss 5 days ago | parent | prev [-]

It's more likely they never tried C#, but have a very strong negative bias towards it nevertheless. C# can also be written very functional if you want, it's a multi-paradigm language like Typescript itself.

porridgeraisin 5 days ago | parent [-]

Of course it _can_ be. But that's not how major libraries are structured. Which defines how majority of business apps are structured. The way majority of folks use a language defines the language in its entirety, doesn't matter if theres a kitchen sink of alternative paradigms. You can't argue that C# isn't enterprisey in the majority case. In JS you can build on top of a whole, extremely popular library ecosystem purely using functions and options objects.

terandle 5 days ago | parent | prev [-]

Blazor is not good at anything. Please stick with JS for the frontend .NET devs. You'll thank me later.

hirvi74 5 days ago | parent [-]

What issues have you encountered?

As old school as it may be, I can accomplish basically everything my users need with just vanilla JS and .fetch() requests.

I've been playing with Blazor, and it's been great so far. However, like everything, I know it's not perfect.

terandle 5 days ago | parent [-]

Performance of WASM issues. Rendering performance of large data grids is not good. Also the first load time is also terrible 50mb+ payloads.

Blazor server uses websockets and is just a whole other bag of hurt. You'll have to deal with disconnects even if you can stomache the increased cloud costs.

martinald 2 days ago | parent [-]

50mb payloads are very extreme. There's definitely a few MB of hurt for WASM - but nextjs is just the same, plus it doesn't have the excuse of having to download the entire CLR!

You can (and I have) definitely rendered huge data grids efficiently with Blazor.

The biggest drawback with wasm is no proper multithreading support which has been delayed for years.

On blazor server; I totally agree, it's a pain. But for 'intranet' style apps which are used internally it's by far the most productive development environment I've used for web. I wouldn't use it for anything that wasn't a total MVP for public use but it's pretty great for internal apps like admin panels.