(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
NodeJS
           JS as a Server-side Language

           Iraj Islam @irajislam
           Nurul Ferdous @ferdous


                    NewsCred

Saturday, September 17, 2011
Agenda                                 NewsCred




                   •       Part 1. NodeJS

                   •       Part 2. ExpressJS

                   •       Questions?




Saturday, September 17, 2011
Who We Are                                   NewsCred




                Iraj Islam
                CTO/Co-founder, NewsCred


                Nurul Ferdous
                Senior Software Engineer, NewsCred




Saturday, September 17, 2011
Part 1
           NodeJS


                    NewsCred


Saturday, September 17, 2011
Server-side JS         NewsCred




Saturday, September 17, 2011
What’s NodeJS?                                  NewsCred




                                 NodeJS
                               What’s this all about?




Saturday, September 17, 2011
What’s NodeJS?                                      NewsCred




                                      NodeJS
                               Evented I/O for V8 JavaScript.




Saturday, September 17, 2011
What’s NodeJS?                            NewsCred




                               Goal
                 “Provide an easy way to build scalable
                         network programs.”




Saturday, September 17, 2011
History                                                       NewsCred


                               The Evolution of the Web
                               From static pages to real time data.




Saturday, September 17, 2011
Why NodeJS?                                                           NewsCred


                                      The Age of Big Data
                                Exabytes (1018) of data stored per year

                                                                        1000



                                                                        750


                                                                     500


                                                                    250
                               2006
                                      2007
                                             2008                   0
                                                    2009
                                                            2010


Saturday, September 17, 2011
Why NodeJS?                                           NewsCred


                               The Fast Food Analogy
                               Synchronous vs. Asynchronous




Saturday, September 17, 2011
Why NodeJS?                                   NewsCred


                               The Apache Solution
                                Synchronous I/O
                                  Application

                                                        File
                User                    readFile();    System




                                       getTweets();    Twitter
                                                        API




                                      writeToDb();     MySQL


Saturday, September 17, 2011
Why NodeJS?                                   NewsCred


                               The Apache Solution
                                  Blocking I/O
                                  Application

                                                        File
                User                    readFile();    System


                                        Waiting...

                                       getTweets();    Twitter
                                                        API

                                        Waiting...

                                      writeToDb();     MySQL


Saturday, September 17, 2011
Why NodeJS?                                   NewsCred


                               The NodeJS Solution
                                Asynchronous I/O
                                  Application

                                                        File
                User                    readFile();    System




                                       getTweets();    Twitter
                                                        API




                                      writeToDb();     MySQL


Saturday, September 17, 2011
Why NodeJS?                                   NewsCred


                               The NodeJS Solution
                                Non-blocking I/O
                                  Application

                                                        File
                User                    readFile();    System




                                       getTweets();    Twitter
                                                        API




                                      writeToDb();     MySQL


Saturday, September 17, 2011
NodeJS Benefits                                                       NewsCred




                  • Fast
                        • Built on top of Google’s V8 JavaScript engine.


                  • Scalable
                        • Asynchronous, event-driven I/O model yields web scale.


                  • Programmable
                        • JavaScript API and pluggable module architecture.




Saturday, September 17, 2011
NodeJS Use Cases                   NewsCred




                • Serving APIs
                • Serving real-time apps
                • Serving web apps
                • Streaming data




Saturday, September 17, 2011
NodeJS “Hello World!”                          NewsCred




           var http = require('http');

           http.createServer(function (request, response) {
             response.writeHead(200, {'Content-Type':
                                      'text/plain'});
             response.writeHead('Hello World!');
           }).listen(1337, '127.0.0.1');




Saturday, September 17, 2011
Who’s Using NodeJS?    NewsCred




Saturday, September 17, 2011
Installing NodeJS                                              NewsCred



                  • Installing on Unix




                  • Installing on Windows
                        • Run http://nodejs.org/dist/v0.5.6/node.exe



Saturday, September 17, 2011
Installing npm                                                     NewsCred




                  • Node Package Manager (npm)

                  • One line install:
                        • curl http://npmjs.org/install.sh | sudo sh


                  • Multi-line install:
                        • Get the code from http://github.com/isaacs/npm
                        • Do what the REAMME says




Saturday, September 17, 2011
Part 2
           ExpressJS


                    NewsCred


Saturday, September 17, 2011
What’s ExpressJS?                                NewsCred




                                 ExpressJS
                               High-performance NodeJS
                                    web framework.




Saturday, September 17, 2011
Why ExpressJS?                                NewsCred




                  • Full blown feature set
                        • Routing
                        • View rendering/templating
                        • Sessions


                  • Good documentation
                        • Lots of examples


                  • Many extensions


Saturday, September 17, 2011
Installing ExpressJS   NewsCred




Saturday, September 17, 2011
Directory Structure    NewsCred




Saturday, September 17, 2011
Configuration          NewsCred




Saturday, September 17, 2011
Application Settings   NewsCred




Saturday, September 17, 2011
Routing                NewsCred




Saturday, September 17, 2011
View Rendering                                    NewsCred



                  • Haml templates
                        • Haml
                        • Jade


                  • Embedded JavaScript (EJS) templates

                  • Coffeekup templates
                        • Uses CoffeeScript


                  • jQuery templates

Saturday, September 17, 2011
Views with Jade        NewsCred




Saturday, September 17, 2011
Sessions                                                 NewsCred


                  • Currently cookie-based
                        • Data store can be Redis, memory etc.




Saturday, September 17, 2011
Packages                                  NewsCred




         $ npm install -d # for installing dependancies

Saturday, September 17, 2011
Resources                                                       NewsCred




                  • NodeJS
                        • http://nodejs.org
                        • http://github.com/dynamicguy/node-mongo-cms


                  • ExpressJS
                        • http://expressjs.com


                  • Sencha Connect
                        • http://github.com/senchalabs/connect/wiki




Saturday, September 17, 2011
Questions?                              NewsCred




                Iraj Islam
                iraj@newscred.com, @irajislam


                Nurul Ferdous
                nurul@newscred.com, @ferdous




Saturday, September 17, 2011

More Related Content

What's hot

Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
Arun Kumar Arjunan
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
Hüseyin BABAL
 
Nodejs getting started
Nodejs getting startedNodejs getting started
Nodejs getting started
Triet Ho
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
Colin Mackay
 
Nodejs
NodejsNodejs
Nodejs
Prem Sanil
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
Akshay Mathur
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystem
Yukti Kaura
 
Best node js course
Best node js courseBest node js course
Best node js course
bestonlinecoursescoupon
 
Node.js tutoria for beginner
Node.js tutoria for beginnerNode.js tutoria for beginner
Node.js tutoria for beginner
Maninder Singh
 
Use Node.js to create a REST API
Use Node.js to create a REST APIUse Node.js to create a REST API
Use Node.js to create a REST API
Fabien Vauchelles
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vikash Singh
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
Dinesh U
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
Edureka!
 
Introduction to node.js GDD
Introduction to node.js GDDIntroduction to node.js GDD
Introduction to node.js GDD
Sudar Muthu
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't
F5 Buddy
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
Arvind Devaraj
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7
Devang Garach
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)
Ashish Gupta
 

