“Stacks” are bundles of software that comprise your site’s back end—everything from the operating system and web servers to APIs and programming frameworks. Each component provides a layer for their compatibility, and bundling them makes them easier to download and deploy all at once. The components of a stack can range from general—e.g., the Mac OS X operating system—to very specific, like a particular PHP framework.
There are lots of reasons you may choose one stack over another—and newer isn’t always better, depending on the project. Maybe you’re looking ahead at the future of your site and see a need for vertical scalability, or your development team is especially skilled with a programming language—both of which can guide your choice of the stack.
In this article, we’ll look at what a stack does, why one component may be better for your project than another, and some other important things to consider when you’re choosing (or moving to) a stack.
Parts of a software stack
Applications have four tiers, three of which are on the server side. This graphic explains the inner workings of a stack: the client is where it all starts and ends.
- The client tier—this is the only component in the browser
- The web tier—the web server, or HTTP server
- The business tier—the application server, including the development platform, frameworks, and server-side programming languages
- The database tier—the database server you choose, which can often depend on the business tier
The tiers each include an operating system, server, database, and server-side scripting language. You’re not limited to the components in a stack—they’re interchangeable based on your needs and customizable.
What to consider when choosing a software stack
The bottom line when you’re choosing a stack is thinking ahead. Here are some questions to ask before you pick your stack:
What’s your minimum viable product (MVP), and how much do you see it growing?
Your MVP is the core set of deliverables you need to get your website deployed—highest return on investment vs. lowest risk. Whatever parameters you have for your website or web application MVP is a good place to start when choosing a stack—then, it can grow from there.
Scalability
Scalability is incredibly important if you see your site or application growing, and a solid stack from the start means a solid foundation. Growth can be vertical, with more programs and processes included in your application, or horizontal, requiring it to run on more machines. It all boils down to solid code and a strong foundation. If growth is in your future, pick a stack that can accommodate a lot of growth without collapsing.
What are your development team’s strengths?
Programming languages and frameworks are one part of a stack, but they do tend to impart their “flavor” to the stack as a whole. If your team has been working with PHP for a long time, a PHP-based stack like LAMP (Linux, Apache, MySQL, and PHP) or one of its variants is a good place to start. It’s an automatic time-saver.
What platform is best for your project?
Whether it’s the .NET platform, the Java Platform, or Node.js, every platform has its strengths. There’s no “best” platform—just the best one for your project. This question has a few sub-questions:
How important is speed to your stack choice?
Node.js is a great choice for speed and scalability. Add to that the fact that it’s written in JavaScript, which makes it fast and universal, and it’s clear why LinkedIn moved from the Ruby platform to Node.js. Another thing to consider is developer time vs. runtime. It’s a general rule of thumb that what speed you gain in development you make up for in runtime and vice versa.
For example, .NET and Java both include compilers—programs that convert language code into machine code, so computers can process them—but require a lot more baseline code to be written up front in the project. Node.js allows developers to create more complexity with less code up front, but it doesn’t include a compiler, so you’ll need an experienced developer to ensure the code is clean. Again, the most important thing is how well the code is written so that it can be adaptable in the future.
Is cost a big factor?
Cost is a pretty open-ended aspect and hard to predict, but things like licenses, the cost to hire developers who know more obscure languages, hours spent in development, and future costs of maintenance are all things to consider. For example, .NET code may take longer to write but is easier to debug in the future if problems occur.
What database is best for your project?
How you structure your data is central to choosing your stack. For example, if you opt to go with a NoSQL database, you’ll want to choose other components that are most compatible with that database format.
Keep long-term maintenance and security on your radar. It’s always possible to update parts of a stack with some reconfiguration, but there’s nothing more efficient than a solid foundation. Longer code takes more time to process, while shorter, more concise code can sometimes be cryptic and harder to debug.
Here are a few common stacks and why you may choose one over the other for your back end.
LAMP: Linux/Apache/MySQL/PHP
One of the earliest stacks to get traction is the LAMP stack, made up of all free, open-source software components that work especially well for dynamic websites and applications. It includes the Linux operating system, the Apache web server, PHP application software, and MySQL database. It’s the most traditional stack model, and incredibly solid. Note: PHP is interchangeable with the languages Python and Perl.
LAMP benefits: It’s flexible, customizable, easy to develop, easy to deploy, secure, and comes with a huge support community since it’s open-source. Also, SQL databases are great for organizing massive amounts of highly structured data.
Variations include:
- WAMP (Windows/Apache/MySQL/PHP): A Microsoft Windows OS equivalent, it’s all-inclusive and easy to get started with. The WIMP stack is similar but has the IIS server.
- LAPP (Linux/Apache/PostgreSQL/PHP): a PostgreSQL database variation that’s optimized for enterprise-level projects.
- MAMP (Mac OS X/Apache/MySQL/PHP): A MacOS X operating system variation, it’s available for both Windows and Mac.
- XAMPP (Linux, Mac OS X, Windows/Apache/MySQL/PHP, Perl): A more complete bundle, it includes an FTP server, which is cross-platform, and able to run on Linux, Windows, and Mac operating systems.
MEAN: MongoDB/Express.js/AngularJS/Node.js
MEAN is a more modern stack challenging the LAMP stack. It’s entirely JavaScript-powered, too, so that makes it a time and money-saver for companies that already have JavaScript pros writing client-side code. It includes the MongoDB database, the leading JSON-powered NoSQL database that offers more flexibility than a relational SQL database; the AngularJS front-end framework, Express.js, a web framework for Node.js; and a base platform of the Node.js runtime, instead of an operating system. It offers flexibility and lots of features for building single- and multi-page web applications.
MEAN benefits: It supports the MVC pattern, uses NoSQL’s native JSON for data transfer, offers access to Node.js’s JavaScript module library, and is open-source. Also, it’s mobile-friendly, thanks to AngularJS’s flexibility, and can easily incorporate JS testing frameworks. It’s excellent for businesses looking to be agile and scalable, but the main benefit is language uniformity. By using JavaScript across the front and back ends, developers working on the client side can understand the server-side code. And by switching to a document-based NoSQL database, there’s less time spent writing SQL, more flexibility with how data is structured, and better productivity for the team in the long run.
Variations include:
- MEEN: a stack substituting Ember.js for AngularJS.
Bitnami-Hosted Stacks
Bitnami is a cloud-based library and hosting solution that supports several stacks, allowing you to deploy your application either on your server or in the cloud. Bitnami packages can be downloaded with one click. Here are a few available infrastructures, based on some of the most popular programming languages out there.
Ruby Stack: Ruby/Ruby on Rails/RVM (Ruby Virtual Machine)/MySQL/Apache/PHP
The Ruby Stack comes ready-to-run, with a complete development environment for Ruby on Rails, with its most popular “gems” making building applications fast and easy. Ruby is notably compatible with MySQL on the back end, and development is rapid.
Variations include:
- JRuby—This version is all Java, with Ruby running on the Java Virtual Machine (JVM). It’s all about productivity for developers and heavy data applications.
Django Stack: Python/Django/Apache/MySQL
Get all the speed-to-market and clean design of the high-level Django framework, Python’s object-oriented programming environment. This stack encourages rapid development and simplifies deploying Django software, so you can focus less on setting up the back end, and more on its business logic.
Bitnami DevPack: PHP/Django/Ruby on Rails/Java/MySQL, PostgreSQL/Apache Tomcat
The DevPack stack supports MVC frameworks and lets you get applications up and running quickly. Because so many popular components are included in one pre-configured package, an entire development environment can be yours in minutes.