SlideShare une entreprise Scribd logo
1  sur  41
Télécharger pour lire hors ligne
MOBILE WEB
5.0
Michael Galpin, eBay
WHO AM I?
               Michael Galpin

       Mobile Architect, eBay

       Android & Mobile Web

   Author, Android in Practice

                   @michaelg
WHY?
Mobile is the new HOTness
MO BILE
W   E   B
            THE IPHONE MYTH
MO BILE     2 BIRDS, 1
            STONE?
W   E   B
MO BILE
            ONE WEBKIT TO
W   E   B
            RULE THEM
            ALL?
MO BILE
            ONE WEBKIT TO
W   E   B
            RULE THEM
            ALL?



            Android 2.2.1   iOS 4.1
MOBILE
            PARTY LIKE IT’S
W   E   B
            2022
WHAT?
WHAT ABOUT?
OMG! VIDEO TAG!!!
HTML
JavaScript



HTML
         CSS 3.0
MO BILE
            JUST ADD
W   E   B
            VIEWPORT?
HOW?
MO BILE
W   E   B   GEOLOCATION
              geocoder = new google.maps.Geocoder();
              if (navigator.geolocation){
                  var gps = navigator.geolocation;
                  gps.getCurrentPosition(function(pos){
                      var latLng = new google.maps.LatLng(pos.coords.latitude,pos.coords.longitude);
                      var opts = {zoom:12, center:latLng, mapTypeId: google.maps.MapTypeId.ROADMAP};
                      map = new google.maps.Map($("map_canvas"), opts);
                      theUser = new google.maps.Marker({
                          position: latLng,
                          map: map,
                          title: "You!"
                      });
                  });
                  trackerId = gps.watchPosition(function(pos){
                      var latLng = new google.maps.LatLng(pos.coords.latitude,pos.coords.longitude);
                      map.setCenter(latLng);
                      theUser.setPosition(latLng);
                  });
              }
MO BILE
W   E   B     GEOLOCATION
        OS/Browser   Status/Version

                     3.0

                     2.0

                     6.0

                     X

                     X
MO BILE
W   E   B   DOM STORAGE
              if (window.localStorage){
                  localStorage.setItem("tweet" + tweet.id, JSON.stringify(tweet));
                  var index = localStorage.getItem("index::" + keyword);
                  if (index){
                      index = JSON.parse(index);
                  } else {
                      index = [];
                  }
                  index.push(tweet.id);
                  localStorage.setItem("index::"+keyword, JSON.stringify(index));
              }
MO BILE
W   E   B   DOM STORAGE
              if (window.localStorage){
                  localStorage.setItem("tweet" + tweet.id, JSON.stringify(tweet));
                  var index = localStorage.getItem("index::" + keyword);
                  if (index){
                      index = JSON.parse(index);
                  } else {
                      index = [];
                  }
                  index.push(tweet.id);
                  localStorage.setItem("index::"+keyword, JSON.stringify(index));
              }
MO BILE
W   E   B     DOM STORAGE
        OS/Browser   Status/Version

                     3.0

                     2.0

                     6.0

                     7.0

                     X
MO BILE
W   E   B   WEB WORKERS
                 var worker = new Worker("details.js");
                 worker.onmessage = function(message){
                     var responseXmlStr = message.data.responseXml;
                     var itemDetails = parseFromXml(responseXmlStr);
                     if (window.localStorage){
                         localStorage.setItem(itemDetails.id, responseXmlStr);
                     }
                     dealDetails[itemDetails.id] = itemDetails;
                 };
                 worker.postMessage(item.itemId);




                 onmessage = function(message){
                     var itemId = message.data;
                     var xhr = new XMLHttpRequest();
                     xhr.onreadystatechange = function(){
                         if (this.readyState == 4 && this.status == 200){
                             postMessage({responseXml: this.responseText});
                         }
                     };
                     var urlStr = generateUrl(itemId);
                     xhr.open("GET", "proxy?url=" + escape(urlStr));
                     xhr.send(null);
                 }
MO BILE
W   E   B     WEB WORKERS
        OS/Browser   Status/Version

                     X

                     2.0

                     6.0

                     X

                     X
MO BILE
W   E   B   WEBSOCKET
                    if (window.WebSocket){
                        var conn = new WebSocket("ws://my.server.com/socket");
                        conn.onopen = function(){
                            setStatusMessage('connecting...');
                            conn.send('connect');
                        };
                        conn.onmessage = function(msg){
                            setStatusMessage('connected');
                            updateItemStatus(JSON.parse(msg.data));
                        };
                a
            at




                        conn.onerror = function(err){
            D




                            showError(err);
                            conn.close();
                        };
                        conn.onclose = function(evt){
                            setStatusMessage('connection closed');
                        };
                    }