What's hot (20)

Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
Nodejs getting started
Nodejs getting startedNodejs getting started
Nodejs getting started
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
Nodejs
NodejsNodejs
Nodejs
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystem
 
Best node js course
Best node js courseBest node js course
Best node js course
 
Node.js tutoria for beginner
Node.js tutoria for beginnerNode.js tutoria for beginner
Node.js tutoria for beginner
 
Use Node.js to create a REST API
Use Node.js to create a REST APIUse Node.js to create a REST API
Use Node.js to create a REST API
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
 
Introduction to node.js GDD
Introduction to node.js GDDIntroduction to node.js GDD
Introduction to node.js GDD
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)
 

Viewers also liked

NodeJS
NodeJSNodeJS
NodeJS
.toster
 
How to scale and deploy NodeJS app
How to scale and deploy NodeJS appHow to scale and deploy NodeJS app
How to scale and deploy NodeJS app
Yacobus Reinhart
 
Nodejs introduce - using Socket.io
Nodejs introduce - using Socket.ioNodejs introduce - using Socket.io
Nodejs introduce - using Socket.io
Caesar Chi
 
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Valeri Karpov
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
Amit Thakkar
 
High Performance NodeJS
High Performance NodeJSHigh Performance NodeJS
High Performance NodeJS
Dicoding
 
Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?
Dinh Pham
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
Enoch Joshua
 
Nodejs Event Driven Concurrency for Web Applications
Nodejs Event Driven Concurrency for Web ApplicationsNodejs Event Driven Concurrency for Web Applications
Nodejs Event Driven Concurrency for Web Applications
Ganesh Iyer
 
