AngularJS and MongoDB both speak JSON, as do Node.js and Express.js. The data flows neatly among all the layers without rewriting or reformatting. MySQL's native format for answering queries is, well, all its own. Yes, PHP already has the code to import MySQL data and make it easy to process in PHP, but that doesn't help the client layer. This may be a bit minor to seasoned LAMP veterans because there are so many well-tested libraries that convert the data easily, but it all seems a bit inefficient and confusing. MEAN uses the same JSON format for data everywhere, which makes it simpler and saves time reformatting as it passes through each layer. Plus, JSON's ubiquity through the MEAN stack makes working with external APIs that much easier: GET, manipulate, present, POST, and store all with one format.
Node.js is superfast
Apache was great, but these days, Node.js is often flat-out faster. A number of benchmarks show that Node.js offers better performance, while doing much more. Perhaps it's the age of the code. Perhaps the Node.js event-driven architecture is quicker. It doesn't matter. These days, especially among impatient mobile device users, shaving even milliseconds off your app's performance is important and Node.js can do that, while offering a Turing-complete mechanism for reprogramming it.
PHP lovers like to cling to the great libraries of code that are built for dominant platforms like WordPress or Drupal. They have good reasons to be proud, but their advantages are evaporating as Node.js catches up.
The Node.js package manager, Npm, makes it even easier to share code, and the public repositories targeting Node.js are growing quickly. While the PHP crowd may lead at this moment in time, the future may favor Node.js. Plus, incumbents often prove to be brittle in the face of shifting trends. Each attempt to modernize an entrenched platform like Drupal with a new version means that many more developers may be letting their eyes wander toward the newer, more nimble platforms built around Node.js.
AngularJS is fresh
It's not exactly fair to compare the "A" in "MEAN" with anything in the LAMP stack because LAMP doesn't include an analog. If you want to do anything on the client side, you're on your own. Sure, there are plenty of good PHP-based frameworks that work with MySQL, but each is a bit different and moving in its own direction. WordPress, Joomla, and Drupal, for example, offer differing strategies, and it's hard to switch between them, let alone port code from one to the other. Anointing one client framework adds consistency and stability.
Sign up for MIS Asia eNewsletters.