I was recently asked by a non-technical colleague to explain the concept of a stack. In this post, I am going to try to explain in non-technical terms what is a web technology stack and the different types of stacks that are out there. I am going to be explaining a technology stack in a web applications only (think web sites).
The easiest way to conceptualize the inner workings of the many technologies and pieces of software it takes to run a web application is to think of each technology as a layer in a stack. Roughly speaking the lower layer is responsible for lower level computing (more on the responsibilities of each layer as we discuss each layer).
In order to understand a technology stack, we must first understand four basic layers related to web applications; the operating system layer, the web server layer, the data persistence layer and the front-end layer.
Operating System Layer
All my non-technical readers should already be familiar with what is an operating system but for the sake of completeness lets define it. According to Wikipedia
Fundamentally, all computers must use an operating system to manage all their resources (such as hardware and software components). Some popular operating systems include Windows, Linux, MacOS, iOS, etc. When someone is referring to the “Operating System” in a web stack, they are usually referring to server side operating systems such as Linux and Windows (Linux and Windows are two very popular server side operating systems). For my technical friends, please don’t shoot! I get your objection even before you raise it but this is for non-technical folks after all.
Web Server Layer
Next comes the web server layer. This layer is responsible for hosting the web site content and providing an interface between the low level networking hardware and software necessary to ‘serve’ a web application to any client that is requesting any resources. This layer is responsible for serving any HTTP requests coming to the server and this layer sits on top of the server side operating system. Popular web servers include Internet Information Services (IIS), Apache and Express.js.
Data Persistence Layer
Next is the data persistence layer. The data persistence layer is responsible for making sure that any changes you or any other user has made to and with the application are stored permanently and not lost. The data persistence layer is also responsible for retrieving the data when you log back in the next time so you can pick up where you left off. The data persistence layer is also responsible for generating reports of data generated by the web application.
The reason I was careful not to call this layer the “database’ layer is that a database is not a necessary requirement for data persistence. It is actually possible to design a data persistence model that reads and writes data directly to a hard disk in an unstructured format without any need for a database which would do the job of a data persistence layer perfectly well. Now, the management of a such a system would be a nightmare which is why almost all web application use databases for persisting their data.
Database are specialized pieces of software that are especially written to provide ease of management of large volumes of data. Some databases include MySQL, SQL Server, MongoDB, Neo4J among others.
Stacking Them Up
So what stacks are out there? There are four major stack that are fairly popular today two of which are proprietary and two of which are open source. The Microsoft and Java stacks are proprietary stacks while the LMAP and MEAN/MERN stacks are open source. You can also pick and choose technologies and create a hybrid stack and get the best of both worlds depending on your resources and technical know how.
There you have it folks. Clear as mud? Do you use a hybrid stack or a single stack in your environment? Which stack do you prefer? My favorite so far has to be MEAN stack. Let me know below.