Download presentation
Presentation is loading. Please wait.
Published byRosanna Allison Modified over 9 years ago
1
MEAN Stack c0nrad
2
Overview Day 1: – MEAN Stack – NodeJS Mini Cat Fact Spammer – MongoDB Cat Profiles – Express Catbook API (Facebook for cats) Day 2: – AngularJS – CatBook “Newb’s guide to webscale”
3
Mom: “Why can’t you read porn like a normal boy?”
4
Kiss me and you’ll see how important I am
5
Disclaimer I’m not an expert in these stuff, I just write a lot of code and I enjoy MEAN stack.
6
MEAN Stack MongoDB – Daterbaser Express – Web framework AngularJS – Client Side Framework NodeJS – Web server
7
MEAN MongoDB – Daterbaser Express – Web framework AngularJS – Client Side Framework NodeJS – Web server
9
NodeJS
10
platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications uses an event-driven, non-blocking I/O model lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices used by Groupon, SAP, LinkedIn, Microsoft, Yahoo!, Walmart, Rakuten and PayPal. NPM – node package manager
11
How does one Asynchronous?
12
NodeJS so I herd u liek catfactz
13
MongoDB Stores data in a flexable data document (json) WebScale Craigslist, eBay, Foursquare, SourceForge, Viacom, and the New York Times, among others. MongoDB is the most popular NoSQL database system. Ad hoc queries Indexing (secondary indexing) Replication Load balancing Aggregation framework Serverside javascript Capped collections
14
MongoDB Mongo vs MongoD DB – Collections Documents – Fields show dbs use db show collections db.cats.insert() db.cats.find() db.cats.remove() db.cats.update() – $set CODE TIME
15
Mongoose NodeJS Driver schema-based solution for modeling data – built-in type casting – validation, – query building – business logic hooks and more.
16
Mongoose
17
NodeJS without Express Missing routing, packages, params, and who wants to set content type?
18
Express Fast, unopinionated, minimalist web framework for Node.js Most popular by far – Robust routing – Focus on high performance – Super-high test coverage – HTTP helpers (redirection, caching, etc) – View system supporting 14+ template engines – Content negotiation – Executable for generating applications quickly
19
Express My favorite benefits – HTTP Routing Verbs Params – Middleware – Configuration/Packages – Sessions – More funner!
20
API Application Programmers Interface It’s how you interact with the data RESTful (Representational State Transfer) – GET: Give me the data – PUT: Update the data – POST: Create some new data – DELETE: Delete the data
22
CatBook API Mongoose Model Cat API: – GET /api/cats Get a list of kittens – GET /api/cat/:id Get a specific kitten – POST /api/cat Add a new kitten – PUT /api/cat/:id Update a kitten – DELETE /api/cat/:id Delete a kitten “You got meow” Meow API: – POST /api/meow – GET /api/cat/meows
23
Conclusion MEAN (err, MEN) SPA RESTful API MongoDB – Find Update Insert Remove NodeJS/NPM – Web Server Express – Minimal Web Framework
24
Next Week We build Catbook – AngularJS – Bootstrap – HTML/CSS/JS Deploy to Heroku
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.