MEAN Stack Primer

MEAN Stack Primer.

MEAN – at its core, MEAN means Javascript. Unlike other technology platforms, the MEAN stack allows the user to rely on a single technology for the full stack architecture (front-end, back-end, database, and MVC).

Many people have heard of the LAMP stack. It was and is the most commonly used set of technologies to power web sites.  LAMP stands for Linux, Apache, MySQL, and PHP.  This is a very robust and powerful set of technologies that powers the back end of some of the most vital sites on the internet today.   It has a competitor though, the MEAN stack.

MEAN stands for Mongo, Express, Angular, and Node. Let’s go through what each of these are to get a better idea of how powerful this new set of technologies is.

Node.js is a server-side Javascript framework. It allows developers, who already use Javascript to power their font-end apps, the ability to more easily transition to a full stack using a similar language.  Node.js is a very powerful, threaded architecture that is built from the ground up to support multiple instances of the same app. Combined with the lightweight Express web server, these two act as a pair to allow deployment of an app in a cloud-based architecture that takes full advantage of  multiple servers and processors.

Without a database, even with all of this power, this could only provide a rudimentary level of application to the user.   That’s where Mongo comes in. Mongo is a “page level”, “document”  or “Json Object” level database. It is one in a series of BIG Data ideas that removes SQL from that data processing architecture.   Mongo does support foreign keys in multiple “tables” (sets of documents with the same schema), so a somewhat normalized set of data can be created with it, but that doesn’t harness the power of a No SQL database.   Records in a Mongo Database are stored as full fledged native JSON.  This allows the developer a multitude of ways to create his/her data driven application.  The developer can choose to use the powerful Node engine to parse  the JSON and pass it back to the front end, or, he/she can send the entire set of JSON back in the response object and let the increasingly powerful desktop/mobile browsers parse and use the data.

Node.js also can be used to create a full web site experience. Combine Express with a templating engine such as Jade or Mustache and you have full PHP-like control over the data and content integration on your web pages.  Add in Ionic with Bootstrap and you have the best of breed front-end solutions for hybrid web and mobile applications with responsive design.

Now, what about Angular? Angular is an MVC frameork that works with these technologies to provide a clean separation between the view of the data, the way data is accessed and transformed and the data itself.  Following the Angular.js MVC closely will allow the developer to more easily keep the front-end application clean. It separates “dirty little secrets” such as DOM manipulation from the application logic, creating a clean separation of the front-end and back-end systems.

What does all of this mean to the developer and his clients?  Clean, fast, relatively easy to build full stack applications and web services (Mean is perfect for REST web services) with optimum performance in a shorter time than with most other technologies.

Check out the MEAN stack at mean.io.

If you want help implementing a MEAN stack, we can provide consulting services help get you to the next level.

Leave a Reply