SlideShare a Scribd company logo
Modern Web Applications Utilizing HTML5 APIs
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
● Fundamental pattern for separating
concerns
● Model handles data and server
persistence layer
● View handles user input and
rendering
● Used to be on the server --> Now
moving to the thicker client.
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...
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"
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
Back the Truck Up
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?
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/
Thank you!

More Related Content

What's hot (19)

PDF
Vietnam qa meetup
Syam Sasi
 
PPTX
Introduction to Ionic framework
Shyjal Raazi
 
PDF
Anton Sakharov: The risks you take when develop cross-platform apps using HT...
Mobile Trends
 
PDF
Flutter Workshop 2021 @ ARU
Anuchit Chalothorn
 
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
 
PPTX
Creating books app with react native
Ali Sa'o
 
PDF
Discover Android Wear
Troy Miles
 
PPT
Dockerising Appium : London Appium Meetup
Shashikant Jagtap
 
PDF
React Native custom components
Jeremy Grancher
 
PDF
Intro to react native
ModusJesus
 
PDF
Experiences building apps with React Native @UtrechtJS May 2016
Adrian Philipp
 
PDF
Getting Started with Cross-Platform Mobile Development with Flutter and Dart
Harshith Keni
 
PDF
Ionic CLI Adventures
Juarez Filho
 
PDF
Hybrid Apps with Ionic Framework
Bramus Van Damme
 
Vietnam qa meetup
Syam Sasi
 
Introduction to Ionic framework
Shyjal Raazi
 
Anton Sakharov: The risks you take when develop cross-platform apps using HT...
Mobile Trends
 
Flutter Workshop 2021 @ ARU
Anuchit Chalothorn
 
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
 
Creating books app with react native
Ali Sa'o
 
Discover Android Wear
Troy Miles
 
Dockerising Appium : London Appium Meetup
Shashikant Jagtap
 
React Native custom components
Jeremy Grancher
 
Intro to react native
ModusJesus
 
Experiences building apps with React Native @UtrechtJS May 2016
Adrian Philipp
 
Getting Started with Cross-Platform Mobile Development with Flutter and Dart
Harshith Keni
 
Ionic CLI Adventures
Juarez Filho
 
Hybrid Apps with Ionic Framework
Bramus Van Damme
 

Viewers also liked (20)

PDF
Utilizing HTML5 APIs
Ido Green
 
PDF
Web Forms The Right Way
Ido Green
 
PDF
Unravelling Mobile Web Performance
Guy Podjarny
 
PPT
5 things MySql
sarahnovotny
 
PDF
איך להתחיל סטארטאפ 2016
Ido Green
 
PPT
liceo paola cs
gueroz4
 
PDF
Dg Analysis Haiti Earthquake 15 Jan2010
Geo Acts
 
PDF
Is it Hard Money or Hard to Get Money?
Joseph Andahazy
 
PPT
Presentation1
payitearly
 
PPTX
Responding to student writing
Elizabeth Nesius
 
PPTX
Lessons Learned and Best Practices for Game Development in the Cloud
sarahnovotny
 
PDF
Book V Getting The Internship You Want: How to write APPIC essays that get ...
The Internship Resource Center of The Professional Development Institute
 
PDF
Rapid Control Prototyping
guest0eeac7
 
PPTX
Answergen bi ppt-apr 09 2015
TS Kumaresh
 
PPT
La Guerra Del Nord
mapaa
 
PDF
סטארטאפ - איך? כמה? ולמה
Ido Green
 
PPTX
Kenzy klauser vet speech and preso
David R. Klauser
 
PPT
The Hybrid Tutoring Experience
Elizabeth Nesius
 
PDF
Ido Green - YQL demo
Ido Green
 
PPT
Knowing your trainees
Hamdan Hashim
 
Utilizing HTML5 APIs
Ido Green
 
Web Forms The Right Way
Ido Green
 
Unravelling Mobile Web Performance
Guy Podjarny
 
5 things MySql
sarahnovotny
 
איך להתחיל סטארטאפ 2016
Ido Green
 
liceo paola cs
gueroz4
 
Dg Analysis Haiti Earthquake 15 Jan2010
Geo Acts
 
Is it Hard Money or Hard to Get Money?
Joseph Andahazy
 
Presentation1
payitearly
 
