What is MEAN in web development?
MEAN is a user-friendly stack which is the ideal solution for building dynamic websites and applications. This free and open-source stack offers a quick and organized method for creating rapid prototypes for web-based applications.
MEAN is comprised of four different technologies:
- MongoDB express is a schemaless NoSQL database system
- Express JS is a framework used to build web applications in Node
What is MongoDB?
MongoDB is an open-source, cross-platform database which is written in C++. It stores data in the key-value pair, using binary data type like JSON. It is a document-oriented NoSQL Database. A document in MongoDB resembles an Object in OOPS
What is Express.JS?
Express is a mature, flexible, lightweight server framework. It is designed for building single, multi-page, and hybrid web applications. This lightweight framework uses the Pug engine to provide support for templates.
Express is the de-facto framework for Nodejs and is draws heavy inspiration from Sinatra, the popular Ruby framework.
What is Angular JS?
AngularJS allows us to use HTML as a template language. Therefore, you can extend HTML’s syntax to express the components of your application. Angular features like dependency injection and data binding eliminate plenty of code that you need to write.
What is Node JS?
Node.js uses a non-blocking and event-driven I/O model. This makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
It allows developers to create data-intensive real-time apps that run across distributed devices. You can run Node.js runtime on Microsoft Windows, OS X, and Linux.
Mean Stack Architecture
The primary function of various components of Mean Stack Architecture are as follows:
Angular JS: Accept requests and display results to end user
NodeJS: Handle Client and Server Requests
Express JS: Make requests to Database and return a response
MongoDB: Store and retrieve data.
- Firstly, the client makes a request which is processed by the AngularJS
- After that, the request moves to NodeJS which will parse the request.
- ExpressJs will make calls to MongoDB to get or set data.
- MongoDB will retrieve the requested data and return that request to the Express JS
- NodeJS will return the request to the client.
- At the client side, AngularJS to display the result fetched from MongoDB.