SlideShare a Scribd company logo
1 of 29
Mobile : Webapp development Ganesh Gembali Consultant Xebia IT Architects Pvt Ltd
[object Object],[object Object],[object Object],[object Object],[object Object],About me
 
HTML5 APIs ,[object Object],[object Object],[object Object],[object Object],[object Object]
Geolocation API
Geolocation API function getGEO() { // First check if your browser supports the geolocation API  if (navigator.geolocation) {  alert("HTML 5 is getting your location");    // Get the current position  navigator.geolocation.getCurrentPosition( function(position) { alert(position.coords.latitude); alert(position.coords.longitude);  });  } else {  alert("Sorry... your browser does not support the HTML5 GeoLocation API");  }  }
Geolocation API ,[object Object],[object Object],[object Object],[object Object],[object Object]
Success callback arguments interface  Position   {  readonly attribute  Coordinates  coords ;  readonly attribute  DOMTimeStamp  timestamp ;  }; interface  Coordinates   {  readonly attribute  double  latitude ;  readonly attribute  double  longitude ;  readonly attribute  double?  altitude ;  readonly attribute  double  accuracy ;  readonly attribute  double? altitudeAccuracy ;  readonly attribute  double? heading ;  readonly attribute  double? speed ;  };
Error callback arguments interface  PositionError  {  const unsigned short PERMISSION_DENIED = 1;  const unsigned short POSITION_UNAVAILABLE = 2;  const unsigned short TIMEOUT = 3;  readonly attribute  unsigned short code ;  readonly attribute  DOMString message ;  };
Repeated position updates function scrollMap(position) {  // Scrolls the map so that it is centered at (position.coords.latitude,position.coords.longitude).  }  // Request repeated updates.  navigator.geolocation.watchPosition(scrollMap);
Web Storage ,[object Object],[object Object],[object Object]
Storage Interface interface  Storage   {  readonly attribute unsigned  long length ;  DOMString  key(in unsigned long index) ;  getter any  getItem(in DOMString key) ;  setter creator void  setItem(in DOMString key, in any value) ;  deleter void  removeItem(in DOMString key) ;  void  clear() ;  };
Web SQL interface WindowDatabase {  Database openDatabase(in DOMString name, in DOMString version,  in DOMString displayName, in unsigned long estimatedSize,  in optional DatabaseCallback creationCallback);  }; function prepareDatabase(ready, error) {  return  openDatabase('documents', '1.0', 'Offline document storage',  5*1024*1024, function (db) {  db.changeVersion('', '1.0', function (t) {    t.executeSql('CREATE TABLE docids (id, name)');  }, error);  }); }
[object Object],[object Object],[object Object],[object Object],[object Object],Web workers
var worker = new Worker(“jworker.js”); main.js Manages DOM  onMessage Manages DOM, Renders UI jworker.js Main.js jWorker.js postMessage Process task Message WebWorker Object Lifecycle
Worker-Syntax <script> var worker = new Worker('worker.js'); worker.postMessage('Hello Guest'); worker.onmessage = function (event) {   alert(event.data); }; </script>
What you can do inside worker ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example-1 Big Loop  Demo ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Web Workers  : Usecases ,[object Object],[object Object],[object Object],[object Object],[object Object]
Web Sockets
[object Object],[object Object],All  these work arounds attempt to enable full duplex communication using hacks in HTTP. Workarounds – Pre ws://
[object Object],[object Object],[object Object],[object Object],WebSocket  - Native Support
Simple Implementation var socket = new WebSocket(“ws://localhost:8787/socket/server”); socket.onopen = function(event){ log(“WebSocket connection established”); } socket.onmessage = function(event){ log(“Received message with date =”+event.data);  } socket.onerror = function(event){ log(“Error occurred”); } Socket.onclose = function(event){ log(“connection closed”); }
HTML-5    Canvas
History
What it is not
Canvas element <canvas id=&quot;stockGraph&quot; width=&quot;150&quot; height=&quot;150&quot;> You browser doesn't support canvas. </canvas> var canvas = document.getElementById('tutorial'); if (canvas.getContext){   var ctx = canvas.getContext('2d'); }
[object Object]
 

More Related Content

What's hot

Redux. From twitter hype to production
Redux. From twitter hype to productionRedux. From twitter hype to production
Redux. From twitter hype to production
FDConf
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
martincabrera
 
Matthew Eernisse, NodeJs, .toster {webdev}
Matthew Eernisse, NodeJs, .toster {webdev}Matthew Eernisse, NodeJs, .toster {webdev}
Matthew Eernisse, NodeJs, .toster {webdev}
.toster
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scale
Tom Croucher
 

What's hot (20)

Nodejs intro
Nodejs introNodejs intro
Nodejs intro
 
Node.js - A Quick Tour
Node.js - A Quick TourNode.js - A Quick Tour
Node.js - A Quick Tour
 
Node ppt
Node pptNode ppt
Node ppt
 
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
 
Redux. From twitter hype to production
Redux. From twitter hype to productionRedux. From twitter hype to production
Redux. From twitter hype to production
 
«От экспериментов с инфраструктурой до внедрения в продакшен»​
«От экспериментов с инфраструктурой до внедрения в продакшен»​«От экспериментов с инфраструктурой до внедрения в продакшен»​
«От экспериментов с инфраструктурой до внедрения в продакшен»​
 
Introduction to Vert.x
Introduction to Vert.xIntroduction to Vert.x
Introduction to Vert.x
 
Node.js - Best practices
Node.js  - Best practicesNode.js  - Best practices
Node.js - Best practices
 
A real-world Relay application in production - Stefano Masini - Codemotion Am...
A real-world Relay application in production - Stefano Masini - Codemotion Am...A real-world Relay application in production - Stefano Masini - Codemotion Am...
A real-world Relay application in production - Stefano Masini - Codemotion Am...
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
The hitchhiker's guide to the Webpack - Sara Vieira - Codemotion Amsterdam 2017
The hitchhiker's guide to the Webpack - Sara Vieira - Codemotion Amsterdam 2017The hitchhiker's guide to the Webpack - Sara Vieira - Codemotion Amsterdam 2017
The hitchhiker's guide to the Webpack - Sara Vieira - Codemotion Amsterdam 2017
 
Sanwaad presentation
Sanwaad presentationSanwaad presentation
Sanwaad presentation
 
Matthew Eernisse, NodeJs, .toster {webdev}
Matthew Eernisse, NodeJs, .toster {webdev}Matthew Eernisse, NodeJs, .toster {webdev}
Matthew Eernisse, NodeJs, .toster {webdev}
 
Découvrir dtrace en ligne de commande.
Découvrir dtrace en ligne de commande.Découvrir dtrace en ligne de commande.
Découvrir dtrace en ligne de commande.
 
Building your first Node app with Connect & Express
Building your first Node app with Connect & ExpressBuilding your first Node app with Connect & Express
Building your first Node app with Connect & Express
 
Ansible 202 - sysarmy
Ansible 202 - sysarmyAnsible 202 - sysarmy
Ansible 202 - sysarmy
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with Examples
 
Comet with node.js and V8
Comet with node.js and V8Comet with node.js and V8
Comet with node.js and V8
 
Node.js Patterns for Discerning Developers
Node.js Patterns for Discerning DevelopersNode.js Patterns for Discerning Developers
Node.js Patterns for Discerning Developers
 
A million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scaleA million connections and beyond - Node.js at scale
A million connections and beyond - Node.js at scale
 

Similar to Mobile webapplication development

Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
Tom Croucher
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
Igor Bronovskyy
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqela
jobandesther
 
Speak the Web 15.02.2010
Speak the Web 15.02.2010Speak the Web 15.02.2010
Speak the Web 15.02.2010
Patrick Lauke
 

Similar to Mobile webapplication development (20)

Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2
 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSockets
 
NodeJS
NodeJSNodeJS
NodeJS
 
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
 
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
Future of Web Apps: Google Gears
Future of Web Apps: Google GearsFuture of Web Apps: Google Gears
Future of Web Apps: Google Gears
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqela
 
Grails and Ajax
Grails and AjaxGrails and Ajax
Grails and Ajax
 
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
 
5 x HTML5 worth using in APEX (5)
5 x HTML5 worth using in APEX (5)5 x HTML5 worth using in APEX (5)
5 x HTML5 worth using in APEX (5)
 
Scripting GeoServer
Scripting GeoServerScripting GeoServer
Scripting GeoServer
 
GWT Extreme!
GWT Extreme!GWT Extreme!
GWT Extreme!
 
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCL
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP Application
 
Speak the Web 15.02.2010
Speak the Web 15.02.2010Speak the Web 15.02.2010
Speak the Web 15.02.2010
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
 

More from Ganesh Gembali (7)

Agile for fixed price projects
Agile for fixed price projectsAgile for fixed price projects
Agile for fixed price projects
 
Canvas
CanvasCanvas
Canvas
 
Canvas
CanvasCanvas
Canvas
 
Future of SaaS with HTML-5
Future of SaaS with HTML-5Future of SaaS with HTML-5
Future of SaaS with HTML-5
 
Agile Myths agilencr2010
Agile Myths agilencr2010Agile Myths agilencr2010
Agile Myths agilencr2010
 
AgileTour-2010, Noida : What it means to be "An Agile Developer"?
AgileTour-2010, Noida : What it means to be "An Agile Developer"?AgileTour-2010, Noida : What it means to be "An Agile Developer"?
AgileTour-2010, Noida : What it means to be "An Agile Developer"?
 
AgileTour2010,Bengaluru : Our Journey from Scrum to Kanban
AgileTour2010,Bengaluru : Our Journey from Scrum to KanbanAgileTour2010,Bengaluru : Our Journey from Scrum to Kanban
AgileTour2010,Bengaluru : Our Journey from Scrum to Kanban
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

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...
 
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
 
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...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
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
 
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
 
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...
 
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...
 
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...
 
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 - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Mobile webapplication development

  • 1. Mobile : Webapp development Ganesh Gembali Consultant Xebia IT Architects Pvt Ltd
  • 2.
  • 3.  
  • 4.
  • 6. Geolocation API function getGEO() { // First check if your browser supports the geolocation API if (navigator.geolocation) { alert(&quot;HTML 5 is getting your location&quot;); // Get the current position navigator.geolocation.getCurrentPosition( function(position) { alert(position.coords.latitude); alert(position.coords.longitude); }); } else { alert(&quot;Sorry... your browser does not support the HTML5 GeoLocation API&quot;); } }
  • 7.
  • 8. Success callback arguments interface Position { readonly attribute Coordinates coords ; readonly attribute DOMTimeStamp timestamp ; }; interface Coordinates { readonly attribute double latitude ; readonly attribute double longitude ; readonly attribute double? altitude ; readonly attribute double accuracy ; readonly attribute double? altitudeAccuracy ; readonly attribute double? heading ; readonly attribute double? speed ; };
  • 9. Error callback arguments interface PositionError { const unsigned short PERMISSION_DENIED = 1; const unsigned short POSITION_UNAVAILABLE = 2; const unsigned short TIMEOUT = 3; readonly attribute unsigned short code ; readonly attribute DOMString message ; };
  • 10. Repeated position updates function scrollMap(position) { // Scrolls the map so that it is centered at (position.coords.latitude,position.coords.longitude). } // Request repeated updates. navigator.geolocation.watchPosition(scrollMap);
  • 11.
  • 12. Storage Interface interface Storage { readonly attribute unsigned long length ; DOMString key(in unsigned long index) ; getter any getItem(in DOMString key) ; setter creator void setItem(in DOMString key, in any value) ; deleter void removeItem(in DOMString key) ; void clear() ; };
  • 13. Web SQL interface WindowDatabase { Database openDatabase(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize, in optional DatabaseCallback creationCallback); }; function prepareDatabase(ready, error) { return openDatabase('documents', '1.0', 'Offline document storage', 5*1024*1024, function (db) { db.changeVersion('', '1.0', function (t) { t.executeSql('CREATE TABLE docids (id, name)'); }, error); }); }
  • 14.
  • 15. var worker = new Worker(“jworker.js”); main.js Manages DOM onMessage Manages DOM, Renders UI jworker.js Main.js jWorker.js postMessage Process task Message WebWorker Object Lifecycle
  • 16. Worker-Syntax <script> var worker = new Worker('worker.js'); worker.postMessage('Hello Guest'); worker.onmessage = function (event) { alert(event.data); }; </script>
  • 17.
  • 18.
  • 19.
  • 21.
  • 22.
  • 23. Simple Implementation var socket = new WebSocket(“ws://localhost:8787/socket/server”); socket.onopen = function(event){ log(“WebSocket connection established”); } socket.onmessage = function(event){ log(“Received message with date =”+event.data); } socket.onerror = function(event){ log(“Error occurred”); } Socket.onclose = function(event){ log(“connection closed”); }
  • 24. HTML-5 Canvas
  • 26. What it is not
  • 27. Canvas element <canvas id=&quot;stockGraph&quot; width=&quot;150&quot; height=&quot;150&quot;> You browser doesn't support canvas. </canvas> var canvas = document.getElementById('tutorial'); if (canvas.getContext){ var ctx = canvas.getContext('2d'); }
  • 28.
  • 29.  

Editor's Notes

  1. Native scripting language for Java