Responding to student writing
Elizabeth Nesius
 
Lessons Learned and Best Practices for Game Development in the Cloud
sarahnovotny
 
Book V Getting The Internship You Want: How to write APPIC essays that get ...
The Internship Resource Center of The Professional Development Institute
 
Rapid Control Prototyping
guest0eeac7
 
Answergen bi ppt-apr 09 2015
TS Kumaresh
 
La Guerra Del Nord
mapaa
 
סטארטאפ - איך? כמה? ולמה
Ido Green
 
Kenzy klauser vet speech and preso
David R. Klauser
 
The Hybrid Tutoring Experience
Elizabeth Nesius
 
Ido Green - YQL demo
Ido Green
 
Knowing your trainees
Hamdan Hashim
 
Ad

Similar to Modern Web Applications 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
 
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
Front-end. Global domination
Stfalcon Meetups
 
PDF
Frontend. Global domination.
Андрей Вандакуров
 
PPTX
HTML5 for Rich User Experience
Mahbubur Rahman
 
PDF
Building Cross Platform Mobile Web Apps
James Pearce
 
PPTX
HTML5 on Mobile
Adam Lu
 
PDF
Preparing your web services for Android and your Android app for web services...
Droidcon Eastern Europe
 
PDF
Workshop HTML5+PhoneGap by Ivano Malavolta
Commit University
 
PDF
Always on! ... or not?
Carsten Sandtner
 
PDF
The Open Web and what it means
Robert Nyman
 
PDF
Designing your API Server for mobile apps
Mugunth Kumar
 
PPT
Advanced Web Development
Robert J. Stein
 
PDF
Past, Present and Future of APIs of Mobile and Web Apps
SmartBear
 
PDF
HTML5 and the dawn of rich mobile web applications
James Pearce
 
KEY
Molly Holzschlag - How HTML 5 is Going to Completely Change your Web App
Carsonified Team
 
KEY
Rise of Mobile and Web Runtimes - for Standards-Next
Daniel Appelquist
 
KEY
Palm Developer Day PhoneGap
Brian LeRoux
 
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Ido Green
 
Mobile, web and cloud - the triple crown of modern applications
Ido Green
 
APIs for modern web apps
Chris Mills
 
Mobile Backend Apps and APIs meetup London overview of BaaS APIs and discussi...
Taras Filatov
 
Front-end. Global domination
Stfalcon Meetups
 
Frontend. Global domination.
Андрей Вандакуров
 
HTML5 for Rich User Experience
Mahbubur Rahman
 
Building Cross Platform Mobile Web Apps
James Pearce
 
HTML5 on Mobile
Adam Lu
 
Preparing your web services for Android and your Android app for web services...
Droidcon Eastern Europe
 
Workshop HTML5+PhoneGap by Ivano Malavolta
Commit University
 
Always on! ... or not?
Carsten Sandtner
 
The Open Web and what it means
Robert Nyman
 
Designing your API Server for mobile apps
Mugunth Kumar
 
Advanced Web Development
Robert J. Stein
 
Past, Present and Future of APIs of Mobile and Web Apps
SmartBear
 
HTML5 and the dawn of rich mobile web applications
James Pearce
 
Molly Holzschlag - How HTML 5 is Going to Completely Change your Web App
Carsonified Team
 
Rise of Mobile and Web Runtimes - for Standards-Next
Daniel Appelquist
 
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
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PDF
Python Conference Singapore - 19 Jun 2025
ninefyi
 
PDF
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
PDF
Open Source Milvus Vector Database v 2.6
Zilliz
 
PPTX
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
PDF
The Growing Value and Application of FME & GenAI
Safe Software
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PPTX
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
Python Conference Singapore - 19 Jun 2025
ninefyi
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
Open Source Milvus Vector Database v 2.6
Zilliz
 
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
Practical Applications of AI in Local Government
OnBoard
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
The Growing Value and Application of FME & GenAI
Safe Software
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 

Modern Web Applications Utilizing HTML5 APIs

  • 1. Modern Web Applications Utilizing HTML5 APIs 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 ● Fundamental pattern for separating concerns ● Model handles data and server persistence layer ● View handles user input and rendering ● Used to be on the server --> Now moving to the thicker client.
  • 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. Demo of 'Note Generator'
  • 20. 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"
  • 22. 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? 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/ Thank you!