C
C#β€’9mo ago
Triufelis

βœ… 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
Triufelis
Triufelisβ€’9mo ago
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
Pobiega
Pobiegaβ€’9mo ago
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
Triufelis
Triufelisβ€’9mo ago
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?
Pobiega
Pobiegaβ€’9mo ago
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
Triufelis
Triufelisβ€’9mo ago
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.
Pobiega
Pobiegaβ€’9mo ago
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 πŸ™‚
Triufelis
Triufelisβ€’9mo ago
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?
Pobiega
Pobiegaβ€’9mo ago
VS for the backend, VS Code for the frontend
Triufelis
Triufelisβ€’9mo ago
Did you get a major in something? Or are you self taught?
Pobiega
Pobiegaβ€’9mo ago
Self taught but the job market was different back then no bootcamps and less self-taught people
Triufelis
Triufelisβ€’9mo ago
Impressive. Thank you for for your time. You have been a real help. Hats off to you!
Want results from more Discord servers?
Add your server
More Posts
βœ… Reading Secret.jsonHi, I want to read my secrets.json file, I set it but it doesnt work my secrets.json: ``` { "Pla❔ Converting code to another LanguageSo for an engineering/ cs project, we’re making a satellite (lookup CanSat if you want more details)βœ… Questions about castingHi all, I'm looking to simplify some network code I've got. Networking doesn't really play too large❔ c# wpf change background color of whitespace characterI've been at it for a few hours and i just cant seem to get it to work, i've tried keypress events a❔ .NET installation not recognized, but command worksI am trying to install .NET Core 7. The installation goes smoothly and I can run the command, but li❔ Need a hand on creating something i am doing on fiddler which involve web traffic editingI've never done anything dealing with web traffic programmically so this is somewhat new to me but h❔ Why is Pop() necessary here??So I found a sample solution for the LeetCode decode string puzzle https://leetcode.com/problems/decI don't really get how to create new methods for my code. Yesterday people told me it's got no body.Didn't really understand anything when i did research. It's probably a quick fix : ] I'm talking ab❔ MC3050 compiler errorI added a new project with some custom WPF controls to my project's dependencies. I then added the βœ… Function For Division Game Showing Same Number Twice???```cs public void StartDivGame(string username, DateTime date, int totalQuestions, string difficulty