The MEAN Stack - An Introduction to MongoDB, ExpressJS, AngularJS, NodeJS

1,223 views

Published on

This presentation gives an introduction to some key concepts found in the MEAN Stack which includes MongoDB, ExpressJS, AngularJS, and NodeJS

1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
1,223
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
41
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

The MEAN Stack - An Introduction to MongoDB, ExpressJS, AngularJS, NodeJS

  1. 1. The MEAN Stack MongoDB - Express.js - Angular.js - Node.js Google Developer Group Waterloo Wednesday March 12th, 2014 Kurt DaCosta
  2. 2. What this presentation is? • Sharing my newly found knowledge of the MEAN stack • Showing how to build a simple real-time chat app using the stack + websockets p.s new at JS, so if you catch anything, call me out!
  3. 3. Who am I? • 3rd year Computer Science @ McMaster University • Co-Founder & Engineering @ Woof.co • Beginner JavaScript + 1 year iOS dev • @Kurtbradd on Twitter & Github
  4. 4. What is the MEAN stack? • MongoDB - noSQL (not only SQL) document data store • ExpressJS - web framework for NodeJS • AngularJS - client Side MVC Framework* • NodeJS - highly concurrent web server built on GooglesV8 engine *developed by Google :)
  5. 5. MongoDB • Document Oriented - store data in JSON like documents (actually BSON) • Dynamic Schemas - flexible insertion of data w/o pre-defined schema • Highly Available - master/slave replication, slave copies from master and can only be used for reads. Slave can select new master if current goes down. • Horizontally Scalable - dev chooses a shard key that determines how data in a collection will be distributed. Data is split into ranges and distributed across multiple shards. (A shard is a master with one or more slaves) • Documents == Rows, Collections == Tables
  6. 6. ExpressJS • Sinatra inspired light weight MVC framework for NodeJS - less opinionated than Rails • Routing • View & style engines - Jade, EJS, LESS • Configuration
  7. 7. AngularJS • Client side MVC • Routes • Templates • Directives • Filters • Dependency Injection • Two-way Data Binding
  8. 8. NodeJS • Server side javascript • Event driven - single thread event queue and event loop • Non-blocking I/O - callbacks...everywhere! • NPM - package manager similar to Rails gems
  9. 9. Why MEAN? • Same language, same objects - spend more time writing code • Great for hack-a-thons & programming in newly formed groups • Easy to get project running and iterate through changes (startups) expressJS JSONJSON
  10. 10. Lets build! • Real-time messaging app in the browser (AngularJS) • When someone sends a message we will POST it to our API (ExpressJS/NodeJS) • API will save the message in our local db (MongoDB) • On database save, we will emit the message to all listening sockets (Socket.io) MEAN stack + Socket.io

×