Technology stacks, sometimes called web stacks, are collections of layered technologies that each fulfill a necessary role in the web application development process. Most tech stacks feature a tool for a back-end web server, front-end UI, and a database.
Your choice of tech stack at the start of your projects is crucial because it defines what tools your developers will be able to use and what features/attributes your application will benefit from. The current most popular tech stacks are the MEAN and LAMP stacks.
Today, we’ll explore the advantages and disadvantages of the MEAN stack, the LAMP stack, and other popular options to ensure you choose the right stack for your next project.
Here’s what we’ll cover today:
Explore all the trade-offs and tools you’ll need to consider for your next web app development project.
The layers of MEAN are:
MongoDB: A NoSQL database that uses binary JSON documents with schema.
Express.js: A modular web application framework for Node.js
MEAN is best for cloud-native, modern web apps developed by smaller teams or start-up companies. MongoDB allows you to easily create cloud-native apps due to its scalability, testing, and deployment functionalities. Further, AngularJS is ideal for creating single-page applications (SPAs) from quick-loading optimizations. You can even develop cross-platform mobile apps using Express.js
Several top companies like Netflix, Paypal, The Weather Channel, and Forbes have adopted MEAN components for their applications. MEAN’s popularity is only projected to grow with more companies transitioning to full-stack development teams and cloud-native web applications.
All tools are open-source
MongoDB allows you to develop, test, and deploy cloud applications with ease
Includes a web application presentation layer for demonstrations and live updates
Great performance for SPAs
Usable on any operating system (does not mandate a specific operating system)
Risk losing data during heavy workflows, not ideal for larger applications.
Maintenance can be a hassle, as each technology receives frequent updates and changes
LAMP is the world’s most popular tech stack, designed to build applications without reliance on external software or data. LAMP is the most mature tech stack and has been in use since its creation in 1998 by Michael Kunze. It gained widespread popularity as the first open-source tech stack and remains popular even today on enterprise or longstanding applications.
The main advantage of LAMP is its maturity and widespread popularity. As the longtime leader in web tech stacks, LAMP technologies are must-have compatibility to any new tool. LAMP uses PHP and the MySQL database, which are particularly well known and are supported by most host providers.
The stack has also become particularly customizable thanks to a wealth of time and users that have adapted its pieces to specialized tasks. In short, the current web applications toolkit is made to suit LAMP.
The layers of LAMP are:
Linux: An open-source, Unix-like operating system consisting of a package management system around a Linux kernel.
Apache Web Server: a highly popular and fully-featured web server, used by 54% of all sites on the web.
MySQL: a multithreaded SQL relational database management system built for at-scale use. More recently, some companies have chosen to use PostgreSQL or even NoSQL non-relational databases like MongoDB.
PHP: a server-side scripting language designed for web development. This can be replaced with Perl or Python-based on other tool compatibility or developer needs.
LAMP is mainly used for large-scale, enterprise applications that need to maximize uptime. LAMPs non-blocking structure allows them to remain responsive even at higher workloads.
It’s a well-supported stack with many already developed setups, modules, libraries, and add-ons that let your company customize each technology to suit their needs. For example, you can further increase its availability by load balancing between multiple web or database servers. These high availability setups include layers of redundancy to make sure there are always enough resources to serve users.
Finally, all operations are server-side and do not rely on client-side resources. This means you can distribute LAMP applications to a wide range of users and trust that each has a similar experience.
LAMP is used by many big companies across the world, including Facebook, WordPress, Wikipedia, Slack, and Tumblr. While it currently has the market majority, many experts think LAMP will phase out of use as MEAN and other stacks continue to develop.
LAMP has essentially been grandfathered into the top spot among tech stacks, but newer apps often opt for MEAN for better support of modern features like cloud hosting.
Widespread support for each technology in the stack
Mature stack with a wealth of previous solutions and customizations to draw from
Non-blocking structure makes it easy to scale and faster to develop
LAMP is fully open-source
PHP and MySQL are easy to learn and work with
Limited to only Linux operating system
Difficult to switch between back and front-end tools
Does not integrate well with the cloud
Learn the ins and outs of every major technology stack. Educative’s text-based courses are easy to skim and feature lived examples - making learning quick and efficient.
While MEAN and LAMP are the top technology stacks on the market right now, there are many other stacks available for niche situations and solutions. Some of these are just variations on the two bigger stacks, while others are innovative new players in the market.
Let’s take a quick look at these honorable mentions.
The MERN stack is a variation on MEAN that replaces Angular.js with React.
React uses a virtual DOM to simplify UI changes and is optimized for highly reactive single-page applications. React also uses JSX to enable flexible component manipulation. The biggest downside of React is that it is missing features in its base state as a library rather than a fully-featured framework.
Replacing Angular with React essentially sacrifices features for ease of use and flexibility.
Increased ease of use over MEAN without sacrificing full-stack development capabilities
Optimized for SPAs
There are more React developers than Angular.js developers
Sacrificing some functionality without a full framework
Modules required to fill in some missing functions
You’re looking to build a simple to intermediate single-page application in the quickest time possible or your team is already familiar with React.
Similar to MERN, MEVN replaces Angular.js with Vue.js.
Vue is an underdog framework that offers a minimalist, performance-driven approach. It’s more lightweight than either Angular.js or React and comes with all major features out-of-the-box. Vue can also be augmented with third-party services to fill in any niche behaviors specific to your needs. Vue’s biggest downside is that it’s not widely used and may not have the community or integration support enjoyed by React or Angular.
Vue is essentially a barebones framework that sacrifices fancy features and some control to be as fast and easy to set up as possible.
Faster performance than React and Angular
Ready to go right out of the box
Cost-effective due to simplicity to use
Lacks resources as the least popular of the three frameworks
Fairly new, meaning you’ll have to update often
You’re looking for the best performance you can get and don’t have plans to add any fancy application features.
RoR is designed to make it as easy as possible for your web developers to build a new application due to mandatory best practices and built-in default structures. It also offers improved performance as all tools are seamlessly integrated to make the UI easy to manipulate.
Quick to spin up new applications using default structures
Robust bug detection system
Not very customizable
You want to produce a solid web application as quickly as possible and don’t need it to be too complex.
The rise of cloud computing has led many companies to shift from managing their own app infrastructure to instead building cloud-native serverless applications. These serverless applications allow the cloud provider like AWS or Azure to handle all the services and tools for a price that matches your company’s scale.
Serverless applications are great at scaling to meet demand, and they’ll handle any maintenance. The downside is that you don’t have as much control over the technologies you’re working with since you’ll be stuck with out-of-the-box features.
Cost-effective for small businesses and startups
No need to manage or maintain your own technologies
Less control over what technologies are in the stack
Scaling costs will make this ineffective beyond a certain size
You’re a small startup that cannot afford to hire a full team to manage your application’s tech stack and would rather pay to have someone else do it.
MEAN or LAMP are the best fit for most projects, but how do you choose?
Both have tradeoffs, so it’s important to consider what factors are most important to your particular project.
You’ll want to consider:
What type of app will it be? Cloud-based, hybrid, etc?
What is the expected lifetime of this application?
What technologies are available in my client’s infrastructure? Will it be standardized or varied?
How much traffic will your application need to handle? Does the traffic happen in spikes or steady flow?
How dynamic will your application be? Will it update in real-time?
How much retraining will your team need to do?
How much maintenance do you want to allocate to the application?
As a general rule, MEAN is better for smaller-scale modern applications like progressive web apps, cloud-based applications, or single-page applications. LAMP is better for larger-scale applications that prioritize uptime and availability.
The most important point to consider is a lifetime. LAMP is well established and stable but is projected to be phased out by the modern functionalities granted by MEAN.
Choosing to create a new application on LAMP now means you’ll have a good application now but may have to fully migrate to MEAN in the future.
Choosing MEAN now will mean it’ll be harder to maintain and you’ll have fewer time-tested solutions but you’ll have top modern features to prepare for the future.
|App type:||Modern app types like Cloud, hybrid, PWAs, or SPAs.||Multiple page applications.|
|Lifetime:||Long lifetime, building the application for future MEAN support.||Short lifetime, you’re designing this application to work now and in the near future only.|
|Traffic:||Consistent low to mid traffic, no redundancy needed.||High traffic with large spikes at peak hours.|
|Client or server-side:||Client-side rendering.||Server-side, you don’t want to rely on client infrastructure for a good experience.|
|Maintenance:||High maintenance to support the frequent updates to each tool.||Low maintenance, ecosystem is stable.|
Choosing the right tech stack for your project is a big choice. With the information you learned today, you’ll be able to make the best choice to fit your team and company. Your next step is to learn more about web architectures to get familiar with all the options available for your next project.
To help you learn everything you need to know about web architecture, Educative has created the Path Scalability & System Design for Developers. This course explores all the choices you have to make when designing your web application and lets you understand the trade-offs at each step.
By the end of the course, you’ll have the skills to implement microservices architectures across different tech stacks, create a cloud-native application, and practice explaining trade-offs for your next interview or conference meeting.
Join a community of 500,000 monthly readers. A free, bi-monthly email with a roundup of Educative's top articles and coding tips.