1
ddit
31d

Is programming a website/basic backend program in TypeScript with NodeJS actually a good idea? Or should you be programming it in C#, Rust, (not PHP), Golang, etc?

I personally feel like NodeJS has pretty amazing performance considering how much less code you would write compared to the other options. Although I feel something like Rust (haven't used it yet) would be more robust but more work.

Note: I only currently know JS, TS, C#, Go and obviously HTML, CSS

Comments
  • 0
    Sure great idea. Why not.

    If you have some special use case then look around at languages / frameworks you don't know. But for most sites, go with the tools you know
  • 0
    If it's something basic I guess you can get away with JavaScript
    But I'm fairly sure (correct me if I'm willing) that you can't do multi threading with it.
  • 2
    There's lots to consider but generally there's no good answer.

    I work in a small shop. One guy knows a number of languages, but we all know JavaScript... so node it is for a lot of things.
  • 2
    What you "should" be doing in generally a question of economics.

    Can you afford to not care about raw performance and/or scale? Is it valuable to you to have a TS/JS codebase (eg. considering what the devs you work with know)? Does Node do something for you that eg. c# or go don't? Are you doing this for learning Node? Then sure, use Node.

    Otherwise I'd recommend something speedier and more scalable, like dotnet core.
  • 0
  • 2
    Along with the really good advice @RememberMe stated, I'd also ask about your team's infrastructure. Like is your team currently writing web apps in JS, c#, php, what have you. How experienced are you and your team with maintaining JS apps if you go that route. How long will your web app be in production. Try to estimate how many people will it serve.

    My personal suggestion is that if your team is already writing stuff in one language and has a nice workflow for that language, meaning they use patterns in their code, make regular updates, can run daily builds, push to prod automatically, run unit tests automatically, then don't disrupt that by introducing a new stack. Instead experiment with that new stack outside of your work environment, come up with all the components on your own time and then slide them into prod on company time if you've deemed it worthwhile and your team is fine with it.

    If you're doing this solo, fuck it. Build it and see if you like the stack.
  • 1
    @LotsOfCaffeine oU kaNt du MulTithredeeng... Why no one is telling the same for python ever? Node have a main loop but all async can go to threads with worker threads
  • 0
    Do it in whatever you feel comfortable or whatever you are willing to learn about.
  • 1
    Please just use pure node with express until you figure how how to make a site/app “by hand”.

    Then, and only then, look at using a front end framework like Vue or React or Bootstrap.
  • 0
    Less code in ts/nodejs compared to c# for instance? Sounds like you're doing sonething wrong
Add Comment