Cloud App Develop
-
Upload
chuo-han-chen -
Category
Technology
-
view
1.335 -
download
0
Transcript of Cloud App Develop
CLOUD APP DEVELOPwith NodeJS
About Me
• JAVA
• iOS
• F2E / NodeJS
• French Bulldog
http://ppt.cc/QNfH
Fin Chen
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
This Talk is NOT About
• How to write Javascript
• How to write iOS App
• ... and any technical details
The Cloud Era
Cloud?
啊不就Server-Client?
Cloud Architecture
NODEJS
AWS EC2 MongoDB
Development Stack
• AWS EC2
• NodeJS (with CoffeeScript)
• MongoDB
• Git
• Sublime Text2
• Grunt
• Jenkins
AWS EC2
• Elastic compute cloud web service
• Free Tier for the first year
• Need to be familiar with command line
NodeJS highlights
• Uses JAVASCRIPT
• Event-driven
• Non-blocking
• NodeJS Package Management Tool: NPM
• Big open source community
Why NodeJS?• Streamlines backend/frontend development
• Best for (soft) real-time web application
• Natively compatible with JSON
• Can be a web container itself
• Scalable
Why not NodeJS
• Still in early development age
• Not enough high-level abstraction library
• CPU intensive jobs
Who is using NodeJS?
• 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
Commonly Used Libraries
• ExpressJS / MeteorJS
• PassportJS
• Mocha
• Async
• Mongoose
• node-inspector
• nodemon
• forever
CoffeeScript
• Compiles into javascript
• Write less, do more
• Easier class, inheritance
• Source Map Support (new!)
MongoDB Highlights
• Document Based
• High Availability
• Scalability
• Data stores in BSON format
• Javascript-like function call
Why MongoDB?
• Big Data
• Dynamic Schema
• Real-Time
• Geospatial Capabilities
• Easy to scale (Sharding/Replica/HA)
Why Not MongoDB?
• Atomic transactions only at document level
• No complex querying (e.g. no join)
• Data size higher
• Needs more RAM for indexing
Who is using MongoDB
http://www.mongodb.org/about/production-deployments/
Git
• Distributed version control
• Github / Bitbucket
• Working offline
• Collaboration
Sublime Text2
• Text editor for Programmers
• Syntax highlights for various languages
• Code autocompletion
• Plug-ins (git, coffeescript, emmet)
• Flexible layout
Grunt
• Javascript task runneraka. automation/build tool
• minification / compilation: uglifyjs
• unit testing: mocha
• validation: jslint
• documentation: docco
• deploy
Jenkins
• Continous Integration Server
• Build newest code periodically
• Run Tests & Code Analysis
Working with Mobile
• Divide and Conquer
• Prototyping
• API Designing
• Test Server
FAQ