MO BILE
W   E   B     WEBSOCKET
        OS/Browser   Status/Version

                     4.2b

                     X

                     X

                     X

                     X
MOBILE
W   E   B   CANVAS
               var ctx = $("graph").getContext("2d");
               ctx.font = "bold 12px sans-serif";
               ctx.textAlign = "start";
               for (i=0;i<data.length;i++){
                   ctx.fillStyle = "rgba(0, 0, 200, 0.9)";
                   ctx.fillRect(x, maxHeight - (data[i][report.y] / 2), width,
                       (data[i][report.y] / 2));
                   ctx.fillStyle = "rgba(0, 0, 0, 0.9)";
                   ctx.fillText(data[i][report.x], x + (width / 4),
                       maxHeight + 15);
                   x += width + buffer;
               }
               ctx.moveTo(axisBuffer, maxHeight);
               ctx.lineTo(axisBuffer+maxWidth, maxHeight);
               ctx.strokeStyle = "black";
               ctx.stroke();
               ctx.moveTo(axisBuffer,0);
               ctx.lineTo(axisBuffer,maxHeight);
               ctx.stroke();
MO BILE
W   E   B     CANVAS
        OS/Browser   Status/Version

                     1.0

                     1.0

                     6.0

                     X

                     v2
MOBILE
W   E   B   CSS 3.0

                $("formSection").style["-webkit-transform"] = "rotateZ(-5deg)";
                $("formSection").style["-webkit-transition"] =
                    "-webkit-transform 2s ease-in-out";
                $("rtBtn").innerHTML = "Undo";
                $("rtBtn").onclick = function() {
                    $("formSection").style["-webkit-transform"] = "";
                    $("rtBtn").innerHTML = "Rotate";
                    $("rtBtn").setAttribute("onclick", "rotate()");
                }
MORE CSS 3.0
                                                     .abc {
tr:nth-child(4n+1) { color: navy; }                       border: 1px solid #000;
tr:nth-child(4n+2) { color: green; }                      border-radius: 9px;
tr:nth-child(4n+3) { color: maroon; }                     -webkit-column-count:4;
tr:nth-child(4n+4) { color: purple; }                     -webkit-column-rule: 1px solid #a00;
header > h1{                                              -webkit-column-gap: 0.75em;
    color: yellow;                                   }
    background: -webkit-gradient(linear, left top,   h2 {
        left bottom, from(blue), to(white))               -webkit-text-fill-color: blue;
}                                                         -webkit-text-stroke-color: yellow;
.xyz{                                                     -webkit-text-stroke-width: 1.5px;
    text-shadow: #6374AB 4px -4px 2px;                    background: -webkit-gradient(radial, 430 50, 0,
    overflow: hidden;                                         430 50, 200, from(red), to(#000));
    text-overflow: ellipsis;                              -webkit-box-reflect:below 5px -webkit-gradient(
    border: 1px solid #bbb;                                   linear, left top, left bottom,
    border-radius: 9px;                                       from(transparent),
    background-color: #fff;                                   color-stop(0.5, transparent), to(white));
}                                                    }
MO BILE
W   E   B     CSS 3.0
        OS/Browser   Status/Version

                     3.0

                     2.0

                     X

                     X

                     X
MO BILE
            APPLICATION
W   E   B
            CACHE  <!DOCTYPE html>
                   <html manifest="manifest.mf">
                   <head>
                       <!-- ... -->
                   </head>
                   <body>
                       <!-- ... -->
                   </body>
                   </html>




                   CACHE MANIFEST
                   # Version 0.2
                   CACHE:
                   offline.html
                   json2.js
                   /images/gym.jpg
                   /images/soccer.jpg
                   /images/online.jpg

                   NETWORK:
                   http://search.twitter.com/
MO BILE
W   E   B     APPLICATION
        OS/Browser   Status/Version

                     2.0

                     2.0

                     6.0

                     X

                     X
DEVICE
MOBILE
W   E   B


              if (navigator.device.captureImage){
                  device.captureImage(function(data){
                      var file = data[0];
                      var xhr = new XMLHttpRequest();
                      xhr.upload.addEventListener("progress", function(e) {
                          if (e.lengthComputable) {
                              var percentage = Math.round((e.loaded * 100) / e.total);
                              updateStatusBar(percentage);
                          }
                      }, false);
                      xhr.open("POST", "http://my.server.com/upload");
                      xhr.overrideMimeType('text/plain; charset=x-user-defined-binary');
                      xhr.sendAsBinary(file.getAsBinary());
                  });
              }
MO BILE
W   E   B     DEVICE
        OS/Browser     Status/Version

                       X

                       3.0

                       X

                       X

                       X
MO BILE
W   E   B   TOUCH EVENTS
                 logo.ontouchmove = function(event){
                     if (event.touches.length == 1){
                         event.preventDefault();
                         var touch = event.touches[0];
                         var node = touch.target;
                         node.style.position = "absolute";
                         node.style.left = touch.pageX + "px";
                         node.style.top = touch.pageY + "px";
                     }
                 }

                 var angle = 0;
                 logo.ongesturechange = function(event){
                     var node = event.target;
                     node.style.webkitTransform = "rotate("+
                         ((angle + event.rotation) % 360)+"deg)";
                 }
                 logo.ongestureend = function(event){
                     angle = (angle + event.rotation) % 360;
                 }
MO BILE
W   E   B     TOUCH EVENTS
        OS/Browser   Status/Version

                     2.0

                     1.0

                     6.0?

                     X

                     X
MO BILE
W   E   B   AUDIO/VIDEO

                  <video controls="controls" preload="true"
                      width="720" height="640">
                      <source src="feature.ogg" type="video/ogg" />
                      <source src="feature.mp4" type="video/mp4" />
                      Your browser sucks
                  </video>
MO BILE
W   E   B     AUDIO/VIDEO
        OS/Browser   Status/Version

                     1.0

                     2.0

                     X

                     X

                     X
MO BILE
W   E   B   META
                   <meta name="viewport" content="width=device-width; user-
                   scalable=no;"/>
                   <meta name="apple-touch-fullscreen" content="YES" />
                   <meta name="apple-mobile-web-app-capable" content="yes" />
                   <meta name="apple-mobile-web-app-status-bar-style"
                   content="black" />
                   <link rel="apple-touch-icon" href="rice-and-bones.png"/>
NO REALLY,
HOW?
MOBILE
                 BEST
W   E       B
                 PRACTICES
        •   Servers are for data

        •   Orientation matters

        •   Cache, cache, cache

        •   Frameworks (not really mobile): SproutCore, Cappuccino

        •   Frameworks (mobile): Sencha, jQTouch

Contenu connexe

Tendances

Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."sjabs
 
はじめてのMongoDB
はじめてのMongoDBはじめてのMongoDB
はじめてのMongoDBTakahiro Inoue
 
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)MongoSF
 
SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)Darwin Durand
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventasDAYANA RETO
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on AndroidSven Haiges
 
