good and the bad of JS

MEAN and MERN Stacks: Full Stack JavaScript Development Explained

JavaScript is everywhere. If you are able to read this article or browse through your Facebook news feed, it is mostly due to this single technology.

What is JavaScript? One of the most popular programming languages and a dominant web development technology, JavaScript has been around for over 25 years now.

popular programming languages ranking

JavaScript has maintained its #1 position throughout the years, source: GitHub’s State of the Octoverse 2020 survey

Being initially bound to front end engineering, the language has seen even more growth in popularity after an ability to use it on the server side was represented. Ever since there has been a heated discussion going on about the use of full stack JavaScript -- with MEAN and MERN being its most popular software stacks.

As a full stack development company with 10+ years of JavaScript engineering experience, we were able to form our own opinion on the topic, which we would like to share with you. In this article, we will explain what a JavaScript full stack is, discuss the pros and cons of JavaScript full stack development, and mention some alternative options. But first, let’s talk about the concept of being a full stack developer.

Full stack developer role and skills

It is almost impossible to create a full-fledged software product using only one technology. This usually involves so-called tech stacks – combinations of programming languages, frameworks, libraries, databases, templates, and other tools.

As all software products consist of the client side and the server side, there are usually two separate stacks that cover each of the layers. However, in the case of full stack development, web or mobile applications can be built from A to Z, covering both front end and back end sides of the project with one technology stack. Accordingly, a specialist that has broad skills across all aspects of product engineering is usually called a full stack developer.

Full Stack Developer

Full stack developer skills

Being considered unicorns due to their rare expertise and versatility, they are in high demand for startups and large companies alike, from Facebook and eBay to Munchery, Betterment, or Tinder.

What is full stack JavaScript: one language, different technologies

JavaScript is the universal language that can be used across all software layers, so a person who applies it for both front end and back end programming is called a JavaScript full stack developer. Taking into account the undisputed popularity of the programming language, such engineers are some of the most sought-after specialists in web development.

Let’s see what the most common technology components of the famed JavaScript full stack are.

full stack JS components

Full Stack JavaScript components

Front end. The choice of possible frameworks for front end JavaScript is quite broad. Besides Angular that was the most popular front end development tool for many years since the introduction of AngularJS back in 2010, numerous newer frameworks and libraries such as React, VueJS, Knockout.js, or Backbone.js can be used, depending on the project specifics.

Back end. Server-side JavaScript programming with Node.js and Express web framework is the most common technology choice, but other Node.js-based tools such as Meteor, Sails.js, Koa, restify, or Keystone.js might be used as well.

To learn more about Node.js, consider checking our explainer video.

What is Node.JS and its Pros and ConsPlayButton

Node.js advantages and disadvantages explained

Database. As for this part, MongoDB or almost any alternative can be utilized, i.e., MySQL, PostgreSQL, Apache CouchDB, or Apache Cassandra. Check our detailed comparison of most-used database management systems to get a complete picture.

Now, we’ll look closer at some of the most popular tech stacks inside the JavaScript family.

MEAN Stack

When talking about full stack JavaScript the first thing that comes to mind is the MEAN stack. It’s an open-source technology bundle that includes MongoDB, Express, Angular and Node.js. Such big companies as Google, Accenture, Sisense, and PayPal are embracing the MEAN approach. Let’s briefly discuss each of its components.

MongoDB is a NoSQL database program that uses a JSON (JavaScript Object Notation) format to store data. Its perfect compatibility with other JS-based parts of the stack ensures great speed and performance. MongoDB is schema-less, which makes it highly flexible, and is built on a horizontal scale-out architecture that allows it to handle big data. All that made it a preferred choice of millions of developers worldwide.

Express.js is a back end web application framework package that runs on top of Node.js. Simply put, it’s a set of tools that manage the workflow between the client side and the data model, ensuring data transferring. Express is used to create APIs, manage HTTP requests, and render basic routing.

Angular is a popular front end framework to create dynamic user interfaces. Its main distinguishing feature is the ability to interact with the web application without reloading the page, reducing site bandwidth and improving performance. For more information, check out our video on YouTube.

Angular Basics, Pros and Cons ExplainedPlayButton

Angular overview

Node.js is a back end JS runtime environment that allows the JS code to be executed outside the browser. With its creation, the server-side JS programming finally became possible, enabling a full development cycle using JavaScript only, changing the software world forever. It’s fast (running on the powerful V8 engine), lightweight, extremely efficient, and suitable for building data-intensive, real-time apps, so no surprise it tops the list of most preferred frameworks.

MERN Stack

MERN is very similar to MEAN with one exception -- Angular is exchanged with React whose popularity has steadily grown over the last few years. React is a front end, open source library for building dynamic UI.

