PHP vs. Node.js

TL;DR: PHP is not going to disappear immediately, but its positions are undermined even further by the nascent Node.js.

When the Internet exploded in the 2000s, PHP was a thing all the cool kids did. It was extremely revolutionary, because:

  • It was an interpreted language unlike C++ or Java which require the source code compilation
  • It had the ability to be used directly with HTML by mixing within its template files with a <%php ... %> markup tags
  • It had cheap shared hosting providers on Apache servers with a Linux, Apache, MySQL and PHP (LAMP) stack
  • It had a functional nature which is easier to learn than the object-oriented programming

Over the years, PHP and its apps became a monstrous technology vulnerable to security threats (e.g., SQL injections), lack of a centralized packaging registry (was Composer inspired by Node Package Manager?), inconsistent API and subpar performance. There are many better alternatives to PHP, e.g., Ruby on Rails and Django, however nothing is as approachable as Node.js.

For those of you who aren’t familiar with Node.js, or who have heard of it but can’t quite grasp the concept, here is my analogy:

Node.js is functionally similar to the PHP + Apache or ASP + IIS stacks.

Nowadays, Node.js is gaining momentum. The platform uses JavaScript. It’s functional, and its non-blocking I/O mechanism allows for a better performance. Node.js comes with a robust Node Package Manager solution and the specification, i.e., ECMAScript.

Because Node.js is a lower-level technology, it is not comparable to complex frameworks like Struts, Rails or Django directly.

Therefore, many people, whether software engineers or entrepreneurs, are often faced with the decision of “What tech stack to use” In this article PHP vs. Node.js, we’ll compare apples-to-apples approaching the question from different angles, such as:

  • Syntax
  • Context switch
  • Modules
  • Ecosystem
  • Frameworks
  • Real-time apps
  • Database apps
  • Third-party services apps
  • Web servers
  • Hosting
  • Performance

Syntax

Both platforms have access to the command line interface via $ php -i and $ node.

This snippet prints ‘Hello World’ in PHP:

echo 'Hello World'; 

This will output the same phrase in Node.js:

console.log('Hello World');

Note: In JavaScript semi-colons are optional except when inside of the for loops and before immediately-invoked function expressions (IIFE).

Sleep function script example in PHP:

echo "a"."\n";
sleep(2);
echo "b"."\n";
echo "c"."\n";

The above code will output:

a

And then after a 2 second delay:

b
c

If we try to re-write the code in Node.js:

console.log('a')
setTimeout(function() {
  console.log('b')
 },2000)
console.log('c')

This snippet will print:

a
c

And with a 2 second delay, it will print:

b

Note: In JavaScript, console.log() automatically adds the end of line symbol.

The for loop in PHP might look like this:

for ($i = 1; $i <= 10; $i++) { 
  echo $i;
} 

They’re strikingly similar in Node.js:

for (var i = 0; i <= 10; i++) { 
  console.log(i);
} 

To create an array in PHP:

$users = array( 
  array('name' => 'John', 'id' => 3940), 
  array('name' => 'Peter', 'id' => 8904) 
); 

To create an array in Node.js:

var users = [ 
  { name: 'John', id: 3940 }, 
  { name: 'Peter', id: 8904 } 
] 

To iterate through an array in PHP:

for($i = 0; $i < count($users); ++$i) { 
  $users[$i]['id'] = mt_rand(000000, 999999); 
} 

To iterate through an array in Node.js:

for (var i; i < arr.length; i++) {
    users[i] = Math.floor(Math.random()*1000000);
} 

Or in a functional manner:

users.forEach(function(user, i){ 
  users[i] = Math.floor(Math.random()*1000000); 
}) 

To declare a function in PHP:

function hello($name) {
  echo "Hi ".$name;
}
hello("Peter"); //outputs Hi Peter

To declare a function in Node.js:

function hello(name) {
  console.log('Hi' + name);
}
hello('Peter'); //outputs Hi Peter

To declare a new object in PHP:

