Cloud App Develop

27
CLOUD APP DEVELOP with NodeJS

Transcript of Cloud App Develop

Page 1: Cloud App Develop

CLOUD APP DEVELOPwith NodeJS

Page 2: Cloud App Develop

About Me

• JAVA

• iOS

• F2E / NodeJS

• French Bulldog

http://ppt.cc/QNfH

Fin Chen

Page 3: Cloud App Develop

This Talk is About

• How to build up a NodeJS service

• A basic introduction to the tools I used

• How server and mobile developers cooperate

Page 4: Cloud App Develop

This Talk is NOT About

• How to write Javascript

• How to write iOS App

• ... and any technical details

Page 5: Cloud App Develop

The Cloud Era

Page 6: Cloud App Develop

Cloud?

啊不就Server-Client?

Page 7: Cloud App Develop

Cloud Architecture

NODEJS

AWS EC2 MongoDB

Page 8: Cloud App Develop

Development Stack

• AWS EC2

• NodeJS (with CoffeeScript)

• MongoDB

• Git

• Sublime Text2

• Grunt

• Jenkins

Page 9: Cloud App Develop

AWS EC2

• Elastic compute cloud web service

• Free Tier for the first year

• Need to be familiar with command line

Page 10: Cloud App Develop

NodeJS highlights

• Uses JAVASCRIPT

• Event-driven

• Non-blocking

• NodeJS Package Management Tool: NPM

• Big open source community

Page 11: Cloud App Develop

Why NodeJS?• Streamlines backend/frontend development

• Best for (soft) real-time web application

• Natively compatible with JSON

• Can be a web container itself

• Scalable

Page 12: Cloud App Develop

Why not NodeJS

• Still in early development age

• Not enough high-level abstraction library

• CPU intensive jobs

Page 13: Cloud App Develop

Who is using NodeJS?

Page 15: Cloud App Develop

Commonly Used Libraries

• ExpressJS / MeteorJS

• PassportJS

• Mocha

• Async

• Mongoose

• node-inspector

• nodemon

• forever

Page 16: Cloud App Develop

CoffeeScript

• Compiles into javascript

• Write less, do more

• Easier class, inheritance

• Source Map Support (new!)

Page 17: Cloud App Develop

MongoDB Highlights

• Document Based

• High Availability

• Scalability

• Data stores in BSON format

• Javascript-like function call

Page 18: Cloud App Develop

Why MongoDB?

• Big Data

• Dynamic Schema

• Real-Time

• Geospatial Capabilities

• Easy to scale (Sharding/Replica/HA)

Page 19: Cloud App Develop

Why Not MongoDB?

• Atomic transactions only at document level

• No complex querying (e.g. no join)

• Data size higher

• Needs more RAM for indexing

Page 20: Cloud App Develop

Who is using MongoDB

http://www.mongodb.org/about/production-deployments/

Page 21: Cloud App Develop

Git

• Distributed version control

• Github / Bitbucket

• Working offline

• Collaboration

Page 22: Cloud App Develop

Sublime Text2

• Text editor for Programmers

• Syntax highlights for various languages

• Code autocompletion

• Plug-ins (git, coffeescript, emmet)

• Flexible layout

Page 23: Cloud App Develop

Grunt

• Javascript task runneraka. automation/build tool

• minification / compilation: uglifyjs

• unit testing: mocha

• validation: jslint

• documentation: docco

• deploy

Page 24: Cloud App Develop

Jenkins

• Continous Integration Server

• Build newest code periodically

• Run Tests & Code Analysis

Page 25: Cloud App Develop

Working with Mobile

• Divide and Conquer

• Prototyping

• API Designing

• Test Server

Page 26: Cloud App Develop

FAQ

Page 27: Cloud App Develop

BreakComing UP: App Demo!

http://ppt.cc/Ucpi