number of downloads of react, angular, vue, and other frameworks

Popularity of React vs other frameworks, source: npm trends

The pros and cons of MERN stack vs MEAN stack are solely related to the difference between React and Angular. In short, React has an easier learning curve, ensures better performance due to its virtual DOM implementation, and provides bigger flexibility in tool usage. However, the latter might be considered a drawback since Angular is a complete framework and has everything you need to start developing right out of the box, while with React you’ll have to find and choose additional libraries yourself.

MEVN Stack

Another member of the full stack JS family worth mentioning is MEVN -- with VueJS being the alternative framework for front end development. It’s less commonly used than the previous two due to the lower popularity of the VueJS itself.

However, there is an opinion that VueJS learned from the mistakes of Angular and React and took the best from both. As a result, this newer framework is lightweight, flexible, easy to learn and use, and quite self-sufficient, already having a lot of its own libraries.

As of today, VueJS already has 182k stars on GitHub, compared to React’s 167k and Angular’s 72.6k. So, if you consider that a sign of user interest, VueJS has all the chances to grow big soon -- boosting the MEVN stack along with it.

react vs angualr vs vue.js

Full stacks front end layer compared: Angular vs React vs VueJS

The pros of full stack JavaScript development

The fact that companies like Groupon, Airbnb, Netflix, Medium, and PayPal adopted the full stack JavaScript approach to build some of their products speaks for itself. However, small startups seem to enjoy using it as well. This is mostly due to the number of benefits full stack programming offers.

⊕ Common language, better team efficiency with fewer resources

Having all parts of your web application written in JavaScript allows for better understanding of the source code within the team. Therefore, there is no such thing as a gap between front and back end engineering that occurs when two teams are working separately using different technologies.

Moreover, you can now work with only one team instead of two, for back and front end, which should significantly reduce the cost and effort of finding and retaining the right talent. Such a cross-functional team is a great asset when following Agile methodologies.

⊕ Extensive code reuse

With full stack JavaScript, you save time through code reuse and sharing. Following the “don’t repeat yourself” (DRY) principle, you might be able to reduce the effort by reusing the parts of the code (or sharing libraries, templates, and models) on both back and front end that are very close in terms of logic and implementation.

In other words, you don’t need to think about the JavaScript utility equivalents in Python or Ruby, you just use the same utility on the server and in the browser. Reducing the number of lines of code by up to 40 percent is also a valuable capability when refactoring and maintaining the source code.

⊕ High performance and speed

Node.js uses an event-driven, non-blocking IO model that makes it lightweight and fast as compared to other commonly used back end technologies. To prove this, PayPal published a comprehensive report on the results they have seen in the process of migrating from Java to full stack JavaScript. The company was able to make the development almost 2 times faster while reducing the engineering personnel involved. Moreover, they have seen a dramatic improvement in performance, doubling the number of requests completed per second and decreasing the average response time by 35 percent for the same page. This means that the pages are served 200ms faster, which is definitely a noteworthy result.

⊕ Large talent pool

According to the Stack Overflow annual survey, JavaScript is the most popular programming language, used by 67.7 percent of the respondents. SlashData estimates that, as of October 2020, there are around 12.4 million active JavaScript developers in the world. That means, finding a skilled engineer should be relatively easy.

stack overflow ranking

Most popular technologies in 2020, source: Stack Overflow

⊕ Extensive knowledge base

Backed by giants like Facebook and Google, JavaScript has a powerful and fast-growing community. There are around 522,000 repositories on Github and over 2.2 million questions tagged JavaScript on Stack Overflow, indicating the high activity of the developer community and the huge amount of valuable information that can be found out there.

⊕ Free, open source toolset

Most of the full stack JavaScript development tools are free or open source projects. This means you don’t need to bear additional expenses for costly licenses or subscriptions. The tools that are open sourced are updated regularly and evolving fast due to the active community contributions. Instead of relying on a fixed set of technologies, you may use any of more than 1.3 million packages hosted by npm, the largest JavaScript modules registry in the world, recently acquired by Microsoft and integrated with GitHub.

The cons of full stack JavaScript approach

Yet, no technology is perfect. Despite all the benefits the full stack approach offers, there are always some drawbacks to be aware of.

Θ Insufficiency with computation-heavy back end

When it comes to heavy computation and data processing on the server side, Node.js is not the best option. There are lots of far better technologies to handle projects like machine learning, algorithms, or heavy mathematical calculations.

Having a single CPU core and only one thread that processes one request at a time, it might be easily blocked by a single computationally intensive task. While the thread is busy processing the numbers, your application won’t be able to work with other requests, which might result in serious delays.