class foo {
    function do_foo()  {
        echo "Doing foo."; 
    }
}

$bar = new foo;
$bar->do_foo();

To declare a new object in Node.js:

var foo = function () {
  return { 
    do_foo: function () {console.log('Doing foo');}
  };
};

var bar = foo();
bar.do_foo();

Note: there are no classes in Node.js/JavaScript, because objects inherit directly from other objects (prototypal inheritance). There are many instantiating patterns such as pseudo-classical, functional(above) and classical.

A database snippet with the PDO database connection library in PHP:

$pdo = new PDO('sqlite:users.db');
$stmt = $pdo->prepare('SELECT name FROM users WHERE id = :id');
$stmt->bindParam(':id', $_GET['id'], PDO::PARAM_INT); //<-- Automatically sanitized by PDO
$stmt->execute();

A Node.js database script with the Mongoskin MongoDB library:

//assuming we use Connect/Express middleware for req.query
var db = require('mongoskin').db('localhost:27017/db'); 
db.collection('users').find({_id: req.query.id}).toArray(function(err, results) {
    if (err) throw err;
    console.log(results);
});

Context Switch

The Switch between different environments and languages is attributed to the drop of efficiency when writing software code. Many researches and personal anecdotal observations show that interruption negatively impacts programmers’ performance. With less languages to learn and remember the flow is smoother and the code is better! For a deeper articles on this subject you might want to take a look at Human Task Switches Considered Harmful and The Multi-Tasking Myth.

PHP

With the LAMP stack, i.e, Linux, Apache, MySQL and PHP, developers must master at least two more languages which are PHP and SQL in addition to the mandatory and omnipresent HTML, CSS and JavaScript.

Node.js

Node.js is brilliant at having less context switches, because together with MongoDB, this stack can operate only in one language: JavaScript!

An example of MongoDB shell commands (called by $ mongo):

> db.users.find({});
> db.users.insert({name: 'Azat', email: 'azat@rpjs.co'})
> db.users.update({name:'Azat'},{$set:{email:'hi@rpjs.co'}})

Modules

PHP

There is PEAR, a veteran system which installs packages on a server globally, and a better alternative Composer.

In other cases, developers had to seek modules — or components as they call them — on various websites, and to administer them manually by placing *.php files into sub-folders of their projects. Unfortunately, all this is not very kosher.

Node.js

Node.js comes with a superior and dependable package management system called NPM and its registry npmjs.org which is easy to use and publish. Everything is administered via the package.json file and versioned locally, unless we’re installing a CLI tool with the -g option.

Both PHP and Node.js are functional languages with a relatively later addition of OOP to PHP.

Ecosystem

PHP

This is probably one of the most important areas where PHP still beats Node.js. There are amazing open-source applications, e.g., WordPress, tons of free scripts, quality tools and books.

Node.js

Node.js is growing faster than any other platform/language. This is mostly due to the philosophy of keeping modules minimal and performing only a small set of tasks. Other factors might include such things as:

  • The gigantic popularity of front-end JavaScript among web developers
  • Existence of the specs, and abundance of JavaScript resources and gurus (such as Doug Crockford) amassed during the language’s many years of existence
  • Collaborative GitHub open-source community based on an awesome distributed version control system that didn’t exist before
  • Ease of NPM use, e.g., to publish an NPM module run $ npm publish

As a result, some people predict that Node.js will surpass other languages in the absolute number of contributions.

Frameworks

It’s important to have rich tools and proven libraries at our disposal.

PHP

CakePHP and Zend come to mind, and for more choices there is an extensive list.

Node.js

Playing field is relatively leveled with Express.js being the most popular choice, and the full-stack MVC frameworks Meteor and Derby showing the way to the future.

Real-time apps

PHP

For PHP, there is still Node.js dependent Elephant.io and some other approaches. The problem with native PHP and websockets is that Apache and ISS — where PHP is usually run as a module — weren’t really built with persistent connection in mind. Therefore, developers have to use the standalone processes like: Apache WebSocket or Ratchet.

