SlideShare una empresa de Scribd logo
1 de 27
JavaScript on the
server
Node.Js
Logical Architecture RIA

Representation of data,           Subset of data
  interact with user            needed for the view

                               Handles events
                              and calls services

   Interface to the
      back-end
                               Classes, Business or
                                Application Logic
    Something QL-
        like
                                     Raw data,
                                  relational or not
Old Fashioned Setup


   XHTML                  browser




                           http
            PHP



             PHP
                           server

   MySQLi           PHP



            MySQL
Disadvantages Old Fashioned
Setup


 Mix of HTML and PHP
 Heavy HTTP traffic
Classical Setup


   HTML5           JSON
                          browser

     JavaScript/jQuery




                           http
            PHP



    PDO            POPO    server



           MySQL
Disadvantages Classical Setup



 Still need to learn different languages with a
  different development model
 PHP is on its return
Don’t put your money on PHP
Hacker News Survey (2012)   Job Offerings Dice.com (2012)
Python (3,054)              Java 17,599 (+8.96%)
Ruby (1,723)                XML 10,780 (+11.70%)
JavaScript (1,415)          JavaScript 10,738 (+11.64%)
C (970)
                            HTML 9,587 (-1.53%)
C# (829)
PHP (666)                   C# 9,293 (+17.04%)
Java (551)                  C++ 6,439 (+7.55%)
C++ (529)                   AJAX 5,142 (+15.81%)
Haskell (519)               Perl 5,107 (+3.21%)          Programming Book sales (2012)
Clojure (459)               PHP 3,717 (+23%)             1. Java
CoffeeScript (362)          Python 3,456 (+32.87%)       2. JavaScript
Objective C (326)           Ruby 2,141 (+39.03%)         3. C#
Lisp (322)
                            HTML5 2,035 (+276.85%)       4. Objective C
Perl (311)
Scala (233)                 Flash 1,261 (+95.2%)         5. C++
Scheme (190)                Silverlight 865 (-11.91%)    6. PHP
Other (188)                 COBOL 656 (-10.75%)          7. VBA
Erlang (162)                Assembler 209 (-1.42%)       8. Python
Lua (145)                   PowerBuilder 126 (-18.71%) 9. SQL
SQL (101)                   FORTRAN 45 (-33.82%)         10. ActionScript

          http://readwrite.com/2012/06/05/5-ways-to-tell-which-programming-lanugages-are-most-popular
Modern Setup


  HTML5                    JSON
                                  browser

      JavaScript/jQuery




                                            websockets
                                  http
              JavaScript



   Mongoose                JSON          server



              MongoDB
Advantages Modern Setup



 Only one development language: JavaScript
 Not only HTTP, WebSockets to the rescue
Disadvantages Modern Setup



 OO in JavaScript is doable but PHP syntax
  resembles Java/C# more
 Node hosting is harder to get than PHP hosting
 Node’s learning curve is more sheer compared
  to PHP
Node
Node.js in one slide



 Built On Chrome's JavaScript V8 Engine
 Node.js is a general-purpose JavaScript runtime
  with a host of powerful libraries -- one of which
  happens to provide an HTTP/HTTPS server
  implementation
 Node.js Is Object-Oriented
 Evented (Async) I/O
 Package Management with npm
Node Architecture




   http://www.gliffy.com/publish/2752090/
Node Modules



   Connect: Extensible HTTP server framework
   Socket.IO: WebSockets and Realtime
   Mocha: BDD/TDD Test Runner
   Express: Web Framework build on Connect
   JSLint, JSHint: JavaScript Quality Tools
   Jasmine: BDD/TDD Test Runner
   Mongoose: ODM for MongoDB
Node: Connect