Mongoskin - Guilin
Mongoskin - GuilinMongoskin - Guilin
Mongoskin - GuilinJackson Tian
 
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know Norberto Leite
 
Visual Studio.Net - Sql Server
Visual Studio.Net - Sql ServerVisual Studio.Net - Sql Server
Visual Studio.Net - Sql ServerDarwin Durand
 
Map/Confused? A practical approach to Map/Reduce with MongoDB
Map/Confused? A practical approach to Map/Reduce with MongoDBMap/Confused? A practical approach to Map/Reduce with MongoDB
Map/Confused? A practical approach to Map/Reduce with MongoDBUwe Printz
 
mobl presentation @ IHomer
mobl presentation @ IHomermobl presentation @ IHomer
mobl presentation @ IHomerzefhemel
 
MongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() OutputMongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() OutputMongoDB
 
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERDarwin Durand
 
Introduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genIntroduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genMongoDB
 
Mongo db modifiers
Mongo db modifiersMongo db modifiers
Mongo db modifierszarigatongy
 

Tendances (20)

Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
Kamil Chmielewski, Jacek Juraszek - "Hadoop. W poszukiwaniu złotego młotka."
 
はじめてのMongoDB
はじめてのMongoDBはじめてのMongoDB
はじめてのMongoDB
 
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
 
SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventas
 
Indexing
IndexingIndexing
Indexing
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on Android
 
Mongoskin - Guilin
Mongoskin - GuilinMongoskin - Guilin
Mongoskin - Guilin
 
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know
 
Visual Studio.Net - Sql Server
Visual Studio.Net - Sql ServerVisual Studio.Net - Sql Server
Visual Studio.Net - Sql Server
 
ABCD firebase
ABCD firebaseABCD firebase
ABCD firebase
 
Map/Confused? A practical approach to Map/Reduce with MongoDB
Map/Confused? A practical approach to Map/Reduce with MongoDBMap/Confused? A practical approach to Map/Reduce with MongoDB
Map/Confused? A practical approach to Map/Reduce with MongoDB
 
Grails UI Primer
Grails UI PrimerGrails UI Primer
Grails UI Primer
 
mobl presentation @ IHomer
mobl presentation @ IHomermobl presentation @ IHomer
mobl presentation @ IHomer
 
MongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() OutputMongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() Output
 
BVJS
BVJSBVJS
BVJS
 
Baitap tkw
Baitap tkwBaitap tkw
Baitap tkw
 
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
 
Introduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genIntroduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10gen
 
