C
C#16mo ago
Andre

❔ Blazor for a C# beginner?

Essentially, i wanted to get into web dev, and found out that you don't actually need to learn js. I asked ChatGPT for frameworks that use C# and are similar to the Unity game engine (since i've been learning Unity for around a month and i like how it works) and it gave me Blazor... Then, out of curiosity, i decided to search "Blazor" in this server and found everyone shitting on it. Is it really that bad or is it usable for simpler beginner projects?
24 Replies
Thinker
Thinker16mo ago
Blazor is absolutely useful if you just wanna make a personal project. People mainly dislike it because barely any companies use it and because it either requires you be constantly connected to the server, or for the website to have a massive initial download size. Although Blazor is a framework for making websites, not games, so it's inherently quite different from Unity.
Andre
AndreOP16mo ago
Yeah, i just wanted to find something that is as close to Unity as possible so it's not too difficult to learn.. looking at the default Blazor project right now, though... might have to do some learning after all 😬
Thinker
Thinker16mo ago
You could try Godot or Monogame if you just want another game engine which uses C#
Andre
AndreOP16mo ago
can you make websites in Godot?
Pobiega
Pobiega16mo ago
No, those are game engines.
Thinker
Thinker16mo ago
well you mentioned Unity so I thought you were talking about games
Pobiega
Pobiega16mo ago
If you want to make something other than games, you wont find anything "similar to unity"
Thinker
Thinker16mo ago
For C#, pretty much your only options for websites are ASP.NET MVC or Blazor. And yeah, you don't make websites like games
Andre
AndreOP16mo ago
My bad, yeah, i really have no clue how websites and their frameworks work.
Thinker
Thinker16mo ago
All web frameworks at their core are essentially just ways to put together HTML to display to the user
Pobiega
Pobiega16mo ago
C# is traditionally a backend language, meaning you'd use it to make the... "functional" side of a "website", with javascript or normal HTML to make it look good. Blazor is a way to use C# even in the frontend, using technology called WASM to run C# in the browser.
Thinker
Thinker16mo ago
Blazor essentially just allows you to partially replace Javascript with C#
Pobiega
Pobiega16mo ago
^
Thinker
Thinker16mo ago
Although due to the WASM thing you have those things I mentioned that the user either has to be constantly connected to the server or they will have to download the entire .NET WASM runtime the first time they visit the website. That doesn't mean Blazor is inherently bad, though, it's still a perfectly usable web framework. The crux is mainly that, as mentioned, if you're looking for a web framework that is "similar to Unity" they you won't find anything. If you already know C# well-ish and just want to make something then Blazor is good, otherwise you'd have to look into one of the quadrillion Javascript frameworks out there.
Andre
AndreOP16mo ago
I assume Blazor is as close as i'll get then, with it being mainly c#. It probably looks more complicated right now than it really is, much like Unity did when i started. Thank you both for the detailed answers, imma go see if i can make sense of blazor now
Thinker
Thinker16mo ago
Also btw, if you don't know basic HTML and CSS then you should absolutely brush up on that before getting into Blazor.
mindhardt
mindhardt16mo ago
And you probably will need a little of js anyways since Blazor cannot manipulate DOM directly, I used it for scrolling down with code and downloading some client-generated data
Jimmacle
Jimmacle16mo ago
i use blazor server for an intranet site and it's been pretty good for that
Thinker
Thinker16mo ago
I mean you wanted to make websites, right? you're gonna have to know at least HTML but in practice also CSS and JS for that.
mindhardt
mindhardt16mo ago
JS isn't that bad At least it has C-like syntax *Stares at 🐍 *
Thinker
Thinker16mo ago
JS isn't bad besides for NPM
blinkbat
blinkbat16mo ago
blazor is fine, but the dx and ecosystem is better for a js/ts spa
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server