Wednesday, 14 May 2014

MEAN Stack

Following my long held desire to learn lot of exciting technologies, I was trying to find out a worthy & completely new stream to spend my time on. I came to know about the MEAN stack from one of my colleagues. MEAN - Mongo db, Express js, Angular js, Node js - a stack which is completely based on javascript at both client & server end.

Here is a crisp note of my understanding of each of these :

Mongo db - It is a widely accepted, revolutionary, no-SQL database (not only SQL). Data is stored as JSON. There are no strict schema definition for the JSON structures. Your data get stored as collections, an example 'Student Score Card' collection is shown below :
     name : 'Dharshni',
     scores : [ { math : 100, grade : 'A+'}, {science : 40, grade : 'C', remarks : 'need to improve'}]
     overall : 'B'
     name : 'Sowmi',
     scores : [ { math : 85, grade : 'A'}, {science : 90, grade : 'A'}]
     overall : 'A',
     rank : 1

Note that there are two student records, each with varying attributes like name, scores, overall, rank. You can see that the schema is not strict & Mongo db accepts these variations.

(Thanks Sowmi for teaching me basics of Mongo db ;) )

Express.js : 
  Yet to understand what this is.

Angular.js :  
   This is an interesting javascript framework with cool built-in features that makes your front end development very interesting. I see that the major strength of Angular.js is its inherent support for SPAs (Single Page Applications).

SPA are built with one HTML page - where all of your application's javascripts & css reside. In addition, this html has a placeholder (generally a div) which can be filled with different HTML based on the user's navigation. The advantage is that
   1) all your scripts & css are loaded only once during the life of your application
   2) phenomenal reduction in the size of your HTTP request-response
   3) easier code management

Node.js : 
   Node js is a event-driven javascript server, that runs on Google's V8 javascript engine. Node.js is said to primarily reduce the cost you invest on your application's server. I will write about Node.js once I get further clarity.

Have a nice day :)