Exploring the MEAN Stack

Created by Tom Leskin / @tomleskin

What is the MEAN Stack?

Four pieces of software:

  • MongoDB
  • ExpressJS
  • AngularJS
  • NodeJS
MongoDB

NoSQL vs SQL

Document Oriented Storage

JSON-style

Since JSON-style, can be used the same way from the database level (MongoDB) to the server level (NodeJS) to the frontend (AngularJS)

ExpressJS

Helps organize web apps on the server side

Create server and handle routes

Much like Sinatra

Hides a lot of the inner workings of Node, which allows you to dive into your application code

AngularJS

A JavaScript framework created by Google and built for fast and dynamic front-end deployment

Allows you to build your normal HTML application and then extend your markup to create dynamic components

AiO solution for complications such as data binding, form validation, DOM event handling, etc.

Simple sintax, which is why it's fast to adopt

NodeJS

Built on Google Chrome’s V8 JavaScript runtime

Sits as the server-side platform in your MEAN application

Interprets the client-side code to produce the web page

Why develop with the MEAN Stack?

A single language across your entire stack increases productivity.

Even client side developers that work in Angular can easily understand most of the code on the server side.

Who is using the MEAN Stack?
Walmart

Began using Node.js in 2012 to provide mobile users with a modern front end experience

53% of Walmarts Black Friday online traffic went to their Node servers with zero downtime

Yahoo

Started using Node.js back in 2010, first mostly for file uploads

Now use it to handle nearly 2 million requests per minute

Have noticed increases in speed and simpler development

PayPal

Recently began migrating from Java to Node

Began experimenting with Account Overview page

Once Paypal saw a 35% speed increase and half the amount of time spent on development, they started moving all sites to Node.js

Demo

Conclusion

Single language across the stack

Quick to development

Offers speed improvements

Sources

MEAN Machine

The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js