Mongo db modifiers
Mongo db modifiersMongo db modifiers
Mongo db modifiers
 

En vedette

JSX - 公開から1年を迎えて
JSX - 公開から1年を迎えてJSX - 公開から1年を迎えて
JSX - 公開から1年を迎えてKazuho Oku
 
Bull Snakes by Marcus Barraza
Bull Snakes by Marcus BarrazaBull Snakes by Marcus Barraza
Bull Snakes by Marcus Barrazavebrya
 
Corey Makes Healthcare - Coordinate, Efficient and Mobile
Corey Makes Healthcare - Coordinate, Efficient and MobileCorey Makes Healthcare - Coordinate, Efficient and Mobile
Corey Makes Healthcare - Coordinate, Efficient and MobileChandra Shekhar Tekwani
 
Black Footed Fettet by Kirsten
Black  Footed Fettet by KirstenBlack  Footed Fettet by Kirsten
Black Footed Fettet by Kirstenvebrya
 
'Fotografia privata' su Web: microstorie del Novecento
'Fotografia privata' su Web: microstorie del Novecento'Fotografia privata' su Web: microstorie del Novecento
'Fotografia privata' su Web: microstorie del Novecentostefanogambari
 
We b development trends
We b  development  trendsWe b  development  trends
We b development trendsRajib Ahmed
 
Is social media a fixture or fad in latin american politics
Is social media a fixture or fad in latin american politicsIs social media a fixture or fad in latin american politics
Is social media a fixture or fad in latin american politicsLucas Lanza
 
Twitter For Business
Twitter For BusinessTwitter For Business
Twitter For BusinessLara Kretler
 
Livelli Essenziali Di Qualita’ Dell’Integrazione. Dario Ianes. Edizioni Erick...
Livelli Essenziali Di Qualita’ Dell’Integrazione. Dario Ianes. Edizioni Erick...Livelli Essenziali Di Qualita’ Dell’Integrazione. Dario Ianes. Edizioni Erick...
Livelli Essenziali Di Qualita’ Dell’Integrazione. Dario Ianes. Edizioni Erick...www.erickson.it
 
電腦網路 網路安全
電腦網路 網路安全電腦網路 網路安全
電腦網路 網路安全bruce761207
 
Competency Based Educ@tion
Competency Based Educ@tionCompetency Based Educ@tion
Competency Based Educ@tionMartin Rehm
 
Core Skills for Content Administrators
Core Skills for Content AdministratorsCore Skills for Content Administrators
Core Skills for Content AdministratorsGraham Tillotson
 
Tablet ecosystem in_india-facts_&_figures
Tablet ecosystem in_india-facts_&_figuresTablet ecosystem in_india-facts_&_figures
Tablet ecosystem in_india-facts_&_figuresAmit Ambastha
 
Upping engagement with digital resources
Upping engagement with digital resourcesUpping engagement with digital resources
Upping engagement with digital resourcesLis Parcell
 
A Long Walk to Water: Lesson17 unit2
A Long Walk to Water: Lesson17 unit2A Long Walk to Water: Lesson17 unit2
A Long Walk to Water: Lesson17 unit2Terri Weiss
 
Brand>ing You - Adrian Mironescu ( Idegrafo ) mart'10, GeekMeet Iasi
Brand>ing You -  Adrian Mironescu ( Idegrafo ) mart'10, GeekMeet IasiBrand>ing You -  Adrian Mironescu ( Idegrafo ) mart'10, GeekMeet Iasi
Brand>ing You - Adrian Mironescu ( Idegrafo ) mart'10, GeekMeet IasiAdrian Mironescu
 
cyREST: Cytoscape as a Service
cyREST: Cytoscape as a ServicecyREST: Cytoscape as a Service
cyREST: Cytoscape as a ServiceKeiichiro Ono
 

En vedette (20)

FlorilèGe
FlorilèGeFlorilèGe
FlorilèGe
 
JSX - 公開から1年を迎えて
JSX - 公開から1年を迎えてJSX - 公開から1年を迎えて
JSX - 公開から1年を迎えて
 
Bull Snakes by Marcus Barraza
Bull Snakes by Marcus BarrazaBull Snakes by Marcus Barraza
Bull Snakes by Marcus Barraza
 
Corey Makes Healthcare - Coordinate, Efficient and Mobile
Corey Makes Healthcare - Coordinate, Efficient and MobileCorey Makes Healthcare - Coordinate, Efficient and Mobile
Corey Makes Healthcare - Coordinate, Efficient and Mobile
 
Black Footed Fettet by Kirsten
Black  Footed Fettet by KirstenBlack  Footed Fettet by Kirsten
Black Footed Fettet by Kirsten
 
Suisse
SuisseSuisse
Suisse
 
