SlideShare uma empresa Scribd logo
1 de 28
Baixar para ler offline
The world of


Javascript
             Rapee Suveeranont
               Web Technology
False
popular
 belief
It’s some kind of JAVA


      No,
      Not in technological terms

   Syntax C
 Features Smalltalk
Buzz word JAVA
Performance is poor


  No,
  Getting better and better,
  at even faster speed
  2008 – 2010 Javascript engine war
  IE      7 →9 = 140X
  Firefox 3 → 4 = 10X
Performance is poor
Run (only) in browser


               No,
              it also run in
 Desktop, Mobile, Server,
RIA, Widgets, DB, OS and
              Documents
Javascript
  Today
We can do this,
var http = require('http');
http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello World¥n');
}).listen(8124, "127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/');



% node example.js Server running at http://127.0.0.1:8124/




 Here comes a web server!
Naked Javascript
   Pure programming language
   ECMAScript


   No standard library
   Not even document.write()


   No package management
   unlike PHP, Ruby, Python

   Many engines of choice
   Rhino, TraceMonkey, Nitro, Chakra, Carakan
Ecosystem
Ecosystem




ECMAScript     Language
Ecosystem




                     Objective-J
ActionScript                        JScript

Caja   Javascript                    QTScript
                                                Dialect
   WMLScript   Javascript OSA   Jscript.NET

                                                Language

         ECMAScript
Ecosystem




V8     Chakra
       Rhino Nitro
TraceMonkey Carakan   Engine




                      Dialect



                      Language
Ecosystem

   Browser RIA
Mobile DB OS Desktop
                       Platform
 Documents Widgets

                       Engine



                       Dialect

                       Language
Ecosystem

     Client      jQuery, Mootools, prototype
                 YUI, Dojo, Ext, SproutCore

   Server Narwhal, Jaxer, AppJet
            CommonJS, Node.js,
                                               Framework


Mobile App Phonegap
            Titanium,




                                               Platform



                                               Engine

                                               Dialect
                                               Language
Ecosystem

 AJAX JSON etc.
                      Others
MongoDB     CouchDB


                      Framework



                      Platform

                      Engine
                      Dialect
                      Language
At a glance
JSON. BSON.
      Very popular
                                 JSON + byte array
light, fast and readable
                                        (binary)
  compact data format

{
      'id': 99,
      'name': '高橋じゅん',
      'address': [
              {'country': 'JP', 'postcode': '144-0012'},
              {'country': 'TH', 'postcode': '10400'}
      ],
      'married': false
}
Appcelerator


Titanium
       Native iPhone/Android
     Cross-platform Framework
Titanium
Create native UI with tabs
 Titanium.UI.setBackgroundColor('#000');
 var tabGroup = Titanium.UI.createTabGroup({id:'tabGroup1'});
 var win1 = Titanium.UI.createWindow({id:'win1'});
 var tab1 = Titanium.UI.createTab({id:'tab1', window:win1});
 tabGroup.addTab(tab1);
 tabGroup.open();

Open built-in camera
 // Display phone’s camera
 Titanium.Media.showCamera({
        success: function(event) { ... },
        overlay: overlay,
        showControls: false,
        mediaTypes: Ti.Media.MEDIA_TYPE_PHOTO,
        autohide: false
 });
Node.jsServer-side application
 File system, HTTP, SSL, Net, DNS, datagram, process



Open socket and listen to incoming data
 var net = require('net');
 net.createServer(function (socket) {
     socket.write("Echo server¥r¥n");
     socket.on("data", function (data) {
         socket.write(data);
     });
 }).listen(8124, "127.0.0.1");
CommonJSSpecification of standard API for
             non-web application:
                CLI, Server, GUI

APIs:
           Module
           Package
           System
           Console
           Filesystem
           HTTP Client
           Encodings .. etc.
MongoDB
     NoSQL database with native Javascript query

SQL: WHERE x = y
> db.foo.find({
      $where : function() {
          return this.x == this.y;
      }
  })


OUTPUT: “Hello, Joe”
> db.eval(function(name) {
      return "Hello, “ + name;
  }, ["Joe"])
Why now?
It’s
 everywhere
                    Web
           HTML5+CSS+Javascript, RIA


                Platform
       Desktop, Mobile, Server, blah, blah, …


                  Device
PC, Netbook, Garakei, Smartphone, Tablet, Embedded
They’re
everywhere
 Web Developers
 Web Designers
 Easy to learn, transfer skills,
  and move to new platform
Cloud

Smartphone   RIA   Desktop
        WebApp

     Developers       Designers
Thank you

Mais conteúdo relacionado

Semelhante a World of javascript

Why Node.js
Why Node.jsWhy Node.js
Why Node.js
guileen
 
Bd conf sencha touch workshop
Bd conf sencha touch workshopBd conf sencha touch workshop
Bd conf sencha touch workshop
James Pearce
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
James Pearce
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
Behrad Zari
 
Cross platform mobile web apps
Cross platform mobile web appsCross platform mobile web apps
Cross platform mobile web apps
James Pearce
 
Building cross platform mobile web apps
Building cross platform mobile web appsBuilding cross platform mobile web apps
Building cross platform mobile web apps
James Pearce
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the rest
george.james
 

Semelhante a World of javascript (20)

An Introduction to Sencha Touch
An Introduction to Sencha TouchAn Introduction to Sencha Touch
An Introduction to Sencha Touch
 
Building Cross Platform Mobile Web Apps
Building Cross Platform Mobile Web AppsBuilding Cross Platform Mobile Web Apps
Building Cross Platform Mobile Web Apps
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
 
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
 
NodeJS
NodeJSNodeJS
NodeJS
 
Bd conf sencha touch workshop
Bd conf sencha touch workshopBd conf sencha touch workshop
Bd conf sencha touch workshop
 
A Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionA Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 Revolution
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 
Node.js vs Play Framework
Node.js vs Play FrameworkNode.js vs Play Framework
Node.js vs Play Framework
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
Building Cloud-Based Cross-Platform Mobile Web Apps
Building Cloud-Based Cross-Platform Mobile Web AppsBuilding Cloud-Based Cross-Platform Mobile Web Apps
Building Cloud-Based Cross-Platform Mobile Web Apps
 
Cross platform mobile web apps
Cross platform mobile web appsCross platform mobile web apps
Cross platform mobile web apps
 
Native Phone Development 101
Native Phone Development 101Native Phone Development 101
Native Phone Development 101
 
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
 
Building cross platform mobile web apps
Building cross platform mobile web appsBuilding cross platform mobile web apps
Building cross platform mobile web apps
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the rest
 
Introduction To Dot Net Siddhesh
Introduction To Dot Net SiddheshIntroduction To Dot Net Siddhesh
Introduction To Dot Net Siddhesh
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

World of javascript

  • 1. The world of Javascript Rapee Suveeranont Web Technology
  • 3. It’s some kind of JAVA No, Not in technological terms Syntax C Features Smalltalk Buzz word JAVA
  • 4. Performance is poor No, Getting better and better, at even faster speed 2008 – 2010 Javascript engine war IE 7 →9 = 140X Firefox 3 → 4 = 10X
  • 6. Run (only) in browser No, it also run in Desktop, Mobile, Server, RIA, Widgets, DB, OS and Documents
  • 8. We can do this, var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World¥n'); }).listen(8124, "127.0.0.1"); console.log('Server running at http://127.0.0.1:8124/'); % node example.js Server running at http://127.0.0.1:8124/ Here comes a web server!
  • 9. Naked Javascript Pure programming language ECMAScript No standard library Not even document.write() No package management unlike PHP, Ruby, Python Many engines of choice Rhino, TraceMonkey, Nitro, Chakra, Carakan
  • 12. Ecosystem Objective-J ActionScript JScript Caja Javascript QTScript Dialect WMLScript Javascript OSA Jscript.NET Language ECMAScript
  • 13. Ecosystem V8 Chakra Rhino Nitro TraceMonkey Carakan Engine Dialect Language
  • 14. Ecosystem Browser RIA Mobile DB OS Desktop Platform Documents Widgets Engine Dialect Language
  • 15. Ecosystem Client jQuery, Mootools, prototype YUI, Dojo, Ext, SproutCore Server Narwhal, Jaxer, AppJet CommonJS, Node.js, Framework Mobile App Phonegap Titanium, Platform Engine Dialect Language
  • 16. Ecosystem AJAX JSON etc. Others MongoDB CouchDB Framework Platform Engine Dialect Language
  • 18. JSON. BSON. Very popular JSON + byte array light, fast and readable (binary) compact data format { 'id': 99, 'name': '高橋じゅん', 'address': [ {'country': 'JP', 'postcode': '144-0012'}, {'country': 'TH', 'postcode': '10400'} ], 'married': false }
  • 19. Appcelerator Titanium Native iPhone/Android Cross-platform Framework
  • 20. Titanium Create native UI with tabs Titanium.UI.setBackgroundColor('#000'); var tabGroup = Titanium.UI.createTabGroup({id:'tabGroup1'}); var win1 = Titanium.UI.createWindow({id:'win1'}); var tab1 = Titanium.UI.createTab({id:'tab1', window:win1}); tabGroup.addTab(tab1); tabGroup.open(); Open built-in camera // Display phone’s camera Titanium.Media.showCamera({ success: function(event) { ... }, overlay: overlay, showControls: false, mediaTypes: Ti.Media.MEDIA_TYPE_PHOTO, autohide: false });
  • 21. Node.jsServer-side application File system, HTTP, SSL, Net, DNS, datagram, process Open socket and listen to incoming data var net = require('net'); net.createServer(function (socket) { socket.write("Echo server¥r¥n"); socket.on("data", function (data) { socket.write(data); }); }).listen(8124, "127.0.0.1");
  • 22. CommonJSSpecification of standard API for non-web application: CLI, Server, GUI APIs: Module Package System Console Filesystem HTTP Client Encodings .. etc.
  • 23. MongoDB NoSQL database with native Javascript query SQL: WHERE x = y > db.foo.find({ $where : function() { return this.x == this.y; } }) OUTPUT: “Hello, Joe” > db.eval(function(name) { return "Hello, “ + name; }, ["Joe"])
  • 25. It’s everywhere Web HTML5+CSS+Javascript, RIA Platform Desktop, Mobile, Server, blah, blah, … Device PC, Netbook, Garakei, Smartphone, Tablet, Embedded
  • 26. They’re everywhere Web Developers Web Designers Easy to learn, transfer skills, and move to new platform
  • 27. Cloud Smartphone RIA Desktop WebApp Developers Designers