Create Rest API in Nodejs
Create Rest API in Nodejs Create Rest API in Nodejs
Create Rest API in Nodejs
Irfan Maulana
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express
David Boyer
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
Visual Engineering
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
Apaichon Punopas
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with Examples
Gabriele Lana
 
Express node js
Express node jsExpress node js
Express node js
Yashprit Singh
 

Viewers also liked (16)

NodeJS
NodeJSNodeJS
NodeJS
 
How to scale and deploy NodeJS app
How to scale and deploy NodeJS appHow to scale and deploy NodeJS app
How to scale and deploy NodeJS app
 
Nodejs introduce - using Socket.io
Nodejs introduce - using Socket.ioNodejs introduce - using Socket.io
Nodejs introduce - using Socket.io
 
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
 
High Performance NodeJS
High Performance NodeJSHigh Performance NodeJS
High Performance NodeJS
 
Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
 
Nodejs Event Driven Concurrency for Web Applications
Nodejs Event Driven Concurrency for Web ApplicationsNodejs Event Driven Concurrency for Web Applications
Nodejs Event Driven Concurrency for Web Applications
 
Create Rest API in Nodejs
Create Rest API in Nodejs Create Rest API in Nodejs
Create Rest API in Nodejs
 
All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with Examples
 
All about NodeJS
All about NodeJSAll about NodeJS
All about NodeJS
 
Express node js
Express node jsExpress node js
Express node js
 

Similar to JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka

LoopBack: a productivity booster for MEAN
LoopBack: a productivity booster for MEANLoopBack: a productivity booster for MEAN
LoopBack: a productivity booster for MEAN
Miroslav Bajtoš
 
Lib uv node.js
Lib uv node.js Lib uv node.js
Lib uv node.js
Ben Crox
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
Cere Labs Pvt. Ltd
 
Open End To End Js Stack
Open End To End Js StackOpen End To End Js Stack
Open End To End Js Stack
Skills Matter
 
Get Lean with OSEE
Get Lean with OSEEGet Lean with OSEE
Get Lean with OSEE
Nirmal Sasidharan
 
Flowdock's full-text search with MongoDB
Flowdock's full-text search with MongoDBFlowdock's full-text search with MongoDB
Flowdock's full-text search with MongoDB
Flowdock
 
Meanstack overview
Meanstack overviewMeanstack overview
Meanstack overview
Adthasid Sabmake
 
GENIVI + OCF Cooperation
GENIVI + OCF CooperationGENIVI + OCF Cooperation
GENIVI + OCF Cooperation
Samsung Open Source Group
 
Node.JS briefly introduced
Node.JS briefly introducedNode.JS briefly introduced
Node.JS briefly introduced
Alexandre Lachèze
 
Building businesspost.ie using Node.js
Building businesspost.ie using Node.jsBuilding businesspost.ie using Node.js
Building businesspost.ie using Node.js
Richard Rodger
 
Solid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSSolid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJS
Rafael Casuso Romate
 
Node at artsy
Node at artsyNode at artsy
Node at artsy
Craig Spaeth
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
Valeri Karpov
 
JavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies TodayJavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies Today
Wesley Hales
 
Building Applications With the MEAN Stack
Building Applications With the MEAN StackBuilding Applications With the MEAN Stack
Building Applications With the MEAN Stack
Nir Noy
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
drupalcampest
 
Node.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About itNode.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About it
Fibonalabs
 
IPTC News in JSON November 2017
IPTC News in JSON November 2017IPTC News in JSON November 2017
IPTC News in JSON November 2017
Stuart Myles
 
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJSMeteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Julio Antonio Mendonça de Marins
 
The Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsThe Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.js
Nicholas Jansma
 

Similar to JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka (20)

LoopBack: a productivity booster for MEAN
LoopBack: a productivity booster for MEANLoopBack: a productivity booster for MEAN
LoopBack: a productivity booster for MEAN
 
Lib uv node.js
Lib uv node.js Lib uv node.js
Lib uv node.js
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
 
Open End To End Js Stack
Open End To End Js StackOpen End To End Js Stack
Open End To End Js Stack
 
Get Lean with OSEE
Get Lean with OSEEGet Lean with OSEE
Get Lean with OSEE
 
Flowdock's full-text search with MongoDB
Flowdock's full-text search with MongoDBFlowdock's full-text search with MongoDB
Flowdock's full-text search with MongoDB
 
Meanstack overview
Meanstack overviewMeanstack overview
Meanstack overview
 