'Fotografia privata' su Web: microstorie del Novecento
'Fotografia privata' su Web: microstorie del Novecento'Fotografia privata' su Web: microstorie del Novecento
'Fotografia privata' su Web: microstorie del Novecento
 
We b development trends
We b  development  trendsWe b  development  trends
We b development trends
 
Is social media a fixture or fad in latin american politics
Is social media a fixture or fad in latin american politicsIs social media a fixture or fad in latin american politics
Is social media a fixture or fad in latin american politics
 
1.1 Sg Key
1.1 Sg Key1.1 Sg Key
1.1 Sg Key
 
Twitter For Business
Twitter For BusinessTwitter For Business
Twitter For Business
 
Livelli Essenziali Di Qualita’ Dell’Integrazione. Dario Ianes. Edizioni Erick...
Livelli Essenziali Di Qualita’ Dell’Integrazione. Dario Ianes. Edizioni Erick...Livelli Essenziali Di Qualita’ Dell’Integrazione. Dario Ianes. Edizioni Erick...
Livelli Essenziali Di Qualita’ Dell’Integrazione. Dario Ianes. Edizioni Erick...
 
電腦網路 網路安全
電腦網路 網路安全電腦網路 網路安全
電腦網路 網路安全
 
Competency Based Educ@tion
Competency Based Educ@tionCompetency Based Educ@tion
Competency Based Educ@tion
 
Core Skills for Content Administrators
Core Skills for Content AdministratorsCore Skills for Content Administrators
Core Skills for Content Administrators
 
Tablet ecosystem in_india-facts_&_figures
Tablet ecosystem in_india-facts_&_figuresTablet ecosystem in_india-facts_&_figures
Tablet ecosystem in_india-facts_&_figures
 
Upping engagement with digital resources
Upping engagement with digital resourcesUpping engagement with digital resources
Upping engagement with digital resources
 
A Long Walk to Water: Lesson17 unit2
A Long Walk to Water: Lesson17 unit2A Long Walk to Water: Lesson17 unit2
A Long Walk to Water: Lesson17 unit2
 
Brand>ing You - Adrian Mironescu ( Idegrafo ) mart'10, GeekMeet Iasi
Brand>ing You -  Adrian Mironescu ( Idegrafo ) mart'10, GeekMeet IasiBrand>ing You -  Adrian Mironescu ( Idegrafo ) mart'10, GeekMeet Iasi
Brand>ing You - Adrian Mironescu ( Idegrafo ) mart'10, GeekMeet Iasi
 
cyREST: Cytoscape as a Service
cyREST: Cytoscape as a ServicecyREST: Cytoscape as a Service
cyREST: Cytoscape as a Service
 

Similaire à Mobile Web 5.0

NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryAlexandre Morgaut
 
Average- An android project
Average- An android projectAverage- An android project
Average- An android projectIpsit Dash
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web developmentJohannes Brodwall
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensionserwanl
 
Websockets talk at Rubyconf Uruguay 2010
Websockets talk at Rubyconf Uruguay 2010Websockets talk at Rubyconf Uruguay 2010
Websockets talk at Rubyconf Uruguay 2010Ismael Celis
 
MySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of ThingsMySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of ThingsAlexander Rubin
 
jQuery Datatables With MongDb
jQuery Datatables With MongDbjQuery Datatables With MongDb
jQuery Datatables With MongDbsliimohara
 
! Modernizr v2.0.6 httpwww.modernizr.com Copyri.docx
!  Modernizr v2.0.6  httpwww.modernizr.com   Copyri.docx!  Modernizr v2.0.6  httpwww.modernizr.com   Copyri.docx
! Modernizr v2.0.6 httpwww.modernizr.com Copyri.docxMARRY7
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology updateDoug Domeny
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Matthew Groves
 
Full Stack Development with Node.js and NoSQL
Full Stack Development with Node.js and NoSQLFull Stack Development with Node.js and NoSQL
Full Stack Development with Node.js and NoSQLAll Things Open
 
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017Codemotion
 
Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile servicesAymeric Weinbach
 
WebSocket JSON Hackday
WebSocket JSON HackdayWebSocket JSON Hackday
WebSocket JSON HackdaySomay Nakhal
 
kissy-past-now-future
kissy-past-now-futurekissy-past-now-future
kissy-past-now-futureyiming he
 
KISSY 的昨天、今天与明天
KISSY 的昨天、今天与明天KISSY 的昨天、今天与明天
KISSY 的昨天、今天与明天tblanlan
 
Creating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of todayCreating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of todaygerbille
 
Ajax for dummies, and not only.
Ajax for dummies, and not only.Ajax for dummies, and not only.
Ajax for dummies, and not only.Nerd Tzanetopoulos
 

Similaire à Mobile Web 5.0 (20)

NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love Story
 
