Ignoring node and demo which are js on the server, and blazor which is C# in the browser (via webassembly) they are solving problems in different parts of the stack so I don't see how you choose one over the other. Also it would be more appropriate to compare C# to Typescript as both give you static types and type checking. My biggest issue with C# was the number of using statements required to achieve even the simplest of tasks. For example simply connecting to a SQL database requires about 20 lines if code to import and set up the connection protocol.
Sometimes when I’m alone in my room I write software... it’s for fun. I’m a father but I’m not like all up in your face about it. | 🤘 Metal 🤘| Pro-Am Chef
Location
Denver, CO
Education
Not really
Work
Full-Stack Developer / DevOps Strategist at Envision Radiology
And I’m not sure what you mean here. You say that C# and JavaScript are “different parts of the stack” but I can build a front end with JS or C#. I can build a Mobile app with JS or C#. I can build a server with JS or C#. I can build a game with JS or C#.
Traditionally JS is used for browser / client side interactivity and data manipulation C# is middleware and intercepts the HTTP GET/POST calls and does something with them. The lines are more blurred now becase you can run JS on the server in node, I am not aware of a native implementatin of C# in a browser. You can compile to web assemby but that is a different topic altogether. JS is front end code, C# is middleware
Sometimes when I’m alone in my room I write software... it’s for fun. I’m a father but I’m not like all up in your face about it. | 🤘 Metal 🤘| Pro-Am Chef
Location
Denver, CO
Education
Not really
Work
Full-Stack Developer / DevOps Strategist at Envision Radiology
I think the poster meant to say that C#, and (vanilla) JS are not really comparable, because C# is statically typed so a better (Apples to Apples) comparison would be Typescript v.s C#. But in complete fairness, you're not entirely wrong. They (C# and JS) can accomplish the exact same end goal. You can make a mobile app with JS or C#, you can make a backend server with JS or C#. So the overall functionality of what your trying to accomplish would still be the same, aside from the language differences.
So why wouldn't they (C# or JS) hold the same spot on the stack? Maybe I'm confused sorry. I apologize.
Sometimes when I’m alone in my room I write software... it’s for fun. I’m a father but I’m not like all up in your face about it. | 🤘 Metal 🤘| Pro-Am Chef
Location
Denver, CO
Education
Not really
Work
Full-Stack Developer / DevOps Strategist at Envision Radiology
Sometimes when I’m alone in my room I write software... it’s for fun. I’m a father but I’m not like all up in your face about it. | 🤘 Metal 🤘| Pro-Am Chef
Location
Denver, CO
Education
Not really
Work
Full-Stack Developer / DevOps Strategist at Envision Radiology
Sometimes when I’m alone in my room I write software... it’s for fun. I’m a father but I’m not like all up in your face about it. | 🤘 Metal 🤘| Pro-Am Chef
Location
Denver, CO
Education
Not really
Work
Full-Stack Developer / DevOps Strategist at Envision Radiology
With JavaScript you can use the fetch api but it sucks and almost no one does so you ‘npm install’ axios and then add an import statement. JavaScript doesn’t have good date time handling so you ‘npm install’ date-fns.
Would you like to see how many import statements I have on my current JavaScript project?
Sometimes when I’m alone in my room I write software... it’s for fun. I’m a father but I’m not like all up in your face about it. | 🤘 Metal 🤘| Pro-Am Chef
Location
Denver, CO
Education
Not really
Work
Full-Stack Developer / DevOps Strategist at Envision Radiology
Sometimes when I’m alone in my room I write software... it’s for fun. I’m a father but I’m not like all up in your face about it. | 🤘 Metal 🤘| Pro-Am Chef
Location
Denver, CO
Education
Not really
Work
Full-Stack Developer / DevOps Strategist at Envision Radiology
Yep. I use rider too. Or you can use Resharper. And I don’t know if it’s still around but there issues to be Visual Studio Power Tools that added usings.
Sometimes when I’m alone in my room I write software... it’s for fun. I’m a father but I’m not like all up in your face about it. | 🤘 Metal 🤘| Pro-Am Chef
Location
Denver, CO
Education
Not really
Work
Full-Stack Developer / DevOps Strategist at Envision Radiology
Ignoring node and demo which are js on the server, and blazor which is C# in the browser (via webassembly) they are solving problems in different parts of the stack so I don't see how you choose one over the other. Also it would be more appropriate to compare C# to Typescript as both give you static types and type checking. My biggest issue with C# was the number of using statements required to achieve even the simplest of tasks. For example simply connecting to a SQL database requires about 20 lines if code to import and set up the connection protocol.
And I’m not sure what you mean here. You say that C# and JavaScript are “different parts of the stack” but I can build a front end with JS or C#. I can build a Mobile app with JS or C#. I can build a server with JS or C#. I can build a game with JS or C#.
How are they different parts of the stack?
Traditionally JS is used for browser / client side interactivity and data manipulation C# is middleware and intercepts the HTTP GET/POST calls and does something with them. The lines are more blurred now becase you can run JS on the server in node, I am not aware of a native implementatin of C# in a browser. You can compile to web assemby but that is a different topic altogether. JS is front end code, C# is middleware
LOL. Blazor is C# running in the browser using web assembly.
I think the poster meant to say that C#, and (vanilla) JS are not really comparable, because C# is statically typed so a better (Apples to Apples) comparison would be Typescript v.s C#. But in complete fairness, you're not entirely wrong. They (C# and JS) can accomplish the exact same end goal. You can make a mobile app with JS or C#, you can make a backend server with JS or C#. So the overall functionality of what your trying to accomplish would still be the same, aside from the language differences.
So why wouldn't they (C# or JS) hold the same spot on the stack? Maybe I'm confused sorry. I apologize.
I wasn’t comparing them. I was saying that instead of starting with JavaScript you could start with C#.
20 using statements vs 20,000 node_module files? 🤔
With JavaScript you can use the fetch api but it sucks and almost no one does so you ‘npm install’ axios and then add an import statement. JavaScript doesn’t have good date time handling so you ‘npm install’ date-fns.
Would you like to see how many import statements I have on my current JavaScript project?
There are several files with 30+ imports but the average is about 12 per file.
Now with Blazor all of your front-end usings can be put into one file and you can maintain them there.
Ah yes, but I don't need to know WHICH 20,000 mode_module files :)
I can't remember the last time I had to manually add a using statement with Rider, or really with most any modern IDE. They just add them for me.
Yep. I use rider too. Or you can use Resharper. And I don’t know if it’s still around but there issues to be Visual Studio Power Tools that added usings.
And I don’t need to know what usings I have. If you place your cursor over the red squiggly then hit CTRL+ . It will add them for you. 😂