✅ Blazor vs Razor Pages
Hello lovers of C#,
I have a passion project that is basically a recipe manager.
At the moment i'm using Razor Pages. But now the problem is that i want to add some functionality that to my understanding is not possible in Razor Pages without the help of JS(which i don't know)
Basically i want to add a button that adds a new input field with a dropdown list. You can type in the product name, select neasurement from the dropdownlist and type in the amount. To my understanding and from what i have read Razor Pages doesn't quote have the capabilities for that without JS.
I know thay blazor is different, because you can write more complex front end only uaing C#.
My question would be. Should i switch to Blazor? Or should i stay with Razor Pages and learn JS?
11 Replies
I'd like to add another question to this. How should i determine if i choose blazor server or webassembly? I know the difference between the two bit can't quite determine which one to use when
Is this all for personal use, or are you partially doing this to learn things for a future job?
Blazor works fine but isn't really well adopted in the real world, so JS is a more realistic solution.
And you could go with either one - just remember that blazor wasm is a frontend app (so no database connections, API keys or other sensitive information!), and blazor server is the opposite
It runs exclusively on the server and just streams updates via websockets to the client, all logic is happening on the server
I'm planning on personally using it. But learning for a future job is always in the back of the mind.
Could i ask why blazor isn't really adopted in the real world?
Since learning skills for a future job is at the back of the mind. Maybe i should build it using a different framework? Such as WinForms or anyother framework?
Could i ask why blazor isn't really adopted in the real world?Because it has... unique downsides its C#, not javascript, so it cant run natively in the browser that means webassembly, or serverside. the WASM approach has the downside of having to ship parts of .NET runtime in wasm form together with your app, and poor JS interop JS is the defacto language of the web, not being JS or not being able to interact with JS easily is bad If I were you and wanted potential job-skills, I'd develop a C# backend API with ASP.NET Core WebAPI (assuming you want to learn C#), and a react/vue/whatever javascript/typescript frontend
Would you say it is better to have web developement skills for potentially finding a job or desktop application?
I am studying software systems (which is basically computer science, just a different name) and we don't really focus in web development. But in my eyes it has way more potential and more need as everything is on the web these days.
Sorry if the question doesnt make sense. You sound like a person that has some experience and the insights would be valuable. Thanks.
web, 100%
there are 5-10 web jobs for every one desktop job
I have ~12 years of professional experience as a backend developer using C# for work.
I've been doing C# for 20 years, and web stuff (php, C#) for all that time 🙂
I'm just i guess a bit hesitant on learning JS. As i have heard a lot of scary things about it and c# is what i'm used to. But i guess it is time to look into JS.
Last question. For the project using C# web api and JS for frontend. Would you still use Visual Studio?
VS for the backend, VS Code for the frontend
Did you get a major in something? Or are you self taught?
Self taught
but the job market was different back then
no bootcamps and less self-taught people
Impressive.
Thank you for for your time. You have been a real help. Hats off to you!