While the popularity of Node.js is  increasing , PHP’s traction is going down. With that context, this post is going to elaborate on 5 must-know practical aspects of using Node.js for PHP developers. These will be things no-one talks or writes about, time to get going.

Table of contents

  1. Node.js for PHP developers (not Node.js vs PHP)
  2. Node.js for PHP developers the practical side
  3. Node.js code execution is async and non-sequential
  4. Node.js promises possibilities
  5. Node.js process is long-running, unlike PHP
  6. Memoization example
  7. Connection Pool example with MySQL
  8. Debugging is easier in Node.js than in PHP
  9. Major version upgrades in Node.js is seamless over PHP
  10. Dockerizing a Node.js application is a breeze compared to PHP
  11. Conclusion

Node.js for PHP developers (not Node.js vs PHP)

This piece is a list of things you as a PHP developer must know and learn to use Node.js effectively. On the contrary, this post is not a Node.js vs PHP write up where PHP is bashed. I have used both languages. I started to write more Node.js in 2016. When I started I faced some difficulties as I was used to PHP at work for more than 7 years prior to that. There was a book released towards 2012 end covering  Node.js for PHP developers.

This blog post is not going to talk about what PHP or Node.js is, you can read about it in other posts. I will also not talk much about the  Non-Blocking I/O or the  event loop. Still, some of it will be brushed through when discussing the practical aspects of writing good Node.js code.

#php #node

Node.js for PHP Developers: 5 Must-know Pragmatic Aspects with Code Examples
1.25 GEEK