3 ms·
I've ranted about this several times: https://news.ycombinator.com/item?id=34539716 https://news.ycombinator.com/item?id=34539716 Node has its advantages for s
by kypro 3y ago
I've ranted about this several times:
https://news.ycombinator.com/item?id=34539716 https://news.ycombinator.com/item?id=34539716
Node has its advantages for sure, but it's very different from PHP (especially if you're using a framework like Laravel).
You're right that you get much less out of the box and often need to use packages. PHP is kinda weird though... It does a lot out of the box and PHP frameworks also take that approach. For example, Node.js's Express is really just a basic web framework, Laravel on the other hand provides everything from templating, validators, email, auth, etc.
Node really just provides the JS runtime environment and leaves everything else up to user. And that's nice in some ways because there's less "magic" going on and it makes learning Node very simple. But the trend off there is that if you need to send an email there's not some magical method you can call that just works. Instead, you need to install a package or you build something yourself.
I find Node applications more interesting to work on personally. You find different projects often take different approaches and will use slightly different packages depending on the requirements. PHP projects on the other hand always feel very similar to me and I feel less free to have opinions on how things should architected.
Anyway, you're not wrong. Node is just different and we programmers tend to automatically dislike difference because good code is generally code tends to follows recognisable patterns.