Often when we are developing web applications we divide our app in different layers. In this article we’ll talk about what the MEAN/MEARN stack is in the context of full-stack development.
What is Full-Stack Web Development
In the most basic sense, when we talk about web development we could divide our app into three layers.
- A presentation layer. Concerned with how the information is presented to the user. So we build our user interface, usually with HTML, CSS and JavaScript.
- The business logic layer. More concerned with data validation and the dynamic generation of such data depending on user needs. Here usually technologies such as Node, Ruby, Python, Java or PHP stand out.
- The data-access layer. This layer is our database and how we store and access our data. The business logic will interact with this layer which is conformed by databases just as PostgreSQL or MongoDB.
So when we talk about a full stack developer we mean a software engineer that is knowledgeable about these three layers.
Today these three layers might be further abstracted as frontend vs. backend layers. So here with business/data-access as backend and the frontend mostly with the presentation logic.
An Unifying Single Language
It is a reality that for you to become knowledgeable and an expert on PHP/Python along with JavaScript/HTML/CSS, can take a long time. So if we have different languages for the backend vs the frontend it might be that you will be focusing on one layer or the other.
With the introduction of Node in 2009, which allowed the execution of JavaScript outside of the web browser this changed. Developers started seeing the potential of using an unifying single language across all layers. Then with the advent of MongoDB and the Angular framework doing full stack development with JavaScript became possible.
MEAN Explained
We already gave you a hint of what MEAN stands for and you probably already have a sense that it uses JavaScript across all layers. With that in mind, the technologies involved in the MEAN stack goes as follows.
- MongoDB: This is our database. It uses JSON-like documents and schemas. You can use JavaScript to interact easily with this structure. We often use MongoDB in conjunction with Mongoose which is an NPM package that allows for straightforward data modeling. Mongoose to MongoDB more or less represents what Express is to Node.
- Express Framework: A modular server side framework built on top of Node.js. It makes setting up and deploying a server a breeze. Helps alleviate the callback issues often related to Vanilla Node.js applications.
- Angular Framework: A presentation framework used to build interfaces. It uses TypeScript which is an extension of JavaScript. It allows for reusable and modular code with better application management.
- Node.js: A JavaScript runtime, stable and well suited for server side applications.
The main objective of this stack is that you can get started fast with your web applications and deploy in no time. If you are familiar with Rails and Rails API applications, by using the convention above you might see how comparable and straightforward it is, and now with a single language!
The MERN Trend
Nowadays you might see developers in LinkedIn and other platforms referring themselves as MERN developers. The main difference of MERN is that the R here can represent any framework (not limited to Angular itself) for the presentation layer.
This is because today you not only have the option of using Angular, there’s also Vue and React that you can use to build interfaces. So now more than ever you have more options in building your interface instead of just sticking to Angular.
That is why some say MEAN has been replaced by the MERN designation to allow for this freedom on the presentation/frontend layer. This is not to say that Angular is faulty, but that you have more options and can decide on what to use depending on your needs.
Conclusion
By using a single language across all development layers it means that becoming a full stack developer can be achieved faster.
Also by having a single language, communication across teams becomes more straightforward. It is true that today an engineering team might be split between frontend and backend developers. But there’s less of a learning curve for a frontend developer to be trained and help with backend efforts (and the opposite) as needed.
About us: Career Karma is a platform designed to help job seekers find, research, and connect with job training programs to advance their careers. Learn about the CK publication.