henrycooper
2021-06-03 09:48:28 UTC
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
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