/
MEAN Stack MEAN Stack

MEAN Stack - PowerPoint Presentation

aaron
aaron . @aaron
Follow
590 views
Uploaded On 2017-10-19

MEAN Stack - PPT Presentation

c0nrad Overview Day 1 MEAN Stack NodeJS Mini Cat Fact Spammer MongoDB Cat Profiles Express Catbook API Facebook for cats Day 2 AngularJS CatBook Newbs guide to webscale ID: 597416

data api cats nodejs api data nodejs cats cat mongodb express server stack update web framework mongoose find mongodbdaterbaserexpressweb

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "MEAN Stack" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

MEAN Stack

c0nradSlide2

Overview

Day 1:

MEAN Stack

NodeJSMini Cat Fact SpammerMongoDBCat ProfilesExpressCatbook API (Facebook for cats)Day 2:AngularJSCatBook

Newb’s

guide to

webscale

”Slide3

Mom: “Why can’t you read porn like a normal boy?”Slide4

Kiss me and you’ll see

how important I amSlide5

Disclaimer

I’m not an expert in these stuff, I just write a lot of code and I enjoy MEAN stack.Slide6

MEAN Stack

MongoDB

Daterbaser

ExpressWeb frameworkAngularJSClient Side FrameworkNodeJSWeb serverSlide7

MEAN

MongoDB

Daterbaser

ExpressWeb frameworkAngularJSClient Side FrameworkNodeJSWeb serverSlide8
Slide9

NodeJSSlide10

NodeJS

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 managerSlide11

How does one Asynchronous?Slide12

NodeJS

s

o I herd u

liek catfactzSlide13

MongoDB

Stores data in a

flexable

data document (json)WebScaleCraigslist, 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

javascriptCapped collectionsSlide14

MongoDB

Mongo

vs

MongoDDBCollectionsDocumentsFieldsshow dbsuse

db

s

how collections

db.cats.insert

()

db.cats.find(

)db.cats.remove()db.cats.update()

$set

CODE TIMESlide15

Mongoose

NodeJS

Driver

schema-based solution for modeling data built-in type castingvalidation,query buildingbusiness logic hooks and more.Slide16

MongooseSlide17

NodeJS without Express

Missing routing, packages,

params

, and who wants to set content type?Slide18

Express

Fast,

unopinionated

, minimalist web framework for Node.jsMost popular by farRobust routingFocus on high performanceSuper-high test coverageHTTP helpers (redirection, caching, etc)View system supporting 14+ template enginesContent negotiationExecutable for generating applications quicklySlide19

Express

My favorite benefits

HTTP Routing

VerbsParamsMiddlewareConfiguration/PackagesSessionsMore funner

!Slide20

API

Application

P

rogrammers InterfaceIt’s how you interact with the dataRESTful (Representational State Transfer)GET: Give me the dataPUT: Update the dataPOST: Create some new dataDELETE: Delete the dataSlide21
Slide22

CatBook API

Mongoose Model

Cat API

:GET /api/cats Get a list of kittensGET /api/cat/:idGet a specific kittenPOST /api/catAdd a new kittenPUT

/

api

/cat/:id

Update a kitten

DELETE /api/cat/:id

Delete a kitten“You got meow”Meow API:

POST /

api

/meow

GET /

api

/cat/meowsSlide23

Conclusion

MEAN (err, MEN)

SPA

RESTful APIMongoDB – Find Update Insert RemoveNodeJS/NPM – Web ServerExpress – Minimal Web FrameworkSlide24

Next Week

We build

Catboo

kAngularJSBootstrapHTML/CSS/JSDeploy to Heroku