An Introduction to the
MEAN Stack
The
term MEAN stack refers to a collection of JavaScript based technologies used to
develop web applications. MEAN is an acronym for MongoDB, ExpressJS, AngularJS and Node.js. From
client to server to database, MEAN is full stack JavaScript. This article
explores the basics of the MEAN stack and shows how to create a simple bucket
list application.
Introduction
MongoDB is
a schemaless NoSQL database system. MongoDB saves data in binary JSON format
which makes it easier to pass data between client and server.
Express is
lightweight framework used to build web applications in Node. It provides a
number of robust features for building single and multi page web application.
Express is inspired by the popular Ruby framework, Sinatra.
AngularJS is
a JavaScript framework developed by Google. It provides some awesome features
like the two-way data binding. It’s a complete solution for rapid and awesome
front end development.
Node.js is
a server side JavaScript execution environment. It’s a platform built on Google
Chrome’s V8 JavaScript runtime. It helps in building highly scalable and
concurrent applications rapidly.
In
this article, we’ll be creating a simple CRUD application using the MEAN stack.
So, let’s dive in.
Prerequisites
Before proceeding with
this tutorial, we are assuming that you are already aware of the basics of
HTML, CSS, and JavaScript.
1. MEAN Stack Developer
2. MEAN Stand for
3. MEAN Stack VS Full Stack
What is MEAN.js?
The
term MEAN.js is a full stack JavaScript open-source solution,
used for building dynamic websites and web applications. MEAN is an acronym
that stands for MongoDB, Express, Node.js
and AngularJS, which are the key components of the MEAN stack.
It
was basically developed to solve the common issues with connecting those
frameworks (Mongo, Express Nodejs, AngularJS), build a robust framework to
support daily development needs, and help developers use better practices while
working with popular JavaScript components.
Stack
means using the database and web server in the back end, in the middle you will
have logic and control for the application and interaction of user at the front
end.
·
MongoDB − Database System
·
Express − Back-end Web Framework
·
Node.js − Web Server Platform
·
AngularJS − Front-end Framework
History
MEAN
name was coined by Valeri Karpov, a MongoDB developer.
Why to use MEAN.js?
·
It is
an open source framework which is free to use.
·
It
can be used as standalone solution in a whole application.
·
It
provides lower development cost and increases the developer flexibility and
efficiency.
·
It
supports MVC pattern and uses the JSON for transferring data.
·
It
provides additional frameworks, libraries and reusable modules to increase the
development speed.
Before
we begin with further concepts, we will see the basic building blocks of MEAN.JS application.
Introduction to MongoDB
In MEAN acronym, M stands
for MongoDB, which is an open source NoSQL database that saves the data in JSON
format. It uses the document oriented data model to store the data instead of
using table and rows as we use in the relational databases. It stores data in
binary JSON (JavaScript Serialized Object Notation) format to pass the data
easily between client and server. MongoDB works on concept of collection and
document. For more information, refer to this link MongoDB.
Introduction to Express
In MEAN acronym, E stands
for Express, which is a flexible Node.js web application framework
used to make development process easier. It is easy to configure and customize,
that allows building secure, modular and fast applications. It specifies the
routes of an application depending on the HTTP methods and URLs. You can
connect to databases such as MongoDB, MySQL, Redis easily. For more
information, refer to this link Express.
Introduction to
AngularJS
In MEAN acronym, A stands
for AngularJS, which is a web frontend JavaScript framework. It
allows creating dynamic, single page applications in a clean Model View
Controller (MVC) way. AngularJS automatically handles JavaScript code suitable
for each browser. For more information, refer to this link AngularJS.
Introduction to Node.js
In MEAN acronym, N stands
for Node.js, which is a server side platform used for development
of web applications like video streaming sites, single-page applications, and
other web applications. It provides a rich library of various JavaScript
modules which simplifies the development of web applications using Node.js to a
great extent. It is built on Google Chrome's V8 JavaScript Engine, so it is
very fast in code execution. For more information, refer to this link Node.js.
MEAN is an open source JavaScript framework,
used for building dynamic websites and web applications. It includes following
four building blocks to build an application.
·
MongoDB − It is a document database, that stores
data in flexible, JSON-like documents.
·
Express − It is web application framework for
Nodejs.
·
Node.js − It is Web Server Platform. It provides
rich library of various JavaScript modules which simplifies the development of
web applications.
·
AngularJS − It is a web frontend JavaScript
framework. It allows creating dynamic, single page applications in a clean
Model View Controller (MVC) way.
For more information on these, you can refer
the overview chapter.
The below diagram depicts architecture of MEAN stack application.
As shown in the above image, we have AngularJS
as client side language which processes the request of a client.
·
Whenever a user makes a
request, it is first processed by AngularJS.
·
Next, request enters
second stage, where we have Node.js as server side language and ExpressJS as
backend web framework.
·
Node.js handles the client/server requests
and ExpressJS makes request to the database.
·
In the last stage, MongoDB (database)
retrieves the data and sends the response to ExpressJS.
·
ExpressJS returns the
response to Nodejs and in turn to AngularJS and then displays the response to
user.
Comments
Post a Comment