Node.js

Real-time apps building is just a breeze with Node.js stack of the Socket.IO library, Express.js framework and Handlebars reactive template engine. In the Meteor and Derby projects, real-time apps building is taken one step further by combining front and back-end code bases with the persistence layer which reduces the complexity and speeds up the development dramatically.

Database apps

PHP

PHP has a long and fruitful history with traditional/relational databases like MySQL, hence the name of the stack LAMP — Linux, Apache, MySQL and PHP.

Node.js

Node.js is natural with NoSQL databases like MongoDB.

The databases’ performances are somewhat comparable to each other depending on the use cases as per MySql vs MongoDB performance benchmark(MySQL), Simple Test : MongoDB vs MySQL(MongoDB) and MongoDb vs MySql – Fight!!!(MongoDB) articles. However, MongoDB is superior for distributed databases and is highly scalable. The added bonus is that without a fixed schema, NoSQL databases are perfect for cloud computing, prototyping and agile projects.

Third-party services apps

PHP

As is the case with many traditional languages, PHP’s flow is blocked ’til the remote server has responded, hence the need for multi-threading.

Note: Some languages provide this feature when special libraries/frameworks such as EventMachine for Ruby or Twisted for Python are used. However, they’re very complex and weren’t built from the ground up with the platform.

Node.js

On the contrary, due to a non-blocking I/O, Node.js can handle multiple requests and make multiple requests as a client to a third-party services (e.g., Twitter, Amazon) with just one thread of execution.

Web Servers

PHP

Since PHP 5.4 and higher, there is a build-in development server that we can started with:

$ php -S localhost:8000

Assuming we have index.php in that folder:

<?php
  echo 'Hello World';
?>

For versions prior to 5.4, there are ‘all-in-one’ tools like MAMP and XAMPP.

As for the production environment, PHP can’t be run on its own. One of the most popular technologies used with PHP are Apache and nginx where PHP is just a module of Apache web server. My personal experience of Apache is that it has a steep learning curve and while being very configurable, by default those configurations are prone to security leaks.

Node.js

Node.js was created from the ground up for the network applications and there is a set of core modules to write web servers.

To start a Node.js server:

$ node .

Assuming our index.js file in this folder has:

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');

In production, Node.js can be run on SmartOS or Linux (like Ubuntu) as a service.

Note: Multi-threading is absolutely possible in Node.js with clusters and/or external modules.

Hosting

PHP

PHP owes its popularity mainly to the ease and cheapness of offered shared hosting solutions. True, it’s hard to find one without the LAMP stack on it. This commoditization sometimes leads to security holes and less than acceptable downtime due to hosting providers overselling and other consumers using malicious code.

Platform as a Service is a better alternative and somewhere in between full fledged dedicated server and shared hosting. Most of PaaS providers support PHP right of the bat.

Node.js

Node.js works nicely on PaaSs, with Heroku and Nodjitsu leading the list. Also, the cloud infrastructure company Joyent (the maintainer of Node.js), developed powerful operation system SmartOS that allows for performance bursts, painless deployment and DTrace debugging.

Performance

It’s needless to say that performance is important. This resource shows different benchmark tests: Which programs are fastest?.

PHP

PHP is relatively fast but due to its bottleneck in the file system, database and third-party requests, it fails miserably in comparison with Node.js and its super fast Goolge Chrome V8 engine.

For example, when Facebook reached its scalability limits with PHP, they wrote an extremely fast C++ library and virtual machine which they called HipHop VM, but kept the PHP API.

Node.js

Node.js is extremely fast due to its non-blocking I/O mechanism and Google Chrome V8 engine technology. I even heard that Joyent started re-writing some of their C++ modules in Node.js.

Conclusion

PHP was an outstanding technology in its days. Its success and popularity came from:

  • Its ease of learning and use
  • cheap and straightforward hosting mostly shared LAMP
  • Abundance of open-source scripts, apps and libraries

