12 ms·
I have similar experience but I'm not so quick to say I'm back to PHP. "Use the best tool for the job" is the way I think about it. PHP is great for marketing
by styfle 9y ago
I have similar experience but I'm not so quick to say I'm back to PHP. "Use the best tool for the job" is the way I think about it.
PHP is great for marketing websites that don't need a lot of javascript.
But Node.js still wins for javascript heavy web apps. This is because you can write a js validator that will run on the client-side and server-side. Sometimes this is called Isomorphic JS (or Universal JS).
For example, this app[0] shows how to render React on the server and the client with shared props.
That being said, my personal website[1] still runs PHP and I'm glad I haven't taken on all the build dependencies of a modern web app just to host a simple blog.
[0]: https://github.com/styfle/react-server-example-tsx https://github.com/styfle/react-server-example-tsx
[1]: https://www.ceriously.com/blog/ https://www.ceriously.com/blog/