GENIVI + OCF Cooperation
GENIVI + OCF CooperationGENIVI + OCF Cooperation
GENIVI + OCF Cooperation
 
Node.JS briefly introduced
Node.JS briefly introducedNode.JS briefly introduced
Node.JS briefly introduced
 
Building businesspost.ie using Node.js
Building businesspost.ie using Node.jsBuilding businesspost.ie using Node.js
Building businesspost.ie using Node.js
 
Solid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSSolid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJS
 
Node at artsy
Node at artsyNode at artsy
Node at artsy
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
 
JavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies TodayJavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies Today
 
Building Applications With the MEAN Stack
Building Applications With the MEAN StackBuilding Applications With the MEAN Stack
Building Applications With the MEAN Stack
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
 
Node.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About itNode.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About it
 
IPTC News in JSON November 2017
IPTC News in JSON November 2017IPTC News in JSON November 2017
IPTC News in JSON November 2017
 
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJSMeteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
 
The Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsThe Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.js
 

Recently uploaded

Interaction Latency: Square's User-Centric Mobile Performance Metric
Interaction Latency: Square's User-Centric Mobile Performance MetricInteraction Latency: Square's User-Centric Mobile Performance Metric
Interaction Latency: Square's User-Centric Mobile Performance Metric
ScyllaDB
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
Blockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre timesBlockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre times
anupriti
 
Lessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien RiouxLessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien Rioux
crioux1
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024
The Digital Insurer
 
K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024
The Digital Insurer
 
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum ThreatsNavigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
anupriti
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
Running a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU ImpactsRunning a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU Impacts
ScyllaDB
 
STKI Israeli Market Study 2024 final v1
STKI Israeli Market Study 2024 final  v1STKI Israeli Market Study 2024 final  v1
STKI Israeli Market Study 2024 final v1
Dr. Jimmy Schwarzkopf
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)
Alpen-Adria-Universität
 
AI_dev Europe 2024 - From OpenAI to Opensource AI
AI_dev Europe 2024 - From OpenAI to Opensource AIAI_dev Europe 2024 - From OpenAI to Opensource AI
AI_dev Europe 2024 - From OpenAI to Opensource AI
Raphaël Semeteys
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
Edge AI and Vision Alliance
 
What Not to Document and Why_ (North Bay Python 2024)
What Not to Document and Why_ (North Bay Python 2024)What Not to Document and Why_ (North Bay Python 2024)
What Not to Document and Why_ (North Bay Python 2024)
Margaret Fero
 

Recently uploaded (20)

Interaction Latency: Square's User-Centric Mobile Performance Metric
Interaction Latency: Square's User-Centric Mobile Performance MetricInteraction Latency: Square's User-Centric Mobile Performance Metric
Interaction Latency: Square's User-Centric Mobile Performance Metric
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
Blockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre timesBlockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre times
 
Lessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien RiouxLessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien Rioux
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024
 
K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024
 
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum ThreatsNavigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
Running a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU ImpactsRunning a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU Impacts
 
STKI Israeli Market Study 2024 final v1
STKI Israeli Market Study 2024 final  v1STKI Israeli Market Study 2024 final  v1
STKI Israeli Market Study 2024 final v1
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)
 
AI_dev Europe 2024 - From OpenAI to Opensource AI
AI_dev Europe 2024 - From OpenAI to Opensource AIAI_dev Europe 2024 - From OpenAI to Opensource AI
AI_dev Europe 2024 - From OpenAI to Opensource AI
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
 
What Not to Document and Why_ (North Bay Python 2024)
What Not to Document and Why_ (North Bay Python 2024)What Not to Document and Why_ (North Bay Python 2024)
What Not to Document and Why_ (North Bay Python 2024)
 

JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka

  • 1. NodeJS JS as a Server-side Language Iraj Islam @irajislam Nurul Ferdous @ferdous NewsCred Saturday, September 17, 2011
  • 2. Agenda NewsCred • Part 1. NodeJS • Part 2. ExpressJS • Questions? Saturday, September 17, 2011
  • 3. Who We Are NewsCred Iraj Islam CTO/Co-founder, NewsCred Nurul Ferdous Senior Software Engineer, NewsCred Saturday, September 17, 2011
  • 4. Part 1 NodeJS NewsCred Saturday, September 17, 2011
  • 5. Server-side JS NewsCred Saturday, September 17, 2011
  • 6. What’s NodeJS? NewsCred NodeJS What’s this all about? Saturday, September 17, 2011
  • 7. What’s NodeJS? NewsCred NodeJS Evented I/O for V8 JavaScript. Saturday, September 17, 2011
  • 8. What’s NodeJS? NewsCred Goal “Provide an easy way to build scalable network programs.” Saturday, September 17, 2011
  • 9. History NewsCred The Evolution of the Web From static pages to real time data. Saturday, September 17, 2011
  • 10. Why NodeJS? NewsCred The Age of Big Data Exabytes (1018) of data stored per year 1000 750 500 250 2006 2007 2008 0 2009 2010 Saturday, September 17, 2011
  • 11. Why NodeJS? NewsCred The Fast Food Analogy Synchronous vs. Asynchronous Saturday, September 17, 2011
  • 12. Why NodeJS? NewsCred The Apache Solution Synchronous I/O Application File User readFile(); System getTweets(); Twitter API writeToDb(); MySQL Saturday, September 17, 2011
  • 13. Why NodeJS? NewsCred The Apache Solution Blocking I/O Application File User readFile(); System Waiting... getTweets(); Twitter API Waiting... writeToDb(); MySQL Saturday, September 17, 2011
  • 14. Why NodeJS? NewsCred The NodeJS Solution Asynchronous I/O Application File User readFile(); System getTweets(); Twitter API writeToDb(); MySQL Saturday, September 17, 2011
  • 15. Why NodeJS? NewsCred The NodeJS Solution Non-blocking I/O Application File User readFile(); System getTweets(); Twitter API writeToDb(); MySQL Saturday, September 17, 2011
  • 16. NodeJS Benefits NewsCred • Fast • Built on top of Google’s V8 JavaScript engine. • Scalable • Asynchronous, event-driven I/O model yields web scale. • Programmable • JavaScript API and pluggable module architecture. Saturday, September 17, 2011
  • 17. NodeJS Use Cases NewsCred • Serving APIs • Serving real-time apps • Serving web apps • Streaming data Saturday, September 17, 2011
  • 18. NodeJS “Hello World!” NewsCred var http = require('http'); http.createServer(function (request, response) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.writeHead('Hello World!'); }).listen(1337, '127.0.0.1'); Saturday, September 17, 2011
  • 19. Who’s Using NodeJS? NewsCred Saturday, September 17, 2011
  • 20. Installing NodeJS NewsCred • Installing on Unix • Installing on Windows • Run http://nodejs.org/dist/v0.5.6/node.exe Saturday, September 17, 2011
  • 21. Installing npm NewsCred • Node Package Manager (npm) • One line install: • curl http://npmjs.org/install.sh | sudo sh • Multi-line install: • Get the code from http://github.com/isaacs/npm • Do what the REAMME says Saturday, September 17, 2011
  • 22. Part 2 ExpressJS NewsCred Saturday, September 17, 2011
  • 23. What’s ExpressJS? NewsCred ExpressJS High-performance NodeJS web framework. Saturday, September 17, 2011
  • 24. Why ExpressJS? NewsCred • Full blown feature set • Routing • View rendering/templating • Sessions • Good documentation • Lots of examples • Many extensions Saturday, September 17, 2011
  • 25. Installing ExpressJS NewsCred Saturday, September 17, 2011
  • 26. Directory Structure NewsCred Saturday, September 17, 2011
  • 27. Configuration NewsCred Saturday, September 17, 2011
  • 28. Application Settings NewsCred Saturday, September 17, 2011
  • 29. Routing NewsCred Saturday, September 17, 2011
  • 30. View Rendering NewsCred • Haml templates • Haml • Jade • Embedded JavaScript (EJS) templates • Coffeekup templates • Uses CoffeeScript • jQuery templates Saturday, September 17, 2011
  • 31. Views with Jade NewsCred Saturday, September 17, 2011
  • 32. Sessions NewsCred • Currently cookie-based • Data store can be Redis, memory etc. Saturday, September 17, 2011
  • 33. Packages NewsCred $ npm install -d # for installing dependancies Saturday, September 17, 2011
  • 34. Resources NewsCred • NodeJS • http://nodejs.org • http://github.com/dynamicguy/node-mongo-cms • ExpressJS • http://expressjs.com • Sencha Connect • http://github.com/senchalabs/connect/wiki Saturday, September 17, 2011
  • 35. Questions? NewsCred Iraj Islam iraj@newscred.com, @irajislam Nurul Ferdous nurul@newscred.com, @ferdous Saturday, September 17, 2011