Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

MEAN vs. LAMP for the future of programming

Peter Wayner | June 23, 2015
LAMP diehards take note: The flexible simplicity of MongoDB, ExpressJS, AngularJS, and Node.js is no joke

businessman shaking hands with tattooed woman 95363320

The transition from cutting-edge curiosity to practical workhorse is not one that many technologies make. Yesterday's precocious upstarts often fail to live up to their Version 0.1 promise -- not so for the technologies that make up the fiercely acronymized MEAN stack.

It was only a few years ago that MongoDB, Express.js, AngularJS, and Node.js were raising eyebrows on their own. Now they've grown up and ganged up, and together they're doing serious work, poaching no small number of developers from the vast LAMP camp. But how exactly does this newfangled MEAN thing stack up against LAMP? When is it better to choose the well-tested, mature LAMP over this upstart collection of JavaScript-centric technologies?

The answer is when the simplicity and common structure make your life easier. MongoDB offers a more flexible, accommodating layer for storing data. Node.js provides a better nexus for running your server, while Express.js helps standardize how you build your websites. On the client, AngularJS provides a clean way of adding interactive functions and AJAX-driven rich components. Put them all together and they make a clean, coherent mechanism for moving data from user to disk farm and back again.

The real explanation, however, is deeper. Here we offer nine reasons to give MEAN a shot with your next project. Not everyone has the time or budget to toss out and recode the old in the latest, trendiest framework, nor should you throw away the rock-solid reliability of battle-tested tools like Apache, MySQL, or PHP. But for green-field projects that could benefit from flexibility, simplicity, and performance, going MEAN may make your life better than you think.

MongoDB is built for the cloud

If your Web app plans include making good on the pennies-per-CPU promise of the cloud, the MEAN stack offers a compelling database layer in MongoDB. This modern database comes equipped with automatic sharding and full cluster support, right out of the box. Plug in MongoDB and it spreads across your cluster of servers to offer failover support and automatic replication. Given the ease with which apps can be developed, tested, and hosted in the cloud, there's little reason not to consider MongoDB for your next project.

MySQL's structure is confining (and overrated)

Anyone who has developed or maintained a LAMP-based app for any amount of time knows that MySQL's strength as a relational database can feel a bit imprisoning at times. Like all relational databases, MySQL forces you to push your data into tables. This isn't a problem if every single entry fits into exactly the same format, but how often is the world that generous? What if two people share the same address but not the same account? What if you want to have three lines to the address instead of two? Who hasn't tried to fix a relational database by shoehorning too much data into a single column? Or else you end up adding yet another column, and the table grows unbounded.

 

1  2  3  4  Next Page 

Sign up for MIS Asia eNewsletters.