Looking at MERN stack

Long ago, when I was a lit­tle kid, I found about the WAMP stack. It ab­solutely thrilled me to think that I could own a piece of web and make it do what­ever I wanted. I was also a fan of 000webhost back then (then it got hacked). So in a frenzy of rapid cod­ing and loads of cussing (I was a be­gin­ner in both) I built sev­eral web apps. Things like half baked so­cial net­work­ing sites, blog­ging web­sites and such­like. One such in­ven­tion I re­mem­ber with par­tic­u­lar fond­ness is a small chat ap­pli­ca­tion. I built it in a day to talk to a girl I re­ally liked. The idea was that we both loved to chat but hated Facebook.

For a SE class pro­ject, I was re­quired to look into a back-end that can serve both a thin web client and a mo­bile client. As it turns out, these days the web is full of peo­ple talk­ing about and us­ing the MEAN and MERN stacks. They stand for {MongoDB, ExpressJS, Angular, NodeJS} and {MongoDB, ExpressJS, React, NodeJS} re­spec­tively.

The stacks are es­sen­tially based on NodeJS. NodeJS is a javascript run­time en­gine. Over NodeJS, we can im­ple­ment a server and run it on the in­ter­net to serve pages and data to clients.

ExpressJS is a frame­work on top of NodeJS that makes it eas­ier to man­age re­quests from clients and re­spond to them eas­ily. Obviously, since NodeJS is just a run­time en­gine, it is go­ing to be fairly an­noy­ing to di­rectly code a server over it.

MongoDB is a data­base sys­tem based on the NoSQL data stor­age mech­a­nism. Where MySQL uses ta­bles to store data, MongoDB opts for a JSON like key-value pair data stor­age mech­a­nism. I need to look into this, be­cause I think this is not ex­actly a re­place­ment for MySQL for all ap­pli­ca­tions.

Angular and React are two frame­works used to de­velop front-end for web and mo­bile apps.

With these four com­po­nents, a full web soft­ware sys­tem can be re­al­ized. I think this is the best for the pro­ject I have picked.

But that is not why I am writ­ing this blog post. Just like WAMP stack made me re­al­ize that the in­ter­web is full of pos­si­bil­i­ties, look­ing at these new stacks has filled me up with hope again. I am filled with new ideas of things I can make with these stacks.

I’m not think­ing just web or mo­bile. I can ab­solutely con­nect this sys­tem up with ESP8266 mod­ules and have it talk over the in­ter­net in JSON. Unlike WAMP, where I was es­sen­tially lim­ited to send­ing web­pages to client, I can just send the data in JSON to my clients. With this flex­i­bil­ity, I can con­tin­u­ously stream sen­sor data to the back­end and get back just the re­sults. With MEAN (minus the An­gu­lar), I have a very sim­ple mech­a­nism to send and re­ceive data over in­ter­net. Pro­cess­ing it does­n’t have to be done in NodeJS.

All this is a re­ally in­ter­est­ing to me, and I can’t wait to do all kinds of things with it.