Yet, there are numerous ways to overcome this limitation. By simply creating child processes or breaking complex tasks into smaller independent microservices that use more suitable technologies and communicate with your back end, you can handle complex computational tasks in Node.js.

microservices architecture

Monolithic architecture vs Microservices

Θ Jack of all trades, master of none?

It is a common belief that a developer can truly master only one area of knowledge. With every other skill gained the quality of his/her expertise will decline. While the syntax and grammar of JavaScript are mostly the same on the client and server side, there are still many details to consider.

Aside from being proficient in front end development, full stack JavaScript developers need to have an expertise in back end programming, such as HTTP protocol, asynchronous I/O, data storage fundamentals, cookies, etc. That is why some say that there are really no full stack engineers: Every one of them is either front or back end oriented. However, we have all the reasons to disagree, based on our own experience and strong JavaScript skills.

Θ Drawbacks of every separate tool in the stack combined

As any technology stack, MEAN/MERN/MEVN combines the weak sides of all 4 of its elements. Most of them are minor technical limitations, which appear under certain circumstances. However, in order to use the stack, it’s important to realize possible bottlenecks of every tool and adjust your development strategy accordingly.

Alternative stacks: LAMP, Rails, Django, and others

Full stack JavaScript is not the only one out there. There’s quite a variety of software stacks, and choosing the best fit totally depends on your project requirements. So, in conclusion, we’d like to briefly mention some other popular technology stacks that are used to build software products.

LAMP stack: Linux, Apache, MySQL, PHP

LAMP has been a popular choice for web development since 2000 due to its open-source nature and Linux’s friendliness towards developers. It includes Linux operating system, Apache web server, MySQL database, and PHP application software. Recently, the LAMP stack has slowly morphed into LEMP, with more and more developers replacing Apache web server with NGINX. Although Apache is used by the lion’s share of existing websites, it’s taking losses while NGINX is rapidly growing.

LAMP/LEMP stack is easily modified, traditional, secure, and free – a great choice for enterprise apps and prototypes that often require a high level of customization along with cost-effectiveness. With full access to the source code and an ability to mix and match components of the stack, developers gain great flexibility and can make custom choices depending on each application.

The biggest argument against the LAMP stack comes from its fragmentary nature since the mastery of LAMP requires learning several unrelated languages.

Ruby on Rails: Ruby, SQLite, PHP

Often called just Rails, this web development framework uses Ruby as a programming language and its own default database called SQLite with various compatible web servers such as Apache, NGINX, Passenger, or WEBrick. Rails owes a part of its popularity to Ruby – the language’s clean syntax helps you build complex websites quickly and happily (at least, that’s how Ruby’s creator would like developers to feel). Such well-known apps as GitHub, Shopify, and Airbnb were built with Ruby on Rails.

Rails is especially popular among startups for various reasons. The abundance of shareable software libraries called RubyGems allows businesses to develop rapidly using free and existing components. Also, the simplicity that lies in the foundation of Rails’ philosophy is expressed in such principles as Convention Over Configuration and Don’t Repeat Yourself that minimize your code and help you make fewer decisions.

Django stack: Python, Django, MySQL

Instagram, Mozilla, Bitbucket, and NASA's website are all powered by this Python-driven environment. With attention towards such technologies as machine learning and big data that majorly rely on Python, the language popularity is steadily growing, according to TIOBE and Stack Overflow, now ranked the 4th most used programming language.

Django follows the “batteries included” approach meaning that all of its functionality comes with the framework and doesn’t require additional libraries. Thanks to this, Django relieves you from making lots of choices and makes it possible to create news, blogs, or eCommerce stores with its abundance of default tools.

With its broad range of tutorials, a supportive community, and a clean and rapid development experience, Django is perfect for rookie Python programmers. If you want something different from what this stack can offer, look into smaller packages such as Flask and Pyramid, each with its own level of flexibility and best use cases.

Other options

You may have noticed that the aforementioned stacks do not offer any default front end solutions. The reason for that is that the front end part of the system is much more versatile. Developers can use a variety of frameworks for front-end regardless of the chosen stack, each created with their own use cases in mind.

You can consult our articles on Angular, React, and Vue.js for a deeper view of their pros and cons, as well as our comparison of four other full stack JavaScript frameworks to make the best choice for your project. Besides, you can check out such tools as Bootstrap or Semantic-UI, created with a bunch of premade elements for quickly building responsive products.

Aside from choosing between the existing software packages, you can compose your own stack by looking at the technology used by popular websites and applications. If you want to build a new Yelp or Reddit, check out portals like StackShare and TechStacks for the lists of all main technologies applied.


Sort by