Average- An android project
Average- An android projectAverage- An android project
Average- An android project
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web development
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
Websockets talk at Rubyconf Uruguay 2010
Websockets talk at Rubyconf Uruguay 2010Websockets talk at Rubyconf Uruguay 2010
Websockets talk at Rubyconf Uruguay 2010
 
MySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of ThingsMySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of Things
 
jQuery Datatables With MongDb
jQuery Datatables With MongDbjQuery Datatables With MongDb
jQuery Datatables With MongDb
 
! Modernizr v2.0.6 httpwww.modernizr.com Copyri.docx
!  Modernizr v2.0.6  httpwww.modernizr.com   Copyri.docx!  Modernizr v2.0.6  httpwww.modernizr.com   Copyri.docx
! Modernizr v2.0.6 httpwww.modernizr.com Copyri.docx
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology update
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017
 
Full Stack Development with Node.js and NoSQL
Full Stack Development with Node.js and NoSQLFull Stack Development with Node.js and NoSQL
Full Stack Development with Node.js and NoSQL
 
mobl
moblmobl
mobl
 
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
 
Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile services
 
WebSocket JSON Hackday
WebSocket JSON HackdayWebSocket JSON Hackday
WebSocket JSON Hackday
 
Web 11 | AJAX + JSON + PHP
Web 11 | AJAX + JSON + PHPWeb 11 | AJAX + JSON + PHP
Web 11 | AJAX + JSON + PHP
 
kissy-past-now-future
kissy-past-now-futurekissy-past-now-future
kissy-past-now-future
 
KISSY 的昨天、今天与明天
KISSY 的昨天、今天与明天KISSY 的昨天、今天与明天
KISSY 的昨天、今天与明天
 
Creating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of todayCreating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of today
 
Ajax for dummies, and not only.
Ajax for dummies, and not only.Ajax for dummies, and not only.
Ajax for dummies, and not only.
 

Plus de Michael Galpin

Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in schoolMichael Galpin
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesMichael Galpin
 
Scala on Android: Experiences at Bump Technologies
Scala on Android: Experiences at Bump TechnologiesScala on Android: Experiences at Bump Technologies
Scala on Android: Experiences at Bump TechnologiesMichael Galpin
 
That’s My App - Running in Your Background - Draining Your Battery
That’s My App - Running in Your Background - Draining Your BatteryThat’s My App - Running in Your Background - Draining Your Battery
That’s My App - Running in Your Background - Draining Your BatteryMichael Galpin
 
Persistent Data Structures And Managed References
Persistent Data Structures And Managed ReferencesPersistent Data Structures And Managed References
Persistent Data Structures And Managed ReferencesMichael Galpin
 
Mobile Development 101
Mobile Development 101Mobile Development 101
Mobile Development 101Michael Galpin
 
RIAs Done Right: Grails, Flex, and EXT GWT
RIAs Done Right: Grails, Flex, and EXT GWTRIAs Done Right: Grails, Flex, and EXT GWT
RIAs Done Right: Grails, Flex, and EXT GWTMichael Galpin
 
Introduction to Scala for Java Developers
Introduction to Scala for Java DevelopersIntroduction to Scala for Java Developers
Introduction to Scala for Java DevelopersMichael Galpin
 

Plus de Michael Galpin (12)

Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in school
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Scala on Android: Experiences at Bump Technologies
Scala on Android: Experiences at Bump TechnologiesScala on Android: Experiences at Bump Technologies
Scala on Android: Experiences at Bump Technologies
 
That’s My App - Running in Your Background - Draining Your Battery
That’s My App - Running in Your Background - Draining Your BatteryThat’s My App - Running in Your Background - Draining Your Battery
That’s My App - Running in Your Background - Draining Your Battery
 
Persistent Data Structures And Managed References
Persistent Data Structures And Managed ReferencesPersistent Data Structures And Managed References
Persistent Data Structures And Managed References
 
Scala on Your Phone
Scala on Your PhoneScala on Your Phone
Scala on Your Phone
 
Mobile Development 101
Mobile Development 101Mobile Development 101
Mobile Development 101
 
RIAs Done Right: Grails, Flex, and EXT GWT
RIAs Done Right: Grails, Flex, and EXT GWTRIAs Done Right: Grails, Flex, and EXT GWT
RIAs Done Right: Grails, Flex, and EXT GWT
 
Eclipse @eBay 2009
Eclipse @eBay 2009Eclipse @eBay 2009
Eclipse @eBay 2009
 
Introduction to Scala for Java Developers
Introduction to Scala for Java DevelopersIntroduction to Scala for Java Developers
Introduction to Scala for Java Developers
 
Eclipse@eBay
Eclipse@eBayEclipse@eBay
Eclipse@eBay
 

