DEV Community

Discussion on: Should you pick C# over JS? Maybe.

Collapse
 
denvercoder profile image
Tim Myers

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?

Collapse
 
aarone4 profile image
Aaron Reese

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

Thread Thread
 
denvercoder profile image
Tim Myers

LOL. Blazor is C# running in the browser using web assembly.

Collapse
 
rehman000 profile image
Rehman Arshad

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.

Thread Thread
 
denvercoder profile image
Tim Myers

I wasn’t comparing them. I was saying that instead of starting with JavaScript you could start with C#.