var connect = require("connect”);
connect().
   use(connect.
      static(__dirname + "/../client")).
        listen(8000);
Node: Socket.IO


var io = require("socket.io").listen(1337);
io.sockets.on("connection", function (socket) {
   socket.on("saveNewPlayer", function (data)
   {
      console.log(data);
      socket.emit("saveReady");
   });
});
Node: Socket.IO


           Browser
           initiates




                 Server
                initiates
WebSockets vs HTTP




                                           Use case A: 1,000 clients

                                           Use case B: 10,000 clients

                                           Use case C: 100,000 clients




   http://www.websocket.org/quantum.html
StockQuote using XmlHttpRequest

Browser
initiates
StockQuote using WebSockets?



                                           Server
                                          initiates




      Too bad Yahoo does not support WebSockets yet 
Node: Write your own module
                  Use one or more other modules,
                       external or your own

var Player = require('../model/Player.js');
                                        Simple
                                      constructor
function EntityManager() {
   this.saveNewPlayer = function(name, club,
playerNumber, saveReadyFunction) {
      // do something cool here
   }
}          Let other modules know what
             we can do for them

module.exports = EntityManager;
Mongo
Mongo in one slide



   Stores data as bson (binary JSON)
   Console uses JavaScript and json
   3rd party GUI tools
   Database runs as an exe or Windows service
   Memory mapped so really needs 64bit OS
   User group on Google Groups [busy]
   Sharding for fast access and huge storage


       files.meetup.com/2313351/Mongo.pptx
Mongo Architecture
Mongoose
Mongoose in one slide



 “Mongoose is the 10gen-supported ODM for
  Node.js. It has a thriving open source community
  and includes advanced schema-based features
  such as async validation, casting, object life-
  cycle management, pseudo-joins, and rich query
  builder support.”
Mongoose example




  http://mongoosejs.com/index.html

Más contenido relacionado

La actualidad más candente

NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystemYukti Kaura
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.jsYoann Gotthilf
 
Beyond the MEAN Stack: Thinking Small with Node.js for the Enterprise
Beyond the MEAN Stack: Thinking Small with Node.js for the EnterpriseBeyond the MEAN Stack: Thinking Small with Node.js for the Enterprise
Beyond the MEAN Stack: Thinking Small with Node.js for the EnterpriseForrest Norvell
 
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
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJSHüseyin BABAL
 
GR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with GrailsGR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with GrailsGR8Conf
 
MongoDB and the MEAN Stack
MongoDB and the MEAN StackMongoDB and the MEAN Stack
MongoDB and the MEAN StackMongoDB
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make itJonathan Snook
 
Rapid API development examples for Impress Application Server / Node.js (jsfw...
Rapid API development examples for Impress Application Server / Node.js (jsfw...Rapid API development examples for Impress Application Server / Node.js (jsfw...
Rapid API development examples for Impress Application Server / Node.js (jsfw...Timur Shemsedinov
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platformSreenivas Kappala
 
JavaScript development methodology
JavaScript development methodologyJavaScript development methodology
JavaScript development methodologyAleksander Fabijan
 
Nodejs getting started
Nodejs getting startedNodejs getting started
Nodejs getting startedTriet Ho
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Luciano Mammino
 
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
 

La actualidad más candente (20)

Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
MongoDB and Node.js
MongoDB and Node.jsMongoDB and Node.js
MongoDB and Node.js
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystem
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.js
 
Beyond the MEAN Stack: Thinking Small with Node.js for the Enterprise
Beyond the MEAN Stack: Thinking Small with Node.js for the EnterpriseBeyond the MEAN Stack: Thinking Small with Node.js for the Enterprise
Beyond the MEAN Stack: Thinking Small with Node.js for the Enterprise
 
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
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
Grails and Neo4j
Grails and Neo4jGrails and Neo4j
Grails and Neo4j
 
GR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with GrailsGR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with Grails
 
MongoDB and the MEAN Stack
MongoDB and the MEAN StackMongoDB and the MEAN Stack
MongoDB and the MEAN Stack
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make it
 
Rapid API development examples for Impress Application Server / Node.js (jsfw...
Rapid API development examples for Impress Application Server / Node.js (jsfw...Rapid API development examples for Impress Application Server / Node.js (jsfw...
Rapid API development examples for Impress Application Server / Node.js (jsfw...
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
 
JavaScript development methodology
JavaScript development methodologyJavaScript development methodology
JavaScript development methodology
 
Nodejs getting started
Nodejs getting startedNodejs getting started
Nodejs getting started
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
 
Best node js course
Best node js courseBest node js course
Best node js course
 
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
 
Node.js and Ruby
Node.js and RubyNode.js and Ruby
Node.js and Ruby
 
Node js
Node jsNode js
Node js
 

Similar a JavaScript on the server - Node.js

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
 
End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013Alexandre Morgaut
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationJonathan Abrams
 
Playframework + Twitter Bootstrap
Playframework + Twitter BootstrapPlayframework + Twitter Bootstrap
Playframework + Twitter BootstrapKevingo Tsai
 
qooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkqooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkecker
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a bossFrancisco Ribeiro
 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesUdita Plaha
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascriptDsixE Inc
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitIMC Institute
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh Dasari
 
Why Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiWhy Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiJackson Tian
 
Why Node.js
Why Node.jsWhy Node.js
Why Node.jsguileen
 
Java @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPJava @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPIlan Salviano
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Arun Gupta
 

Similar a JavaScript on the server - Node.js (20)

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
 
End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig Presentation
 
Playframework + Twitter Bootstrap
Playframework + Twitter BootstrapPlayframework + Twitter Bootstrap
Playframework + Twitter Bootstrap
 
qooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkqooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Framework
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a boss
 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talk
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails Slides
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascript
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead
 
Why Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiWhy Nodejs Guilin Shanghai
Why Nodejs Guilin Shanghai
 
Why Node.js
Why Node.jsWhy Node.js
Why Node.js
 
Java @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPJava @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SP
 
Node.js 1, 2, 3
Node.js 1, 2, 3Node.js 1, 2, 3
Node.js 1, 2, 3
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009
 

Más de Rody Middelkoop

Integration and Unit Testing in Java using Test Doubles like mocks and stubs
Integration and Unit Testing in Java using Test Doubles like mocks and stubsIntegration and Unit Testing in Java using Test Doubles like mocks and stubs
Integration and Unit Testing in Java using Test Doubles like mocks and stubsRody Middelkoop
 
An agile mindset in education
An agile mindset in education An agile mindset in education
An agile mindset in education Rody Middelkoop
 
Eduscrum presentatie Scrum event 2016: Scrum als onderwijsaanpak
Eduscrum presentatie Scrum event 2016: Scrum als onderwijsaanpakEduscrum presentatie Scrum event 2016: Scrum als onderwijsaanpak
Eduscrum presentatie Scrum event 2016: Scrum als onderwijsaanpakRody Middelkoop
 
Pecha Kucha eduScrum Agile Education
Pecha Kucha eduScrum Agile EducationPecha Kucha eduScrum Agile Education
Pecha Kucha eduScrum Agile EducationRody Middelkoop
 
Unit Testing Android Applications
Unit Testing Android ApplicationsUnit Testing Android Applications
Unit Testing Android ApplicationsRody Middelkoop
 
Softwarekwaliteit in een ontwikkelstraat
Softwarekwaliteit in een ontwikkelstraatSoftwarekwaliteit in een ontwikkelstraat
Softwarekwaliteit in een ontwikkelstraatRody Middelkoop
 
DDOA = Software Craftmanship
DDOA = Software CraftmanshipDDOA = Software Craftmanship
DDOA = Software CraftmanshipRody Middelkoop
 
Back to the Future: Onderwijs van 1991 tot 2031
Back to the Future: Onderwijs van 1991 tot 2031Back to the Future: Onderwijs van 1991 tot 2031
Back to the Future: Onderwijs van 1991 tot 2031Rody Middelkoop
 
Scrum implemented in an educational context
Scrum implemented in an educational contextScrum implemented in an educational context
Scrum implemented in an educational contextRody Middelkoop
 
Pragmatic Model Driven Development In Java Using Smart Use Cases
Pragmatic Model Driven Development In Java Using Smart Use CasesPragmatic Model Driven Development In Java Using Smart Use Cases
Pragmatic Model Driven Development In Java Using Smart Use CasesRody Middelkoop
 
Scrum in informaticaonderwijs
Scrum in informaticaonderwijsScrum in informaticaonderwijs
Scrum in informaticaonderwijsRody Middelkoop
 
Saas: Software AND Service
Saas: Software AND ServiceSaas: Software AND Service
Saas: Software AND ServiceRody Middelkoop
 
Service Analysis And Design
Service Analysis And DesignService Analysis And Design
Service Analysis And DesignRody Middelkoop
 
Contract First Modeling Services Using Uml
Contract First Modeling Services Using UmlContract First Modeling Services Using Uml
Contract First Modeling Services Using UmlRody Middelkoop
 

Más de Rody Middelkoop (19)

Integration and Unit Testing in Java using Test Doubles like mocks and stubs
Integration and Unit Testing in Java using Test Doubles like mocks and stubsIntegration and Unit Testing in Java using Test Doubles like mocks and stubs
Integration and Unit Testing in Java using Test Doubles like mocks and stubs
 
An agile mindset in education
An agile mindset in education An agile mindset in education
An agile mindset in education
 
Themalunch scrum
Themalunch scrumThemalunch scrum
Themalunch scrum
 
Eduscrum presentatie Scrum event 2016: Scrum als onderwijsaanpak
Eduscrum presentatie Scrum event 2016: Scrum als onderwijsaanpakEduscrum presentatie Scrum event 2016: Scrum als onderwijsaanpak
Eduscrum presentatie Scrum event 2016: Scrum als onderwijsaanpak
 
Pecha Kucha eduScrum Agile Education
Pecha Kucha eduScrum Agile EducationPecha Kucha eduScrum Agile Education
Pecha Kucha eduScrum Agile Education
 
Unit Testing Android Applications
Unit Testing Android ApplicationsUnit Testing Android Applications
Unit Testing Android Applications
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
 
Softwarekwaliteit in een ontwikkelstraat
Softwarekwaliteit in een ontwikkelstraatSoftwarekwaliteit in een ontwikkelstraat
Softwarekwaliteit in een ontwikkelstraat
 
DDOA = Software Craftmanship
DDOA = Software CraftmanshipDDOA = Software Craftmanship
DDOA = Software Craftmanship
 
Back to the Future: Onderwijs van 1991 tot 2031
Back to the Future: Onderwijs van 1991 tot 2031Back to the Future: Onderwijs van 1991 tot 2031
Back to the Future: Onderwijs van 1991 tot 2031
 
Scrum implemented in an educational context
Scrum implemented in an educational contextScrum implemented in an educational context
Scrum implemented in an educational context
 
Ajax And JSON
Ajax And JSONAjax And JSON
Ajax And JSON
 
OO JavaScript
OO JavaScriptOO JavaScript
OO JavaScript
 
Pragmatic Model Driven Development In Java Using Smart Use Cases
Pragmatic Model Driven Development In Java Using Smart Use CasesPragmatic Model Driven Development In Java Using Smart Use Cases
Pragmatic Model Driven Development In Java Using Smart Use Cases
 
Scrum in informaticaonderwijs
Scrum in informaticaonderwijsScrum in informaticaonderwijs
Scrum in informaticaonderwijs
 
Saas: Software AND Service
Saas: Software AND ServiceSaas: Software AND Service
Saas: Software AND Service
 
Service Analysis And Design
Service Analysis And DesignService Analysis And Design
Service Analysis And Design
 
ORM JPA
ORM JPAORM JPA
ORM JPA
 
Contract First Modeling Services Using Uml
Contract First Modeling Services Using UmlContract First Modeling Services Using Uml
Contract First Modeling Services Using Uml
 

Último

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

JavaScript on the server - Node.js

  • 2. Logical Architecture RIA Representation of data, Subset of data interact with user needed for the view Handles events and calls services Interface to the back-end Classes, Business or Application Logic Something QL- like Raw data, relational or not
  • 3. Old Fashioned Setup XHTML browser http PHP PHP server MySQLi PHP MySQL
  • 4. Disadvantages Old Fashioned Setup  Mix of HTML and PHP  Heavy HTTP traffic
  • 5. Classical Setup HTML5 JSON browser JavaScript/jQuery http PHP PDO POPO server MySQL
  • 6. Disadvantages Classical Setup  Still need to learn different languages with a different development model  PHP is on its return
  • 7. Don’t put your money on PHP Hacker News Survey (2012) Job Offerings Dice.com (2012) Python (3,054) Java 17,599 (+8.96%) Ruby (1,723) XML 10,780 (+11.70%) JavaScript (1,415) JavaScript 10,738 (+11.64%) C (970) HTML 9,587 (-1.53%) C# (829) PHP (666) C# 9,293 (+17.04%) Java (551) C++ 6,439 (+7.55%) C++ (529) AJAX 5,142 (+15.81%) Haskell (519) Perl 5,107 (+3.21%) Programming Book sales (2012) Clojure (459) PHP 3,717 (+23%) 1. Java CoffeeScript (362) Python 3,456 (+32.87%) 2. JavaScript Objective C (326) Ruby 2,141 (+39.03%) 3. C# Lisp (322) HTML5 2,035 (+276.85%) 4. Objective C Perl (311) Scala (233) Flash 1,261 (+95.2%) 5. C++ Scheme (190) Silverlight 865 (-11.91%) 6. PHP Other (188) COBOL 656 (-10.75%) 7. VBA Erlang (162) Assembler 209 (-1.42%) 8. Python Lua (145) PowerBuilder 126 (-18.71%) 9. SQL SQL (101) FORTRAN 45 (-33.82%) 10. ActionScript http://readwrite.com/2012/06/05/5-ways-to-tell-which-programming-lanugages-are-most-popular
  • 8. Modern Setup HTML5 JSON browser JavaScript/jQuery websockets http JavaScript Mongoose JSON server MongoDB
  • 9. Advantages Modern Setup  Only one development language: JavaScript  Not only HTTP, WebSockets to the rescue
  • 10. Disadvantages Modern Setup  OO in JavaScript is doable but PHP syntax resembles Java/C# more  Node hosting is harder to get than PHP hosting  Node’s learning curve is more sheer compared to PHP
  • 11. Node
  • 12. Node.js in one slide  Built On Chrome's JavaScript V8 Engine  Node.js is a general-purpose JavaScript runtime with a host of powerful libraries -- one of which happens to provide an HTTP/HTTPS server implementation  Node.js Is Object-Oriented  Evented (Async) I/O  Package Management with npm
  • 13. Node Architecture http://www.gliffy.com/publish/2752090/
  • 14. Node Modules  Connect: Extensible HTTP server framework  Socket.IO: WebSockets and Realtime  Mocha: BDD/TDD Test Runner  Express: Web Framework build on Connect  JSLint, JSHint: JavaScript Quality Tools  Jasmine: BDD/TDD Test Runner  Mongoose: ODM for MongoDB
  • 15. Node: Connect var connect = require("connect”); connect(). use(connect. static(__dirname + "/../client")). listen(8000);
  • 16. Node: Socket.IO var io = require("socket.io").listen(1337); io.sockets.on("connection", function (socket) { socket.on("saveNewPlayer", function (data) { console.log(data); socket.emit("saveReady"); }); });
  • 17. Node: Socket.IO Browser initiates Server initiates
  • 18. WebSockets vs HTTP Use case A: 1,000 clients Use case B: 10,000 clients Use case C: 100,000 clients http://www.websocket.org/quantum.html
  • 20. StockQuote using WebSockets? Server initiates Too bad Yahoo does not support WebSockets yet 
  • 21. Node: Write your own module Use one or more other modules, external or your own var Player = require('../model/Player.js'); Simple constructor function EntityManager() { this.saveNewPlayer = function(name, club, playerNumber, saveReadyFunction) { // do something cool here } } Let other modules know what we can do for them module.exports = EntityManager;
  • 22. Mongo
  • 23. Mongo in one slide  Stores data as bson (binary JSON)  Console uses JavaScript and json  3rd party GUI tools  Database runs as an exe or Windows service  Memory mapped so really needs 64bit OS  User group on Google Groups [busy]  Sharding for fast access and huge storage files.meetup.com/2313351/Mongo.pptx
  • 26. Mongoose in one slide  “Mongoose is the 10gen-supported ODM for Node.js. It has a thriving open source community and includes advanced schema-based features such as async validation, casting, object life- cycle management, pseudo-joins, and rich query builder support.”
  • 27. Mongoose example http://mongoosejs.com/index.html