cloud app develop
TRANSCRIPT
![Page 1: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/1.jpg)
CLOUD APP DEVELOPwith NodeJS
![Page 2: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/2.jpg)
About Me
• JAVA
• iOS
• F2E / NodeJS
• French Bulldog
http://ppt.cc/QNfH
Fin Chen
![Page 3: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/3.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/4.jpg)
This Talk is NOT About
• How to write Javascript
• How to write iOS App
• ... and any technical details
![Page 5: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/5.jpg)
The Cloud Era
![Page 6: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/6.jpg)
Cloud?
啊不就Server-Client?
![Page 7: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/7.jpg)
Cloud Architecture
NODEJS
AWS EC2 MongoDB
![Page 8: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/8.jpg)
Development Stack
• AWS EC2
• NodeJS (with CoffeeScript)
• MongoDB
• Git
• Sublime Text2
• Grunt
• Jenkins
![Page 9: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/9.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/10.jpg)
NodeJS highlights
• Uses JAVASCRIPT
• Event-driven
• Non-blocking
• NodeJS Package Management Tool: NPM
• Big open source community
![Page 11: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/11.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/12.jpg)
Why not NodeJS
• Still in early development age
• Not enough high-level abstraction library
• CPU intensive jobs
![Page 13: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/13.jpg)
Who is using NodeJS?
![Page 14: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/14.jpg)
• http://nodejs.org/api/
• http://github.com/joyent/node
• http://nodejs.tw/
• http://www.nodebeginner.org/index-zh-tw.html#javascript-and-nodejs
• https://www.facebook.com/groups/node.js.tw
Resources
![Page 15: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/15.jpg)
Commonly Used Libraries
• ExpressJS / MeteorJS
• PassportJS
• Mocha
• Async
• Mongoose
• node-inspector
• nodemon
• forever
![Page 16: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/16.jpg)
CoffeeScript
• Compiles into javascript
• Write less, do more
• Easier class, inheritance
• Source Map Support (new!)
![Page 17: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/17.jpg)
MongoDB Highlights
• Document Based
• High Availability
• Scalability
• Data stores in BSON format
• Javascript-like function call
![Page 18: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/18.jpg)
Why MongoDB?
• Big Data
• Dynamic Schema
• Real-Time
• Geospatial Capabilities
• Easy to scale (Sharding/Replica/HA)
![Page 19: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/19.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/20.jpg)
Who is using MongoDB
http://www.mongodb.org/about/production-deployments/
![Page 21: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/21.jpg)
Git
• Distributed version control
• Github / Bitbucket
• Working offline
• Collaboration
![Page 22: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/22.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/23.jpg)
Grunt
• Javascript task runneraka. automation/build tool
• minification / compilation: uglifyjs
• unit testing: mocha
• validation: jslint
• documentation: docco
• deploy
![Page 24: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/24.jpg)
Jenkins
• Continous Integration Server
• Build newest code periodically
• Run Tests & Code Analysis
![Page 25: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/25.jpg)
Working with Mobile
• Divide and Conquer
• Prototyping
• API Designing
• Test Server
![Page 26: Cloud App Develop](https://reader035.vdocument.in/reader035/viewer/2022081403/554f6b22b4c9058a148b4f41/html5/thumbnails/26.jpg)
FAQ