Theory behind MERN Stack

Theory behind MERN Stack

There are 4 techs which can make you a full stack developer with handsome salary but why MERN and how they communicate to each other...

MERN stands for "MongoDB, Express, React, Node". These four techs can make you a software developer or a full stack developer. But before becoming something, it is mandatory to know almost everything so, knowing almost everything is not enough easy while in start but one thing can help you to grasp over anything by thinking broadly. Actually,

the fundamental of learning is thinking and not just thinking but thinking broadly.

Now, we are to going to think over these 4 techs which is knows as MERN

lets think,

  • Why and how MERN works

  • How MERN stack communicate to eachother

now, understanding above two points, can make you a successful engineer because when you know these points, you will also know the engineering behind these Web Technology and knowing engineering means playing with them.

now, its time to dive deep...

  • Why and how MERN works

So, why you should choose MERN stack ? the answer is simple, in early ages, becoming a full stack developer was hard enough because you had to learn frontend and backend languages simultaneously. But, in 2021 things became changed! now, you can just learn one programming language which is JavaScropt that can make you a full stack developer, how easy! So, how MERN works? let's break them into pieces.

MongoBD: This is a document based database which can store collections of your data. SQL stores data into rows and columns but MongoDB uses collections and it is easier then SQL.

Express: This is NodeJS framework that can make your code concise and powerful and easy to understand.

React: React is a frontend framework which can help you to build awesome and fast User Interface UI for short.

Node: It is backend runtime environment. JavaScript can't run directly into your machine but NodeJS can help you to run your JS code into your machine. Basically, nodeJS made in C++ programming language with chrome V8 engine. The V8 is a JS engine which is responsible for running your JS code in browser. So, browser also can't understand JS but V8 tell him how to behave.

So now, you know why and how MERN works.

Now, the second question making us curious to know how they work together.

  • How MERN stack communicate to eachother

First If you knew what these four techs are then understanding their communication will easier for you.

MERN_Stack-g2t2atpx2n.png

Frontend and Backend can be developed independently. So, for frontend you have to code in React and bunch of third party libraries can make your code more robust and enhanced. And on backend side Node plays a role to listen your API requests. well, API is a way to transfer/recieve any kind of data from the server. So, node handles API requests which come from React and sending back response according to API requests.

Express is just a framework and can help you to concise your Node code like React is framework of JavaScript

AND MongoDB is a database where you can store any kind of data. React doesn't have authority to communicate directly to the DataBase but Node has ability to receive/send data from front and send back to DB for storage.

So, before learning them these two questions were very important. The whole article is based on theory base. Because, when you want to learn anything you must have theory concept before dive into practical. This was everything about above two questions. Any kind of question regarding this is welcomed with open arms. Touch with me on Twitter: Twitter Profile