1

why is node.js getting popular instead of languages like php and ruby for web or api development?

Comments
  • 1
    PHP atleast is a pain to write asynchronous code with (there are third party libs to simplify it but by default you need to manage threads yourself), not sure about ruby but ruby was never super popular to begin with.
  • 3
    You can do super cool things with nodejs and a hand full modules super fast.

    Express
    Mongoose
    Bcrypt
    Lodash
  • 1
    JavaScript is popular because browser require it. Any web project at least needs some JavaScript to work, so even if you do php you'll need JavaScript. If you do Java or Ruby for web, you'll need JavaScript.

    So when your frontend requires JavaScript and now with node your backend also can be written in JavaScript, why won't you commit on just one language?

    There is also a a very low barrier to get started.

    That being said: do yourself a favor and directly start with TypeScript. Trust me and thank me later.
  • 0
    Funny you ask this when node is losing momentum
  • 1
    @k0pernikus Yes Typescript is the key
  • 0
    I think the main reason is because of Javascript. A looooot of people know JS and thus it's easy for them to start writing backend in that language, compared to, let's say, go lang or some other... :) And it's fast when u look at req/response time
Add Comment