Application of nodejs in epsilon mobile

737 views

Published on

Published in: Technology, Education
1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total views
737
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide
  • Node tells the operating system (through epoll, kqueue, /dev/poll, or select) that it should be notified when a new connection is made, and then it goes to sleep.If someone new connects, then it executes the callback. Each connection is only a small heap allocation.
  • Application of nodejs in epsilon mobile

    1. 1. Application of node js in Epsilon Mobile
    2. 2. Outline • Nodejs • NodeJs deployment • Expressjs • Epsilon’s choices – Back-end – Front-end – Integrate with jenkins
    3. 3. NodeJs • Event-driven I/O server-side JavaScript environment based on V8 engine.
    4. 4. Create basic hello world sever • Put the code below into app.js file • Run command node app.js
    5. 5. Socket io for socket server • Put the code below into app.js file • Run command node app.js
    6. 6. • Node.js uses an event-driven, non-blocking I/O model -> better than the traditional thread-based server.
    7. 7. Extensible • Easy to install and easy to use. • There’re already a lot of packages out there.
    8. 8. Express.js • web application framework for nodejs – Routes – Serve static file vs serve dynamic files – User authentication – Body parser
    9. 9. Express.js - routes
    10. 10. Express.js - Serve static files
    11. 11. User authentication • Use basic authentication
    12. 12. • Middleware
    13. 13. Body parser • Decide where to put the upload file • Then, the files’ information will be parsed, the file’s name will be hash.
    14. 14. Extensible • Body parser is extensible. • Template engine is also extensible.
    15. 15. Epsilon choices Back-end •nodejs •Expressjs •CoffeeScript, jade •Mocha, superagent, should Front-end •backbone •Jquery •Mocha, sinon, require Others •Jenkins •JSInt (maybe) •JSDuck (maybe)
    16. 16. Testing for back-end • mocha + superagent + should
    17. 17. Testing for front-end • mocha + require + sinon – We’re still working on this one.
    18. 18. spec_runner.js
    19. 19. test_runner.html
    20. 20. Integrate with Jenkins for continuous integration
    21. 21. Our next problems • Trying to setup a Continuous Integration and Continuous Deployment. • Reuse code between server and client. • Generate documents from codes.

    ×