Discussion:
When to use PHP or Node.js
(too old to reply)
henrycooper
2021-06-03 09:48:28 UTC
Permalink
Both are back-end languages, but Node.js can give you an edge if you'r
looking for a system that uses JavaScript in both front-end an
back-end. If you're trying to choose between back-end technologies, it'
probably a good idea to go into a little more detail.

When to use PHP?

Centralized server: In case we don't plan to scale our application t
multiple servers, we can use LAMP (Linux, Apache, MySQL and PHP). Thi
may vary depending on project requirements.

Portability: PHP is a flexible language. The low cost of web hosting an
the availability of servers for PHP is beyond the table. PHP can run o
almost any platform that has Apache, IIS installed and has a supporte
database system, which makes PHP applications flexible and easy t
deploy. 'smash karts' (https://smash-karts.com)

When to use Node.js

Sharing a language: Node.js would be the correct choice to use if you
project involves things like MongoDB, ExpressJs, AngularJs, BackBoneJs
ReactJs, SPA (single page applications),.. this makes it easy to have
system entirely using JavaScript.

Realtime: Node.js is very good for applications that require realtime
but I would be concerned about using Node.js for applications related t
finance and money, because Javascript itself is not reliable whe
talking about numbers since everything is either integer or float an
there's no real clear separation between the two, "floating poin
number" is a prime example when it comes to JavaScript calculations.
more secure language is recommended when working on financia
applications that require a lot of computation, or need to install
sufficiently reliable library.

Speed: Node.js is much faster than PHP when it comes to execution speed
if speed is all you need for your application, such as a single-browse
multiplayer game or app For chat applications, Node.js is a bette
choice than PHP


--
henrycooper
goalken highlight
2023-08-11 09:30:01 UTC
Permalink
Both are back-end languages, but Node.js can give you an edge if you're
looking for a system that uses JavaScript in both front-end and
back-end. If you're trying to choose between back-end technologies, it's
probably a good idea to go into a little more detail.
When to use PHP?
Centralized server: In case we don't plan to scale our application to
multiple servers, we can use LAMP (Linux, Apache, MySQL and PHP). This
may vary depending on project requirements.
Portability: PHP is a flexible language. The low cost of web hosting and
the availability of servers for PHP is beyond the table. PHP can run on
almost any platform that has Apache, IIS installed and has a supported
database system, which makes PHP applications flexible and easy to
deploy. 'fnaf free' (https://fnafgame.io)
When to use Node.js
Sharing a language: Node.js would be the correct choice to use if your
project involves things like MongoDB, ExpressJs, AngularJs, BackBoneJs,
ReactJs, SPA (single page applications),.. this makes it easy to have a
system entirely using JavaScript.
Realtime: Node.js is very good for applications that require realtime,
but I would be concerned about using Node.js for applications related to
finance and money, because Javascript itself is not reliable when
talking about numbers since everything is either integer or float and
there's no real clear separation between the two, "floating point
number" is a prime example when it comes to JavaScript calculations. A
more secure language is recommended when working on financial
applications that require a lot of computation, or need to install a
sufficiently reliable library.
Speed: Node.js is much faster than PHP when it comes to execution speed,
if speed is all you need for your application, such as a single-browser
multiplayer game or app For chat applications, Node.js is a better
choice than PHP.
--
henrycooper
Loading...