What is MEAN Stack: MongoDB, Express, AngularJS & Node.js
The MEAN stack – also known as MEAN.js – is the collection
of open source, JavaScript-based technologies that has changed the way
developers build web and mobile applications.
MEAN is an acronym, which stands for:
MongoDB
Express
AngularJS
Node.js
The term was first coined by MongoDB developer Valeri Karpov
in this 2013 blog post, where he outlines the advantages of using a single
language throughout a technology stack.
This single language programming differentiates MEAN over
the then-popular LAMP stack. Short for Linux, Apache, MySQL and PHP, LAMP
required developers to know various languages like C, C++, Perl, Python, PHP
and SQL.
When it comes to the MEAN stack, JavaScript is king, the
most commonly used language among developers according to the 2018
StackOverflow Developer Survey, with JSON as its common dialect.
Let’s take a look at each component below.
MongoDB: The Database
MongoDB - Part of the MEAN stack
MongoDB is the NoSQL database that stores documents in a
JSON-like format.
It also requires no upfront schema, so developers can then
jump directly to the development process instead of the data organization
process (which, of course, should still be taken care of).
If you’re looking to try, check out Studio 3T’s free 30-day
trial and get access to query auto-completion, instant code generation, SQL
querying in MongoDB, and more. Download it here.
In case you’re considering or already using MongoDB, try
Studio 3T, the only MongoDB GUI that combines query autocompletion, visual query
building, instant code generation, stage-by-stage aggregation query building –
and much more – all in one tool. Download it today.
Related reading:
Getting started with MongoDB
The main NoSQL database types
The official MongoDB website
Express: The Backend Framework
ExpressJS logo
Express.js calls itself the “fast, unopinionated, minimalist
web framework” for Node.js. It’s lightweight yet robust, which has made it a
go-to among developers and the backbone of many applications today.
But Node.js alone isn’t enough to build a website. Sure,
it’s responsible for giving JavaScript backend functionality, but it is
Express.js that provides Node.js the structure and extra functions for more
seamless development.
Together, Express and Node extend the capabilities of
JavaScript for backend development, making it possible for developers to build
entire applications just with JavaScript.
Related reading:
What’s a web framework?
The official Express.js website
AngularJS: The Frontend Framework
AngularJS - Part of the MEAN stack
“AngularJS is what HTML would have been, had it been
designed for applications”.
The frontend component of the MEAN stack, AngularJS lets
developers use HTML but it extends HTML syntax by creating new constructs,
which spare the developer all the extra coding.
AngularJS modifies the HTML code it first reads from a page
through a data binding and dependency injection method. It extends HTML
attributes through directives, and binds data to HTML with expressions.
A directive is a marker that tells AngularJS’s HTML compiler
to modify a DOM element (e.g. CSS class). ngBind, ngModel, and ngClass are
examples of directives.
An expression, on the other hand, is a JavaScript-like code
snippet that binds application data to HTML. Written inside double curly
braces, expressions are mainly placed in interpolation bindings and directive
attributes.
Related reading:
The official AngularJS website
Introduction to AngularJS
Node.js: The Runtime
Environment
Node.js logo
Node.js is a JavaScript runtime environment built on Google
Chrome’s JavaScript Engine (V8 Engine). To understand why Node.js is so
popular, we need to first look at latency and throughput.
Latency is the delay in data transmission or processing.
Throughput is the amount of data processed. The sweet spot is to keep latency
low and throughput high, which Node.js achieves through its “non-blocking”
approach.
Unlike PHP which only executes commands after previous
commands finish, Node.js executes commands concurrently, which makes it more
time- and memory-efficient.
Related reading:
The official Node.js website
Introduction to Node.js
Advantages of the MEAN stack
Speed, simplicity, and scalability
MEAN’s individual technologies were all built to address
speed, flexibility, and usability. The result is a modern and effective
technology stack, which has enabled developers to create fast, easy, and highly
scalable applications.
The npm registry, the package manager for Node.js, perfectly
illustrates these perks. With over 350,000 packages or existing solutions
publicly available, developers can easily tap into this resource to make coding
faster and easier.
Single language programming = Developer productivity
The MEAN stack enables developers to code in a single
programming language – JavaScript – throughout the whole development process.
Teams can then better collaborate because everyone speaks
the same language, from backend to frontend.
Individual developers can also more seamlessly explore or
transition other facets of the development process, without the extra hassle of
having to learn another language.
Cost-effectiveness
Not only is the MEAN stack free and open-source – it also
offers reduced development costs made possible by single-language programming.
MEAN.js enables developers to contribute throughout the
whole development cycle instead of hiring separate help, not to mention that
developers are also able to share and reuse code extensively.
Disadvantages of the MEAN stack
It’s always worth investigating – and maybe even
implementing – the “Next-Big-Things” and “It” technologies like the MEAN stack.
But that never means it’s right for your project.
Richard Clayton illustrates the importance of reflecting on
one’ chosen technology or stack in the appropriately-titled, “MEAN’s great, but
then you grow up“. Needs and teams evolve over time, and developers must always
keep their finger on tech’s ever-changing pulse.
The rise of alternatives to the MEAN stack like MERN, which
uses React.js instead of Angular.js, and MEVN which uses VueJS, shows that
development teams can tweak existing framework options to suit their
needs.[Source]-https://studio3t.com/knowledge-base/articles/what-is-mean-stack/
62 Hours Mean Stack Training includes MongoDB, JavaScript, A62 angularJS
Training, MongoDB, Node JS and live Project Development. Demo Mean Stack
Training available.
Comments
Post a Comment