SlideShare a Scribd company logo
1 of 35
Download to read offline
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

Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJSHüseyin BABAL
 
Nodejs getting started
Nodejs getting startedNodejs getting started
Nodejs getting startedTriet 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 azureColin Mackay
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsAkshay 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 ecosystemYukti Kaura
 
Node.js tutoria for beginner
Node.js tutoria for beginnerNode.js tutoria for beginner
Node.js tutoria for beginnerManinder 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 APIFabien Vauchelles
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.jsDinesh 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 GDDSudar Muthu
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBhargav 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'tF5 Buddy
 
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 - Week7Devang 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

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 appYacobus Reinhart
 
Nodejs introduce - using Socket.io
Nodejs introduce - using Socket.ioNodejs introduce - using Socket.io
Nodejs introduce - using Socket.ioCaesar 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 nodejsAmit Thakkar
 
High Performance NodeJS
High Performance NodeJSHigh Performance NodeJS
High Performance NodeJSDicoding
 
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 beginnersEnoch 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 ApplicationsGanesh 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 ExpressDavid 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 Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with ExamplesGabriele Lana
 

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 MEANMiroslav Bajtoš
 
Lib uv node.js
Lib uv node.js Lib uv node.js
Lib uv node.js Ben Crox
 
Open End To End Js Stack
Open End To End Js StackOpen End To End Js Stack
Open End To End Js StackSkills Matter
 
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 MongoDBFlowdock
 
Building businesspost.ie using Node.js
Building businesspost.ie using Node.jsBuilding businesspost.ie using Node.js
Building businesspost.ie using Node.jsRichard Rodger
 
Solid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSSolid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSRafael Casuso Romate
 
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/2013Valeri 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 TodayWesley Hales
 
Building Applications With the MEAN Stack
Building Applications With the MEAN StackBuilding Applications With the MEAN Stack
Building Applications With the MEAN StackNir 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 itFibonalabs
 
IPTC News in JSON November 2017
IPTC News in JSON November 2017IPTC News in JSON November 2017
IPTC News in JSON November 2017Stuart 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 MeteorJSJulio 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.jsNicholas 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

Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 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