SlideShare a Scribd company logo
Modern Web Applications With HTML5
Ido Green, Developer Advocate
plus.google.com/+greenido
Modern Web Applications
Modern Applications
● Self Contained
● "Offline First"
● MV* Frameworks
● Device Aware
● #Perfmatters
● Performance! #Perfmatters
● Flaky connections (e.g. cafes, car)
● Airplane, road trip, deserted island
● Consolidates the concept of permanent application.
* We will use: Lawnchair for our demo.
Offline - Why?
● Storing assets: AppCache
● Storing data: localStorage, IndexedDB, File API.
● Offline first:
○ Pretend that there's no internet connection
○ Implement a sync layer that works only when
online.
Offline - How?
navigator.onLine & window.(ononline|onoffline)
Offline - Appcache
<html manifest="myapp.manifest">
CACHE MANIFEST
#version 1.2.3
#JS
js/main.js
#CSS
css/bootstrap.min.css
#Images
img/left-back.png
● You can use it TODAY:
○ http://caniuse.com/#feat=offline-apps
● Will also be used when the user
is online.
● Allows you to define fallback
pages.
● (!) Don't cache the manifest!
● http://www.html5rocks.com/en/tutorials/app
Use abstractions
● Lawn Chair - brian.io/lawnchair/
● asyncStorage - https://github.com/WebReflection/db
● IndexedDBShim - nparashuram.com/IndexedDBShim/
Design Web Applications
(Da New) Design process
A Page? An App?
● It's not pages anymore
● Design from the content out
● Your web app as a collection of
(web) components
● Less is more: Any addition has the
potential to ruin our MVP
Design A List Again?
● Don't reinvent the wheel
○ http://html5rock.com
○ http://pttrns.com
○ http://mobile-patterns.com
● Don't let "web" nor "Enterprise"
be an excuse
Design - Phones? Tablets?
● Start with the UX
○ Balsamiq, Creately,
MockFlow
○ Aim for common
device breakpoints
(4:3, 16:9)
Philosophy: Adaptive Apps
● Adaptive apps
○ Custom views and templates for each form factor
○ Shared the model
● Use responsive design within the form factor
● progressive enhancement
So your app is useful on
any platform.
Building Web Applications
MV* For The Win
● Separating concerns
○ Model handles data
○ server persistence layer
○ View handles user input and
rendering
● Used to be on the server...
AngularJS - Client Side Framework
Angular.js - Let you extend HTML
vocabulary for your application.
● Data binding
● Extensible HTML
● Dependency Injection / Testable
More options: addyosmani.github.com/todomvc/
Mobile World - RESTful World
Photos
● GET http://ex.com/_ah/api/picturesque/v1/photos
● POST http://ex.com/_ah/api/picturesque/v1/photo
● PATCH http://ex.com/_ah/api/picturesque/v1/photo/id
Users
● POST http://ex.com/_ah/api/picturesque/v1/users/join
And more...
APIs - Demo Time
goo.gl/XPnXj
Demo of 'Note Generator'
Transferable Objects Demo
Device APIs WG: www.w3.org/2009/dap/
● Geolocation API (Psst... support in DevTools)
● Device Orientation API (accelerometer in your DevTools)
● WebGL ( GPU )
● HTML5 Filesystem API
● Network connectivity
● Battery API
● Gamepad API
● WebRTC
● Web Audio API ( core audio )
"Device APIs"
● mobilehtml5.org/
● caniuse.com
Google Cloud Endpoints
Modern Apps and The Server Conundrum
Have to deal with a server
○ Offload Computation
○ Sharing and Collaboration
○ Logs
But who wants to run a server?
○ Spikey traffic - Scaling challenges
○ Client Server communication
○ Serialization
○ OAuth Dance
Google App Engine
Google App Engine
Google APIs: The Discovery Document
Google APIs: Client Libraries
● Web
○ JavaScript: google-api-javascript-client
○ Node.js: google-api-nodejs-client
○ Dart: google-api-dart-client
● Mobile
○ Objective C: google-api-objectivec-client
○ Java: google-api-java-client
● Server-side
○ Ruby: google-api-ruby-client
○ Python: google-api-python-client
○ Go: google-api-go-client
○ PHP: google-api-php-client
○ .NET: google-api-dotnet-client
○ GWT: gwt-google-apis
Google APIs
HTML
<body>
...
<script type="text/javascript">
function init() {
gapi.client.load(‘urlshortener’, 'v1’, function() {});
}
</script>
<script src="https://apis.google.com/js/client.js?onload=init"></script>
</body>
Google Cloud Endpoints
Simple GET API Request
Using Data Model for Insert
Python
@endpoints.api(name='picturesque', version='v1',
description='Photos API for Picturesque App')
class PicturesqueApi(remote.Service):
@Photo.method(path='photo', name='photo.insert')
def PhotoInsert(self, photo):
# do some validation
photo.put()
return photo
Insert With Drag and Drop Demo
Python
Update Demo
Python
List Demo - Get Photos Baby!
Python
var req = gapi.client.picturesque.photo.list();
req.execute(function(data) {
data.items = data.items || [];
console.log("-- We have " + data.items.length);
addPhotos(data.items);
});
Demo Time
Python
picturesque-app.appspot.com/
"Smart" Client
● Network calls are expensive
● "Client" photo library
○ Lawnchair allows us to store photos' metadata
offline
○ filer.js to store the photos
○ Application Cache
● Do not Repeat Yourself
○ Applies to code and to API calls
○ Only retrieve photos that have been updated
since the last API call
Chrome DevTools
What Is New?
○ Edit local projects
○ Check Devices: User agents, screen sizes, touch events etc'
○ Map source for: coffeescript, sass, dart etc'.
○ Test on your mobile device from DevTools.
○ More?
■ GDL "The Breakpoint" episodes
■ Improving Your 2013 Productivity With The Chrome DevTools
The Screen Are Smaller
● Debug
○ Remote debugging hack with jsconsole.com
○ Chrome for Android remote debug with DevTools.
● Testing
○ Qunit to test models
○ Selenium and its mobile option Remote Web Driver
● How To
○ http://mobile-html.appspot.com/
Debug With Chrome DevTools
Key Take Aways
● Build powerful applications with Google Cloud Endpoints
● HTML5 APIs are ready and getting better fast.
● AngularJS - be more productive
● Leverage Modern Browser Features:
○ Offline
○ Web RTC
○ New CSS3 artifacts
○ Web workers
Questions? THANK YOU!
Ido Green
Developer Relations
http://plus.google.com/+greenido
App:: https://picturesque-app.appspot.com/
HTML5 APIs: http://ido-green.appspot.com/html5fest-il/
Slides: http://ido-green.appspot.com/

More Related Content

What's hot (19)

PDF
Build a lego app with CocoaPods
CocoaHeads France
 
PDF
Ionic adventures - Hybrid Mobile App Development rocks
Juarez Filho
 
PPTX
Introduction to Ionic framework
Shyjal Raazi
 
PDF
Flutter Workshop 2021 @ ARU
Anuchit Chalothorn
 
PDF
Anton Sakharov: The risks you take when develop cross-platform apps using HT...
Mobile Trends
 
PDF
Lo mejor y peor de React Native @ValenciaJS
Marcel Kalveram
 
ODP
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
Shashikant Jagtap
 
PPTX
React Native for ReactJS Devs
Barak Cohen
 
ODP
iOS Automation with Cucumber, Appium and Saucelabs
Shashikant Jagtap
 
PDF
A tour of React Native
Tadeu Zagallo
 
PDF
Introduction to react native
Dani Akash
 
PDF
React Native in a nutshell
Brainhub
 
PPTX
Introduction to React Native
Waqqas Jabbar
 
PPTX
Creating books app with react native
Ali Sa'o
 
PDF
Discover Android Wear
Troy Miles
 
PPT
Dockerising Appium : London Appium Meetup
Shashikant Jagtap
 
PPTX
JHipster presentation by Gaetan Bloch
Gaëtan Bloch
 
PDF
React Native custom components
Jeremy Grancher
 
PDF
Intro to react native
ModusJesus
 
Build a lego app with CocoaPods
CocoaHeads France
 
Ionic adventures - Hybrid Mobile App Development rocks
Juarez Filho
 
Introduction to Ionic framework
Shyjal Raazi
 
Flutter Workshop 2021 @ ARU
Anuchit Chalothorn
 
Anton Sakharov: The risks you take when develop cross-platform apps using HT...
Mobile Trends
 
Lo mejor y peor de React Native @ValenciaJS
Marcel Kalveram
 
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
Shashikant Jagtap
 
React Native for ReactJS Devs
Barak Cohen
 
iOS Automation with Cucumber, Appium and Saucelabs
Shashikant Jagtap
 
A tour of React Native
Tadeu Zagallo
 
Introduction to react native
Dani Akash
 
React Native in a nutshell
Brainhub
 
Introduction to React Native
Waqqas Jabbar
 
Creating books app with react native
Ali Sa'o
 
Discover Android Wear
Troy Miles
 
Dockerising Appium : London Appium Meetup
Shashikant Jagtap
 
JHipster presentation by Gaetan Bloch
Gaëtan Bloch
 
React Native custom components
Jeremy Grancher
 
Intro to react native
ModusJesus
 

Viewers also liked (20)

PDF
Modern Web Applications Utilizing HTML5 APIs
Ido Green
 
PDF
Web Forms The Right Way
Ido Green
 
PDF
Unravelling Mobile Web Performance
Guy Podjarny
 
PPTX
Collaborative Assessment: Working Together Toward Institutional Change
Elizabeth Nesius
 
PPTX
Unit3
lola guillen
 
PDF
Cap 4 gases-3662
opulento22
 
PDF
VANABBETOTVESSEM
dhrvanvessem
 
KEY
Java Eye Architecture
Robbin Fan
 
PPTX
精益创业讨论
Robbin Fan
 
PDF
Google Platform Overview (April 2014)
Ido Green
 
PPTX
geek_lifestyle
sarahnovotny
 
PPT
Odissea per a 4 rt de la eso
Carolina Chavarria
 
PDF
Scale with a smile with Google Cloud Platform At DevConTLV (June 2014)
Ido Green
 
PPTX
The High School Connection: Bridging the Gap Between High School and College
Elizabeth Nesius
 
PPTX
Wiki Technology By It Rocks
naveenv
 
PDF
Rwservlet
Haas Colby
 
PPTX
Lecture 3 Perl & FreeBSD administration
Mohammed Farrag
 
PDF
The Armory
Brendan Miller
 
PDF
2013 accenture-consumer-electronics-products-and-services-usage-report
François Avril
 
PDF
Message Queues : A Primer - International PHP Conference Fall 2012
Mike Willbanks
 
Modern Web Applications Utilizing HTML5 APIs
Ido Green
 
Web Forms The Right Way
Ido Green
 
Unravelling Mobile Web Performance
Guy Podjarny
 
Collaborative Assessment: Working Together Toward Institutional Change
Elizabeth Nesius
 
Cap 4 gases-3662
opulento22
 
VANABBETOTVESSEM
dhrvanvessem
 
Java Eye Architecture
Robbin Fan
 
精益创业讨论
Robbin Fan
 
Google Platform Overview (April 2014)
Ido Green
 
geek_lifestyle
sarahnovotny
 
Odissea per a 4 rt de la eso
Carolina Chavarria
 
Scale with a smile with Google Cloud Platform At DevConTLV (June 2014)
Ido Green
 
The High School Connection: Bridging the Gap Between High School and College
Elizabeth Nesius
 
Wiki Technology By It Rocks
naveenv
 
Rwservlet
Haas Colby
 
Lecture 3 Perl & FreeBSD administration
Mohammed Farrag
 
The Armory
Brendan Miller
 
2013 accenture-consumer-electronics-products-and-services-usage-report
François Avril
 
Message Queues : A Primer - International PHP Conference Fall 2012
Mike Willbanks
 
Ad

Similar to Utilizing HTML5 APIs (20)

PDF
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Ido Green
 
PDF
Mobile, web and cloud - the triple crown of modern applications
Ido Green
 
PPTX
HTML5 on Mobile
Adam Lu
 
PDF
Front-end. Global domination
Stfalcon Meetups
 
PDF
Frontend. Global domination.
Андрей Вандакуров
 
PDF
Building Cross Platform Mobile Web Apps
James Pearce
 
PDF
APIs for modern web apps
Chris Mills
 
PDF
Mobile Backend Apps and APIs meetup London overview of BaaS APIs and discussi...
Taras Filatov
 
PDF
Trends in front end engineering_handouts
AE - architects for business and ict
 
PPTX
HTML5 for Rich User Experience
Mahbubur Rahman
 
PDF
HTML5 and the dawn of rich mobile web applications
James Pearce
 
PDF
HTML5: the new frontier of the web
Ivano Malavolta
 
PDF
Workshop HTML5+PhoneGap by Ivano Malavolta
Commit University
 
PDF
Always on! ... or not?
Carsten Sandtner
 
PPT
Advanced Web Development
Robert J. Stein
 
PDF
Hybrid mobile apps
Erik Paulsson
 
KEY
Future of Mobile
Brian LeRoux
 
KEY
20120802 timisoara
Richard Rodger
 
KEY
Palm Developer Day PhoneGap
Brian LeRoux
 
PPTX
Html5
Zahin Omar Alwa
 
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Ido Green
 
Mobile, web and cloud - the triple crown of modern applications
Ido Green
 
HTML5 on Mobile
Adam Lu
 
Front-end. Global domination
Stfalcon Meetups
 
Frontend. Global domination.
Андрей Вандакуров
 
Building Cross Platform Mobile Web Apps
James Pearce
 
APIs for modern web apps
Chris Mills
 
Mobile Backend Apps and APIs meetup London overview of BaaS APIs and discussi...
Taras Filatov
 
Trends in front end engineering_handouts
AE - architects for business and ict
 
HTML5 for Rich User Experience
Mahbubur Rahman
 
HTML5 and the dawn of rich mobile web applications
James Pearce
 
HTML5: the new frontier of the web
Ivano Malavolta
 
Workshop HTML5+PhoneGap by Ivano Malavolta
Commit University
 
Always on! ... or not?
Carsten Sandtner
 
Advanced Web Development
Robert J. Stein
 
Hybrid mobile apps
Erik Paulsson
 
Future of Mobile
Brian LeRoux
 
20120802 timisoara
Richard Rodger
 
Palm Developer Day PhoneGap
Brian LeRoux
 
Ad

More from Ido Green (20)

PDF
מדמיון למציאות - 9.2024 - הרצאה במכינת כפר הנשיא
Ido Green
 
PDF
How to get things done - Lessons from Yahoo, Google, Netflix and Meta
Ido Green
 
PDF
Crypto 101 and a bit more [Sep-2022]
Ido Green
 
PPTX
The Future of Continuous Software Updates Is Here
Ido Green
 
PPTX
Open Source & DevOps Market trends - Open Core Summit
Ido Green
 
PPTX
DevOps as a competitive advantage
Ido Green
 
PPTX
Data Driven DevOps & Technologies (swampUP 2019 keynote)
Ido Green
 
PDF
Create An Amazing Apps For The Google Assistant!
Ido Green
 
PDF
VUI Design
Ido Green
 
PDF
Google Assistant - Why? How?
Ido Green
 
PDF
The Google Assistant - Macro View (October 2017)
Ido Green
 
PDF
Actions On Google - GDD Europe 2017
Ido Green
 
PDF
Building conversational experiences with Actions on Google
Ido Green
 
PDF
Actions On Google - How? Why?
Ido Green
 
PDF
Startups Best Practices
Ido Green
 
PDF
Progressive Web Apps For Startups
Ido Green
 
PDF
Earn More Revenue With Firebase and AdMob
Ido Green
 
PDF
How To Grow Your User Base?
Ido Green
 
PDF
Amp Overview #YGLF 2016
Ido Green
 
PDF
AMP - Accelerated Mobile Pages
Ido Green
 
מדמיון למציאות - 9.2024 - הרצאה במכינת כפר הנשיא
Ido Green
 
How to get things done - Lessons from Yahoo, Google, Netflix and Meta
Ido Green
 
Crypto 101 and a bit more [Sep-2022]
Ido Green
 
The Future of Continuous Software Updates Is Here
Ido Green
 
Open Source & DevOps Market trends - Open Core Summit
Ido Green
 
DevOps as a competitive advantage
Ido Green
 
Data Driven DevOps & Technologies (swampUP 2019 keynote)
Ido Green
 
Create An Amazing Apps For The Google Assistant!
Ido Green
 
VUI Design
Ido Green
 
Google Assistant - Why? How?
Ido Green
 
The Google Assistant - Macro View (October 2017)
Ido Green
 
Actions On Google - GDD Europe 2017
Ido Green
 
Building conversational experiences with Actions on Google
Ido Green
 
Actions On Google - How? Why?
Ido Green
 
Startups Best Practices
Ido Green
 
Progressive Web Apps For Startups
Ido Green
 
Earn More Revenue With Firebase and AdMob
Ido Green
 
How To Grow Your User Base?
Ido Green
 
Amp Overview #YGLF 2016
Ido Green
 
AMP - Accelerated Mobile Pages
Ido Green
 

Recently uploaded (20)

PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PDF
The Growing Value and Application of FME & GenAI
Safe Software
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PDF
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
PPTX
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
PDF
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
PPTX
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
PDF
Open Source Milvus Vector Database v 2.6
Zilliz
 
PPTX
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
The Growing Value and Application of FME & GenAI
Safe Software
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
Open Source Milvus Vector Database v 2.6
Zilliz
 
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 

Utilizing HTML5 APIs

  • 1. Modern Web Applications With HTML5 Ido Green, Developer Advocate plus.google.com/+greenido
  • 3. Modern Applications ● Self Contained ● "Offline First" ● MV* Frameworks ● Device Aware ● #Perfmatters
  • 4. ● Performance! #Perfmatters ● Flaky connections (e.g. cafes, car) ● Airplane, road trip, deserted island ● Consolidates the concept of permanent application. * We will use: Lawnchair for our demo. Offline - Why?
  • 5. ● Storing assets: AppCache ● Storing data: localStorage, IndexedDB, File API. ● Offline first: ○ Pretend that there's no internet connection ○ Implement a sync layer that works only when online. Offline - How? navigator.onLine & window.(ononline|onoffline)
  • 6. Offline - Appcache <html manifest="myapp.manifest"> CACHE MANIFEST #version 1.2.3 #JS js/main.js #CSS css/bootstrap.min.css #Images img/left-back.png ● You can use it TODAY: ○ http://caniuse.com/#feat=offline-apps ● Will also be used when the user is online. ● Allows you to define fallback pages. ● (!) Don't cache the manifest! ● http://www.html5rocks.com/en/tutorials/app
  • 7. Use abstractions ● Lawn Chair - brian.io/lawnchair/ ● asyncStorage - https://github.com/WebReflection/db ● IndexedDBShim - nparashuram.com/IndexedDBShim/
  • 9. (Da New) Design process
  • 10. A Page? An App? ● It's not pages anymore ● Design from the content out ● Your web app as a collection of (web) components ● Less is more: Any addition has the potential to ruin our MVP
  • 11. Design A List Again? ● Don't reinvent the wheel ○ http://html5rock.com ○ http://pttrns.com ○ http://mobile-patterns.com ● Don't let "web" nor "Enterprise" be an excuse
  • 12. Design - Phones? Tablets? ● Start with the UX ○ Balsamiq, Creately, MockFlow ○ Aim for common device breakpoints (4:3, 16:9)
  • 13. Philosophy: Adaptive Apps ● Adaptive apps ○ Custom views and templates for each form factor ○ Shared the model ● Use responsive design within the form factor ● progressive enhancement So your app is useful on any platform.
  • 15. MV* For The Win ● Separating concerns ○ Model handles data ○ server persistence layer ○ View handles user input and rendering ● Used to be on the server...
  • 16. AngularJS - Client Side Framework Angular.js - Let you extend HTML vocabulary for your application. ● Data binding ● Extensible HTML ● Dependency Injection / Testable More options: addyosmani.github.com/todomvc/
  • 17. Mobile World - RESTful World Photos ● GET http://ex.com/_ah/api/picturesque/v1/photos ● POST http://ex.com/_ah/api/picturesque/v1/photo ● PATCH http://ex.com/_ah/api/picturesque/v1/photo/id Users ● POST http://ex.com/_ah/api/picturesque/v1/users/join And more...
  • 18. APIs - Demo Time goo.gl/XPnXj
  • 19. Demo of 'Note Generator'
  • 21. Device APIs WG: www.w3.org/2009/dap/ ● Geolocation API (Psst... support in DevTools) ● Device Orientation API (accelerometer in your DevTools) ● WebGL ( GPU ) ● HTML5 Filesystem API ● Network connectivity ● Battery API ● Gamepad API ● WebRTC ● Web Audio API ( core audio ) "Device APIs" ● mobilehtml5.org/ ● caniuse.com
  • 23. Modern Apps and The Server Conundrum Have to deal with a server ○ Offload Computation ○ Sharing and Collaboration ○ Logs But who wants to run a server? ○ Spikey traffic - Scaling challenges ○ Client Server communication ○ Serialization ○ OAuth Dance
  • 26. Google APIs: The Discovery Document
  • 27. Google APIs: Client Libraries ● Web ○ JavaScript: google-api-javascript-client ○ Node.js: google-api-nodejs-client ○ Dart: google-api-dart-client ● Mobile ○ Objective C: google-api-objectivec-client ○ Java: google-api-java-client ● Server-side ○ Ruby: google-api-ruby-client ○ Python: google-api-python-client ○ Go: google-api-go-client ○ PHP: google-api-php-client ○ .NET: google-api-dotnet-client ○ GWT: gwt-google-apis
  • 28. Google APIs HTML <body> ... <script type="text/javascript"> function init() { gapi.client.load(‘urlshortener’, 'v1’, function() {}); } </script> <script src="https://apis.google.com/js/client.js?onload=init"></script> </body>
  • 30. Simple GET API Request
  • 31. Using Data Model for Insert Python @endpoints.api(name='picturesque', version='v1', description='Photos API for Picturesque App') class PicturesqueApi(remote.Service): @Photo.method(path='photo', name='photo.insert') def PhotoInsert(self, photo): # do some validation photo.put() return photo
  • 32. Insert With Drag and Drop Demo Python
  • 34. List Demo - Get Photos Baby! Python var req = gapi.client.picturesque.photo.list(); req.execute(function(data) { data.items = data.items || []; console.log("-- We have " + data.items.length); addPhotos(data.items); });
  • 36. "Smart" Client ● Network calls are expensive ● "Client" photo library ○ Lawnchair allows us to store photos' metadata offline ○ filer.js to store the photos ○ Application Cache ● Do not Repeat Yourself ○ Applies to code and to API calls ○ Only retrieve photos that have been updated since the last API call
  • 38. What Is New? ○ Edit local projects ○ Check Devices: User agents, screen sizes, touch events etc' ○ Map source for: coffeescript, sass, dart etc'. ○ Test on your mobile device from DevTools. ○ More? ■ GDL "The Breakpoint" episodes ■ Improving Your 2013 Productivity With The Chrome DevTools
  • 39. The Screen Are Smaller ● Debug ○ Remote debugging hack with jsconsole.com ○ Chrome for Android remote debug with DevTools. ● Testing ○ Qunit to test models ○ Selenium and its mobile option Remote Web Driver ● How To ○ http://mobile-html.appspot.com/
  • 40. Debug With Chrome DevTools
  • 41. Key Take Aways ● Build powerful applications with Google Cloud Endpoints ● HTML5 APIs are ready and getting better fast. ● AngularJS - be more productive ● Leverage Modern Browser Features: ○ Offline ○ Web RTC ○ New CSS3 artifacts ○ Web workers
  • 42. Questions? THANK YOU! Ido Green Developer Relations http://plus.google.com/+greenido App:: https://picturesque-app.appspot.com/ HTML5 APIs: http://ido-green.appspot.com/html5fest-il/ Slides: http://ido-green.appspot.com/