At the same time, these same things now led to its dusk. The contributions to the core from beginner programmers metamorphosed API inconsistently while the lack of OOP/classes and module management systems inhibited open-source community growth. Absence of a leading framework (Ruby on Rails comes to mind as an example of a single dominance) or a paradigm that also helped to produce a lot of bad code that relied heavily on mixing PHP and HTML code without any MVC-ishness. On the other hand, there are a lot of good products and infrastructure for PHP that are here to stay.

Node.js is relatively young with only three years since its first commit, but it’s already the fastest growing platform by the pace of contributions (the absolute number will surpass other languages in a few years). The fact that JavaScript language is the most popular language in the world and has the biggest run-time internment of course attributed to that. Many tools are ported to Node.js with small or no modification from the browser environment. Also, great books on JavaScript fundamentals (for example, JavaScript: The Good Parts and Eloquent JavaScript) experienced surge in the popularity again.

Node.js is very efficient and great for building real time, NoSQL oriented and scalable systems.

Disclaimer

I worked with many technologies including Ruby on Rails, Python, Java/J2EE, VB, ASP, Perl and of course PHP. One of my most complex PHP projects was openList.co which involved use of the MVC pattern with template engines, classes, database abstraction layer and .htaccess re-routing. However, my focus during the past couple of years has been dedicated solely to Node.js and front-end JavaScript frameworks like Backbone.js. So my opinion might be biased, please comment on your experience with real projects in both PHP and Node.js.

If you want to learn more about Node.js take a look at my artisanal book Rapid Prototyping with JS: Agile JavaScript Development, premium online training Node Program (Udemy link) and the astonishing coding intensive full-time course at HackReactor.

Author: Azat

Techies, entrepreneur, 20+ years in tech/IT/software/web development expert: NodeJS, JavaScript, MongoDB, Ruby on Rails, PHP, SQL, HTML, CSS. 500 Startups (batch Fall 2011) alumnus. http://azat.co http://github.com/azat-co