Dernier

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 businesspanagenda
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
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 FMESafe Software
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
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
 

Dernier (20)

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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 

Mobile Web 5.0

  • 2. WHO AM I? Michael Galpin Mobile Architect, eBay Android & Mobile Web Author, Android in Practice @michaelg
  • 4. Mobile is the new HOTness
  • 5. MO BILE W E B THE IPHONE MYTH
  • 6. MO BILE 2 BIRDS, 1 STONE? W E B
  • 7. MO BILE ONE WEBKIT TO W E B RULE THEM ALL?
  • 8. MO BILE ONE WEBKIT TO W E B RULE THEM ALL? Android 2.2.1 iOS 4.1
  • 9. MOBILE PARTY LIKE IT’S W E B 2022
  • 10. WHAT?
  • 13. HTML
  • 14. JavaScript HTML CSS 3.0
  • 15. MO BILE JUST ADD W E B VIEWPORT?
  • 16. HOW?
  • 17. MO BILE W E B GEOLOCATION geocoder = new google.maps.Geocoder(); if (navigator.geolocation){ var gps = navigator.geolocation; gps.getCurrentPosition(function(pos){ var latLng = new google.maps.LatLng(pos.coords.latitude,pos.coords.longitude); var opts = {zoom:12, center:latLng, mapTypeId: google.maps.MapTypeId.ROADMAP}; map = new google.maps.Map($("map_canvas"), opts); theUser = new google.maps.Marker({ position: latLng, map: map, title: "You!" }); }); trackerId = gps.watchPosition(function(pos){ var latLng = new google.maps.LatLng(pos.coords.latitude,pos.coords.longitude); map.setCenter(latLng); theUser.setPosition(latLng); }); }
  • 18. MO BILE W E B GEOLOCATION OS/Browser Status/Version 3.0 2.0 6.0 X X
  • 19. MO BILE W E B DOM STORAGE if (window.localStorage){ localStorage.setItem("tweet" + tweet.id, JSON.stringify(tweet)); var index = localStorage.getItem("index::" + keyword); if (index){ index = JSON.parse(index); } else { index = []; } index.push(tweet.id); localStorage.setItem("index::"+keyword, JSON.stringify(index)); }
  • 20. MO BILE W E B DOM STORAGE if (window.localStorage){ localStorage.setItem("tweet" + tweet.id, JSON.stringify(tweet)); var index = localStorage.getItem("index::" + keyword); if (index){ index = JSON.parse(index); } else { index = []; } index.push(tweet.id); localStorage.setItem("index::"+keyword, JSON.stringify(index)); }
  • 21. MO BILE W E B DOM STORAGE OS/Browser Status/Version 3.0 2.0 6.0 7.0 X
  • 22. MO BILE W E B WEB WORKERS var worker = new Worker("details.js"); worker.onmessage = function(message){ var responseXmlStr = message.data.responseXml; var itemDetails = parseFromXml(responseXmlStr); if (window.localStorage){ localStorage.setItem(itemDetails.id, responseXmlStr); } dealDetails[itemDetails.id] = itemDetails; }; worker.postMessage(item.itemId); onmessage = function(message){ var itemId = message.data; var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function(){ if (this.readyState == 4 && this.status == 200){ postMessage({responseXml: this.responseText}); } }; var urlStr = generateUrl(itemId); xhr.open("GET", "proxy?url=" + escape(urlStr)); xhr.send(null); }
  • 23. MO BILE W E B WEB WORKERS OS/Browser Status/Version X 2.0 6.0 X X
  • 24. MO BILE W E B WEBSOCKET if (window.WebSocket){ var conn = new WebSocket("ws://my.server.com/socket"); conn.onopen = function(){ setStatusMessage('connecting...'); conn.send('connect'); }; conn.onmessage = function(msg){ setStatusMessage('connected'); updateItemStatus(JSON.parse(msg.data)); }; a at conn.onerror = function(err){ D showError(err); conn.close(); }; conn.onclose = function(evt){ setStatusMessage('connection closed'); }; }
  • 25. MO BILE W E B WEBSOCKET OS/Browser Status/Version 4.2b X X X X
  • 26. MOBILE W E B CANVAS var ctx = $("graph").getContext("2d"); ctx.font = "bold 12px sans-serif"; ctx.textAlign = "start"; for (i=0;i<data.length;i++){ ctx.fillStyle = "rgba(0, 0, 200, 0.9)"; ctx.fillRect(x, maxHeight - (data[i][report.y] / 2), width, (data[i][report.y] / 2)); ctx.fillStyle = "rgba(0, 0, 0, 0.9)"; ctx.fillText(data[i][report.x], x + (width / 4), maxHeight + 15); x += width + buffer; } ctx.moveTo(axisBuffer, maxHeight); ctx.lineTo(axisBuffer+maxWidth, maxHeight); ctx.strokeStyle = "black"; ctx.stroke(); ctx.moveTo(axisBuffer,0); ctx.lineTo(axisBuffer,maxHeight); ctx.stroke();
  • 27. MO BILE W E B CANVAS OS/Browser Status/Version 1.0 1.0 6.0 X v2
  • 28. MOBILE W E B CSS 3.0 $("formSection").style["-webkit-transform"] = "rotateZ(-5deg)"; $("formSection").style["-webkit-transition"] = "-webkit-transform 2s ease-in-out"; $("rtBtn").innerHTML = "Undo"; $("rtBtn").onclick = function() { $("formSection").style["-webkit-transform"] = ""; $("rtBtn").innerHTML = "Rotate"; $("rtBtn").setAttribute("onclick", "rotate()"); }
  • 29. MORE CSS 3.0 .abc { tr:nth-child(4n+1) { color: navy; } border: 1px solid #000; tr:nth-child(4n+2) { color: green; } border-radius: 9px; tr:nth-child(4n+3) { color: maroon; } -webkit-column-count:4; tr:nth-child(4n+4) { color: purple; } -webkit-column-rule: 1px solid #a00; header > h1{ -webkit-column-gap: 0.75em; color: yellow; } background: -webkit-gradient(linear, left top, h2 { left bottom, from(blue), to(white)) -webkit-text-fill-color: blue; } -webkit-text-stroke-color: yellow; .xyz{ -webkit-text-stroke-width: 1.5px; text-shadow: #6374AB 4px -4px 2px; background: -webkit-gradient(radial, 430 50, 0, overflow: hidden; 430 50, 200, from(red), to(#000)); text-overflow: ellipsis; -webkit-box-reflect:below 5px -webkit-gradient( border: 1px solid #bbb; linear, left top, left bottom, border-radius: 9px; from(transparent), background-color: #fff; color-stop(0.5, transparent), to(white)); } }
  • 30. MO BILE W E B CSS 3.0 OS/Browser Status/Version 3.0 2.0 X X X
  • 31. MO BILE APPLICATION W E B CACHE <!DOCTYPE html> <html manifest="manifest.mf"> <head> <!-- ... --> </head> <body> <!-- ... --> </body> </html> CACHE MANIFEST # Version 0.2 CACHE: offline.html json2.js /images/gym.jpg /images/soccer.jpg /images/online.jpg NETWORK: http://search.twitter.com/
  • 32. MO BILE W E B APPLICATION OS/Browser Status/Version 2.0 2.0 6.0 X X
  • 33. DEVICE MOBILE W E B if (navigator.device.captureImage){ device.captureImage(function(data){ var file = data[0]; var xhr = new XMLHttpRequest(); xhr.upload.addEventListener("progress", function(e) { if (e.lengthComputable) { var percentage = Math.round((e.loaded * 100) / e.total); updateStatusBar(percentage); } }, false); xhr.open("POST", "http://my.server.com/upload"); xhr.overrideMimeType('text/plain; charset=x-user-defined-binary'); xhr.sendAsBinary(file.getAsBinary()); }); }
  • 34. MO BILE W E B DEVICE OS/Browser Status/Version X 3.0 X X X
  • 35. MO BILE W E B TOUCH EVENTS logo.ontouchmove = function(event){ if (event.touches.length == 1){ event.preventDefault(); var touch = event.touches[0]; var node = touch.target; node.style.position = "absolute"; node.style.left = touch.pageX + "px"; node.style.top = touch.pageY + "px"; } } var angle = 0; logo.ongesturechange = function(event){ var node = event.target; node.style.webkitTransform = "rotate("+ ((angle + event.rotation) % 360)+"deg)"; } logo.ongestureend = function(event){ angle = (angle + event.rotation) % 360; }
  • 36. MO BILE W E B TOUCH EVENTS OS/Browser Status/Version 2.0 1.0 6.0? X X
  • 37. MO BILE W E B AUDIO/VIDEO <video controls="controls" preload="true" width="720" height="640"> <source src="feature.ogg" type="video/ogg" /> <source src="feature.mp4" type="video/mp4" /> Your browser sucks </video>
  • 38. MO BILE W E B AUDIO/VIDEO OS/Browser Status/Version 1.0 2.0 X X X
  • 39. MO BILE W E B META <meta name="viewport" content="width=device-width; user- scalable=no;"/> <meta name="apple-touch-fullscreen" content="YES" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <link rel="apple-touch-icon" href="rice-and-bones.png"/>
  • 41. MOBILE BEST W E B PRACTICES • Servers are for data • Orientation matters • Cache, cache, cache • Frameworks (not really mobile): SproutCore, Cappuccino • Frameworks (mobile): Sencha, jQTouch