+ 3

Node js or PHP?

8th May 2018, 2:23 AM
Jesus Daniel Acosta Contreras
Jesus Daniel Acosta Contreras - avatar
3 ответов
+ 8
Node is currently quite popular, but PHP has a high market share. Personally I feel that it is best to learn both. Node.js does not have a great learning curve, just like PHP, so if you have general knowledge of Javascript it should be an easy task. If you want to opt for a technology first, then I would recommend Node.js. Later you could learn anything else you need as a developer.
8th May 2018, 2:31 AM
Mickel
Mickel - avatar
+ 5
Both have there pros and cons. PHP Pros: • Easy to deploy; Just install PHP, do some configuring (you should definitely configure PHP but it's usually not necessary) and drop your PHP files in the webroot. • Used everywhere. •Easy to learn. Cons: • Weak language; Because PHP grew organically it is a very odd language and has many querks. • Because of how easy it is to learn you'll find some really bad code out there. Node.js Pros: • It's JavaScript with some goodies so if you know JavaScript it'll be a breeze to learn. • It's very fast. • Asynchronous meaning it can handle concurrent requests easily. • Can interact with the user directly unlike PHP. • NPM. Cons: • Not many mature frameworks. • Not as widely used as PHP. • Only runs on one CPU so doesn't scale as well.
8th May 2018, 2:30 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 1
Niush sitaula Node.js directly interacts with the user. No page refresh or anything required. With PHP, you have to reload the page or load the script via ajax, which isn't as smooth as Node.js.
8th May 2018, 2:45 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar