3 ms·
Single Page App Back Ends: Where Laravel Beats Node.js
- rmason 9y agoThis isn't an honest argument because he doesn't mention imho one of the greatest advantages of node.js over PHP and that is serverless.
- smt88 9y ago"Serverless" isn't specific to any language, and there are options for running PHP in a serverless structure. Node's bigger advantage over PHP is allowing a single product to use a single language, even if the code bases are divided between the front-end and back-end.
- Can_Not 9y agoIf you asked me, PHP has had "serverless" for 20 years (just plop your "serverless" script on any cpanel host, maybe even more than one and put a load balancer in front of them). For serverless NodeJS, zeit now might be worth considering as an alternative to AWS's lambda. I would say Laravel doesn't beat NodeJS for SPA at all, because with Nuxt+Vuejs or Next+React, you can write your templates once and render with both the server on first arrival and with the client on subsequent arrivals. Then that setup can defer business logic to any one or more JSON backends (Laravel, nodejs, golang, etc.).
- smt88 9y ago> just plop your "serverless" script on any cpanel host That isn't serverless because the server is still running even when the PHP code isn't responding to a request.