88 thoughts on “PHP vs. Node.js”

  1. Reading this article in 2018, and I have to say that Node did not live up to its promises. Javascript, or ES5 ended up being an ugly mess of a language, so much that people flocked to Coffeescript or ES6/Typescript nowadays. In a way, Node went through the same cycle that PHP did when they switched from procedural to OOP, only with the transpiler change.

    But nowadays the important part is that both languages are dated, and you are far better served by Elixir, Go or Clojure. All of them addresses Node scalability issues, resource consumption and in general much better performance. You will still use Javascript in the frontend, but luckily through a transpiler stage, so you never have to deal with the horrible ES5 “modules”.

  2. Comparing the number of keystrokes between PHP and Node.js for the same functionality should tell you something.

  3. PHP and NodeJS have a slight overlap with their development public and the requirements that they satisfy. PHP is very easy to pick up and learn and you can run with it pretty far because it can handle “quite” complexity. Many beginners start with PHP because it’s easy to learn.

  4. Php is a really powerful language. I personally haven’t tried NodeJs but almost every article and everyone I’ve had to speak to recommends NodeJs over PHP. They have good reasons too, speed and all. Like what Subhajit Choudhury said above, programming languages are tools to implement one’s logic. How you write shows your understanding, not the programming language strength or weakness

  5. i am new to web server back end developments.. Which would be better Node.js based or Python based servers?
    Tasks planned are
    1. chat
    2. REST API – for mobile app
    3. stream video

    thanks
    vivek

  6. Awesome article. The comparison has really help me out on decidingthe path to take as a newbie in JavaScript development

  7. Maybe the author should bid for a fixed price project with a tight deadline and try to develop it with node.JS and PHP, then see which he’ll finish first. I bet he’ll go broke with Node.JS. There are just so many components and libraries and frameworks for PHP that it’s not comparable. I’ll take a mature language and framework over a highly featured and fast Node.JS anyday. Google aren’t using Node for their websites, they use php. Node is an extension of a client-side javascript engine that wasn’t designed for server oriented tasks. Trying to fit a square peg into a round hole. The verboseness of node’s function declarations above just make be cringe, so messy, I’d rather not look at Javascript when doing my server coding!

  8. I have read the article and found quite an interesting thing, though placing an affiliate link to a paid ebook somewhere in between of the content made me a little bit hesitant about objectiveness of this article. Anyway, quite an interesting opinion.

    Couple of days ago as a junior+ PHP programmeur with 1,5 years of real recent experience I have done a research on the Topic “comparing PHP frameworks” as I wanted to understand what was for me better to invest learning time in. And I finally came to conclusion that Symfony 2 was still better than growing in popularity Laravel (based on my own purposes and goals for my development).

    Since some time I also started to research topics on MEAN (Mongo, Express, Angular, Node) stack because I am not very fluent in JavaScript as in PHP. As to me, those simple (for end-users) things and CMS like WordPress and Drupal will stay leaders for the next at least 5-7 years (its my opinion, of course). Because (correct me, if I am wrong) – I haven’t found any simple (for end-user) CMS based on MEAN stack (or completely on just JavaScript language)… Do you know any? Just googled and found Ulbora… Though concept of MEAN with one languages – this is a definitely a thing (one language as a king of a stack) – seems to be quite overwhelming.

  9. I read you article and as an developer with experience with Node.js, PHP and Ruby, I found that in my opinion there some parts of you analysis that there are partial or totally wrong.

    First of all in my opinion Node.js and PHP were created with different purposes and you are comparing apples with oranges and not apples with apples.

    1) I agree with you that PHP performance is not their high strength and that there are some inconsistent API across new versions, however you didn’t commented about that the same API inconsistent can be found also in JavaScript, and if you don’t believe me, you can just a take a look to the a bug that I found in the V8 engine a few weeks ago related to an API inconsistent issue. We could also talk about JavaScript language inconsistent between different engines, but talk about that is not fair because Node.js uses only one JavaScript engine (V8).

    2) In PHP there is not lack of centralized packager manager, if you take a tour in Github you can probably observe that almost PHP projects are using composer and you can search all the packages in Packagist.org. Composer also automatically install the external libraries and components automatically inside of an structure directory, so for now we can say that composer is “Kosher”. In fact I can say that composer works so well as npm.

    3) You explained that node.js is a lower level technology for this reason is not comparable to complex frameworks. I think that node.js is a high level technology because is executed by a virtual machine (V8) in the same way that PHP is a high level technology because is a runtime engine. I declare that If we understand the classic concept that low level means “close from the machine language”. Coming back to the frameworks you cannot compare frameworks like Express or Meteor with Ruby “on rails” framework, because they were designed for different purposes.

    4) You are comparing the usage of SQL with PHP with the usage of NoSQL with Node.js. There is not point to comparing the usage of this two different database technologies. You can use MongoDB in PHP and MySQL with Node.js, and those different technologies have their own weakness and strengths.

    5) Regarding to the scalability limit of PHP and I have to say to PHP can be executed in HipHop Virtual Machine. It will be not so fast like V8 engine, but I least can be still scaled one step more.

    I found your article totally incomplete, for example you commented that “Both PHP and Node.js are functional languages with a relatively later addition of OOP to PHP.”, however you didn’t mention that JavaScript have big lack of OOP features like native default arguments, native encapsulation, mutators, etc.

    The biasis of your article is like you are saying that PHP sucks and Node.js is the best, when those technologies are used for total different purposes. I developed an amazing and faster webRTC solutions with Node.js and an astounding video portal with PHP that receive 1,5 millions visits every day, however I don’t think that I can achieve to develop those projects exchanging those technologies.

    Reading your article I can also see that like you didn’t worked with PHP in the last 5 or 6 years.

    For clarification I don’t want say that Node.js is worst than PHP, both technologies are excellent technologies, but they were designed for different purposes hereby compare both technologies doesn’t have any sense.

  10. HI All,

    Can Anybody tell me which language should need to learn as beginner . I don’t have any technical background. But I want to learn new things. I have knowledge of HTML, CSS and some of PHP (Learnt from W3SCHOOL) .
    I searched comparison between PHP and Node.js then I found this article. I learnt PHP myself but don’t know how to use. Please advise.

    Thanks
    Pawan

  11. Hah – for such a stickler for details I had it wrong the first time. The js rewrite for the php version would rather be:

    console.log(‘a’)
    setTimeout(function() {
    console.log(‘b’)
    console.log(‘c’)
    }, 2000)

  12. console.log(‘a’)
    setTimeout(function() {
    console.log(‘b’)
    },2000)
    console.log(‘c’)

    should actually be

    setTimeout(function() {
    console.log(‘a’)
    }, 2000)
    console.log(‘b’)
    console.log(‘c’)

    if you really wanted to rewrite the php version. Stickler for details, I guess…

  13. “But, its still a lot of years to overcome LAMP.” Not many years, maybe 2-3 years. Because the speed is faster than when PHP was coming to its power 10-20 years ago.

    “PHP will not go away”- I agree just like VISA and banks are still using COBOL and DB2 a few decades later. There would be legacy PHP apps to support. WordPress is used a lot so that will be there… but do you want to be in the early adopters or in the laggards cohort according to the adaption and technology lifecycle curve? I want to be in the early adopters. If you want to be in the laggards, that’s okay with me too. I need devs to support this blog (which is WP).

  14. I think you should also be careful if being biased that Node.js is better. In my experience creating Node.js, I totally agree. It is fast, super instant.. However, applying the database could be the most crucial point.. Read this one, check what the Mozilla are up to > http://mzl.la/1MjLaz5… And it really depends on the clients what they really want, so the PHP will not go away. It’ll still be there because of MySQL.. is understandable compare to NoSQL.. Of coure, there are other NoSQL are now securing there data more complicated alogirthm… But, its still a lot of years to overcome LAMP. Know your client, and know which one is best to apply. Would it be LAMP or MEAN?.. It really depends..

  15. You clearly did NOT read the whole article, because if you would have read it, then you would’ve read that it says that I’m biased and why that is so. :-)
    Please think before commenting obvious things next time.

  16. “Node.js comes with a superior and dependable package management system called NPM and its registry npmjs.org which is easy to use and publish.” => On what basis can you assert that? If you compare NPM to Pear obviously… but to Composer? I’m really interested to know in which way NPM is superior to Composer!

    I use both Node.js and PHP, and I love both of them, but the way you describe them is heavily biased and very misleading. It’s a pity that your comparison has the only purpose of saying that Node.js is superior to PHP, which is false.

  17. I loved a lot about this article but it’s heavy bias towards what the author believes to be the obvious, inevitable and possibly impending future sort of ruins it.

    I happen to be using PHP since it was called “PHP/FI” and have followed its evolution till true marvels like the Phalcon full native code MVC library (which blows everything else to dust).

    See, it’s not just about “difficulty to switch language” or those 10 milliseconds gained.
    Professionals know PHP, Java, Javascript, Ruby AND traditional languages (I know C / C++ / Delphi and others) and use the best tool for the task. Difficulty just shows who’s capable and experienced vs who can’t deliver.

    Furthermore, somebody who actually makes a living off his coding abilities needs to get stuff done, needs business ready architectures that work, needs freedom. This old, dated PHP comes with stuff to deliver business apps and to make revenue. Be it Laravel, Yii, Phalcon or be it an higher tier framework (WordPress, Joomla, Drupal, but also Magento, OpenCart, PrestaShop…), PHP comes with mountains and mountains of flexible, customizable, “just fill in the blanks” great software. THIS is what matters, not the 10 milliseconds, I and you are not Facebook or Google top tier engineers facing the challenges like supporting whatever millions concurrent connections.
    Plus, enter the “SQL vs NoSQL” endless diatribe. No, NoSQL is not the panacea. Real business applications need flexible and relational searches too, it’s not all just about dumping a clump of json / key->value nested array into a record. Proof: hybrid solutions that implement both SQL and NoSQL are being made. As I said above, the professional wants and needs to be able to pick the right tool for the task. The more the better. SQL and NoSQL too.

    Node.js is an awesome technology and it is certainly going to play an emergent, growing role in what it does best. It has still to do a LOT before it may truly compete and beat the other mature solutions out there.
    In a couple of years we’ll see how far it goes (and it’ll go far), but by reading the article it’d sound like we have to dump PHP / Ruby / whatever today and embrace the new messiah. It’s not so simple. It’s not so fast.

  18. That’s right. However, Heroku and Amazon Web Services have free accounts, and those ultra-cheap PHP hosting providers that you mention (4.99/mo for unlimited) are usually oversell, slow and prone to hacking attacks. I’ve heard that Linode is cheaper than AWS.

  19. Hi,

    I liked the comparison, however, when it comes to finding hosting solutions, for PHP there are almost unlimited options where as for Node js there are a limited few like Amazon or Heroku etc. These are expensive options compared to PHP hosting options. What are your thoughts on that? Are there cheaper options there for Node js hosting?

  20. …I thoroughly enjoyed reading your article mainly due to the intimate knowledge you appear to possess on both php and nodejs.

    Unfortunately I have no experience at all on nodejs, though I intent in the next few weeks to experiment with it. Your articles certainly prompts me to do so.

    Unless it was your intention, your explicit bias towards nodejs at the expense of php may require some calibration to ensure you stick to the point of comparing two different tool sets (which happen to be developed based on different philosophies).

    Trust me, there is no need to denounce php, it has proven its worth and relevance amongst certain software developer communities.

  21. Thanks for this article. Really straight forward and helped me get a better grasp of what node even does.

  22. Well I agree with Subhajit choudhary that it’s the skills that matters instead of the underlying technology when it comes to making your application. All the technologies that exist out there are created by some great minds of our time and are pretty reliable. But what they have gives us are the tools. It depends on us how well we use them. It depends on us how much knowledge we gather to complement their technology and use it aptly.

  23. Going through the article I feel, the emphasis was on NodeJS being superior, or, should I say, PHP is all about downsides.
    What I feel “Programming languages are just a tool to display one’s logic”. Its just a syntactical difference or function call difference.Working in abstraction vision doesnot lend you the security. Even a JAVA based app could be injected, wouldn’t it?
    Its about good programming knowledge and not good abstraction layer.
    Had PHP being so full of downsides, it would already been obsolete by now. But still it continues to gain new versions.
    Even google, facebook used PHP or rather using PHP. They created HHVM. Not just because the pain of transforming the codebase to any so-called other prolific languages. That would have been an easy task to convert the codebase, if not a piece of cake, for all the talented engineers present.
    Its a myth that PHP is less secured. Instead of pointing at its vulnerability, the approach of the coding structure / standard should be seen.
    Nothing is secured in this world, not even one’s life. So no language is secured. Its about generating excellent code and excellent coding approach.
    By all means I am not downsiding NodeJS. It is good in its own way. It is just another name in the land of all Programming languages / frameworks.

    somewhere I heard:

    Person 1
    “I want to make an enterprise application. Which language should I use ?”

    Person 2
    “Any language (as if JAVA / .NET were created by GOD —full-proof) but not PHP. Its not enterprise ready. Security issues / not structured …blah blah !!!!”.

    Person 3
    “Yes PHP can.. how do you feel that it is an enterprise app ?.. May be of its time consumption on page load (beacause JAVA / .NET app takes time to load).
    You should use sleep(5000) between every function or at time use $this->redirect(‘Document Expired’) and even better create a config which can append and extension .do / .jsp.
    Yes now the app is an enterprise ready.

    Unfortunately, the MYTHS have taken over the FACTS and FACETS.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.