SlideShare a Scribd company logo
1 of 43
Download to read offline
Mobile, Web and Cloud -
The Triple Crown of Modern Applications
Ido Green, Developer Advocate
Danny Hermes, Developer Programs Engineer
Modern Mobile/Web Applications
Modern Applications
● Self Contained
● "Offline First"
● MV* Frameworks
● Device Aware
● #Perfmatters
#io13
AngularJS - Client Side Framework
Angular.js - Let you extend HTML
vocabulary for your application.
● Data binding
● Extensible HTML
● Dependency Injection / Testable
#io13
More options: addyosmani.github.com/todomvc/
Mobile World - RESTful World
#io13
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...
● 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?
#io13
● 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)
#io13
Google Cloud Endpoints
Modern Apps and The Server Conundrum
All modern applications have to deal with a server
○ Offload Computation
○ Sharing and Collaboration
○ Logs
But who wants to run a server
○ Spikey traffic
○ Client Server communication
○ Serialization
○ OAuth Dance
#io13
Google App Engine
#io13
Google App Engine
#io13
Google Cloud Endpoints
#io13
Back the Truck Up
#io13
Google APIs: The Discovery Document
#io13
Google APIs: Client Libraries Like Whoa!!
● 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
#io13
Google APIs
Client Libraries Like Whoa!!
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>
What Was that Again: Google Cloud Endpoints
#io13
Demo Time!
picturesque-app.appspot.com
Data Model for CRUD App
Python
from endpoints_proto_datastore.ndb import EndpointsModel
class Photo(EndpointsModel):
...
Data Model for CRUD App
Python
from endpoints_proto_datastore.ndb import EndpointsModel
class Photo(EndpointsModel):
title = ndb.StringProperty()
Data Model for CRUD App
Python
from endpoints_proto_datastore.ndb import EndpointsModel
class Photo(EndpointsModel):
title = ndb.StringProperty()
description = ndb.StringProperty()
Data Model for CRUD App
Python
from endpoints_proto_datastore.ndb import EndpointsModel
class Photo(EndpointsModel):
title = ndb.StringProperty()
description = ndb.StringProperty()
base64_photo = ndb.BlobProperty('base64Photo', indexed=False)
Data Model for CRUD App
Python
from endpoints_proto_datastore.ndb import EndpointsModel
class Photo(EndpointsModel):
title = ndb.StringProperty()
description = ndb.StringProperty()
base64_photo = ndb.BlobProperty('base64Photo', indexed=False)
updated = ndb.DateTimeProperty(auto_now=True, indexed=False)
Data Model for CRUD App
Python
from endpoints_proto_datastore.ndb import EndpointsModel
class Photo(EndpointsModel):
_message_fields_schema = ('id', 'title', 'description',
'base64Photo', 'updated')
title = ndb.StringProperty()
description = ndb.StringProperty()
base64_photo = ndb.BlobProperty('base64Photo', indexed=False)
updated = ndb.DateTimeProperty(auto_now=True, indexed=False)
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
Python
@Photo.method(path='photo/{id}', http_method='PUT', name='photo.update')
def PhotoUpdate(self, photo):
if not photo.from_datastore:
raise endpoints.NotFoundException('Photo not found.')
photo.put()
return photo
Update Demo
Python
Add some tags to support that UI
Python
class Photo(EndpointsModel):
title = ndb.StringProperty()
description = ndb.StringProperty()
base64_photo = ndb.BlobProperty('base64Photo', indexed=False)
created = ndb.DateTimeProperty(auto_now_add=True, indexed=False)
tags = ndb.StringProperty(repeated=True)
List and Search, All at Once
Python
@Photo.query_method(query_fields=('limit', 'pageToken', 'title'),
path='photos', name='photo.list')
def PhotoList(self, query):
return query
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);
});
Lemme, Lemme Upgrade U!
picturesque-app-upgrade.appspot.com
Adding auth via OAuth 2.0
Python
@Photo.method(user_required=True,
path='photo/{id}', http_method='PUT', name='photo.update')
def PhotoUpdate(self, photo):
...
Really that easy
Adding auth via OAuth 2.0
Python
from endpoints_proto_datastore.ndb import EndpointsUserProperty
class Photo(EndpointsModel):
_message_fields_schema = ('id', 'title', 'description',
'base64Photo', 'updated'
title = ndb.StringProperty()
description = ndb.StringProperty()
base64_photo = ndb.BlobProperty('base64Photo', indexed=False)
updated = ndb.DateTimeProperty(auto_now_add=True, indexed=False)
owner = EndpointsUserProperty(required=True, raise_unauthorized=True)
Alternative: Using models for auth
OAuth2.0 Demo - 1
Python
The
live
demo
Interface Informed by Client
● Network calls are expensive
● "Client" photo library
○ Lawnchair allows us to store photos' metadata offline
○ filer.js to store the photos
○ Application Cache
○ HTML5 Storage
● DRY: Applies to code and to API calls
○ Only retrieve photos that have been updated since the last
API call
Extending query_method
Python
from endpoints_proto_datastore.ndb import EndpointsAliasProperty
from endpoints_proto_datastore import utils
class Photo(EndpointsModel):
...
_last_updated = None
@EndpointsAliasProperty(name='lastUpdated', setter=LastUpdatedSet)
def last_updated(self):
if self._last_updated is not None:
try:
return utils.DatetimeValueToString(self._last_updated)
except:
raise endpoints.BadRequestException(
'Invalid timestamp for lastUpdated')
Extending query_method
Python
class Photo(EndpointsModel):
...
def LastUpdatedSet(self, value):
try:
self._last_updated = utils.DatetimeValueFromString(value)
if not isinstance(self._last_updated, datetime.datetime):
self._last_updated = None
raise TypeError('Not a datetime stamp.')
except TypeError:
raise endpoints.BadRequestException('Invalid timestamp for lastUpdated.')
self._endpoints_query_info._filters.add(
Photo.updated >= self._last_updated)
Extending query_method
Python
@Photo.query_method(query_fields=('limit', 'pageToken',
'title', 'lastUpdated'),
path='photos', name='photo.list')
def PhotoList(self, query):
return query.order(Photo.updated)
Client Side Conventions
Javascript
PicturesqueApp.showCarousel = function() {
if (!PicturesqueApp.localImagesAdded) {
PicturesqueApp.populateCarouselFromLocalImages();
};
PicturesqueApp.applyLastUpdated(PicturesqueApp.listSinceUpdated);
};
Key Take Aways
● Build powerful applications with Google Cloud Endpoints
● Cloud Endpoints makes for easy deployment at scale
● Use AngularJS to be more productive
● Leverage Modern Browser Features:
○ Offline
○ Web RTC
○ Websockets
○ New CSS3 artifacts
○ Web workers
#io13
Questions?
Ido Green
Developer Relations
http://plus.google.com/+greenido
App:: https://picturesque-app-upgrade.appspot.com/
Code: https://github.com/greenido/
Slides: https://picturesque-app-upgrade.appspot.com/slides
Danny Hermes
Developer Programs Engineer
plus.google.com/+DannyHermes

More Related Content

Viewers also liked

4th grade curriculum night classroom 10 11
4th grade curriculum night classroom  10 114th grade curriculum night classroom  10 11
4th grade curriculum night classroom 10 11Bret Biornstad
 
Lessons Learned and Best Practices for Game Development in the Cloud
Lessons Learned and Best Practices for Game Development in the CloudLessons Learned and Best Practices for Game Development in the Cloud
Lessons Learned and Best Practices for Game Development in the Cloudsarahnovotny
 
Welcome To Msp Information Night 2010
Welcome To Msp Information Night 2010Welcome To Msp Information Night 2010
Welcome To Msp Information Night 2010Bret Biornstad
 
Knowing your trainees
Knowing your traineesKnowing your trainees
Knowing your traineesHamdan Hashim
 
Jan 4 Sermon
Jan 4 SermonJan 4 Sermon
Jan 4 SermonGeo Acts
 
איך להתחיל סטארטאפ 2016
איך להתחיל סטארטאפ 2016איך להתחיל סטארטאפ 2016
איך להתחיל סטארטאפ 2016Ido Green
 
Catalogo di Innova Day Motor Sport Technologies 2013
Catalogo di Innova Day Motor Sport Technologies 2013Catalogo di Innova Day Motor Sport Technologies 2013
Catalogo di Innova Day Motor Sport Technologies 2013Francesco Baruffi
 
Java Eye Architecture
Java Eye ArchitectureJava Eye Architecture
Java Eye ArchitectureRobbin Fan
 
精益创业讨论
精益创业讨论精益创业讨论
精益创业讨论Robbin Fan
 
Wiki Technology By It Rocks
Wiki Technology By It RocksWiki Technology By It Rocks
Wiki Technology By It Rocksnaveenv
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationMohammed Farrag
 

Viewers also liked (20)

Uni5
Uni5Uni5
Uni5
 
4th grade curriculum night classroom 10 11
4th grade curriculum night classroom  10 114th grade curriculum night classroom  10 11
4th grade curriculum night classroom 10 11
 
Sf 02S201test
Sf 02S201testSf 02S201test
Sf 02S201test
 
VANABBETOTVESSEM
VANABBETOTVESSEMVANABBETOTVESSEM
VANABBETOTVESSEM
 
Lessons Learned and Best Practices for Game Development in the Cloud
Lessons Learned and Best Practices for Game Development in the CloudLessons Learned and Best Practices for Game Development in the Cloud
Lessons Learned and Best Practices for Game Development in the Cloud
 
Rwservlet
RwservletRwservlet
Rwservlet
 
5th Grade
5th Grade5th Grade
5th Grade
 
Paraulesimites
ParaulesimitesParaulesimites
Paraulesimites
 
Welcome To Msp Information Night 2010
Welcome To Msp Information Night 2010Welcome To Msp Information Night 2010
Welcome To Msp Information Night 2010
 
Knowing your trainees
Knowing your traineesKnowing your trainees
Knowing your trainees
 
Jan 4 Sermon
Jan 4 SermonJan 4 Sermon
Jan 4 Sermon
 
איך להתחיל סטארטאפ 2016
איך להתחיל סטארטאפ 2016איך להתחיל סטארטאפ 2016
איך להתחיל סטארטאפ 2016
 
Catalogo di Innova Day Motor Sport Technologies 2013
Catalogo di Innova Day Motor Sport Technologies 2013Catalogo di Innova Day Motor Sport Technologies 2013
Catalogo di Innova Day Motor Sport Technologies 2013
 
Why Ruby?
Why Ruby?Why Ruby?
Why Ruby?
 
Startup_10_Mosse_140215
Startup_10_Mosse_140215Startup_10_Mosse_140215
Startup_10_Mosse_140215
 
Java Eye Architecture
Java Eye ArchitectureJava Eye Architecture
Java Eye Architecture
 
精益创业讨论
精益创业讨论精益创业讨论
精益创业讨论
 
Wiki Technology By It Rocks
Wiki Technology By It RocksWiki Technology By It Rocks
Wiki Technology By It Rocks
 
0 to enterprise
0 to enterprise0 to enterprise
0 to enterprise
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
 

Similar to Mobile, web and cloud - the triple crown of modern applications

Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)Ido Green
 
Modern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIsModern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIsIdo Green
 
Utilizing HTML5 APIs
Utilizing HTML5 APIsUtilizing HTML5 APIs
Utilizing HTML5 APIsIdo Green
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteorSapna Upreti
 
Introduction to App Engine Development
Introduction to App Engine DevelopmentIntroduction to App Engine Development
Introduction to App Engine DevelopmentRon Reiter
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidAlberto Ruibal
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJSGregor Woiwode
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Lou Sacco
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsDigamber Singh
 
Vue.js + Django - configuración para desarrollo con webpack y HMR
Vue.js + Django - configuración para desarrollo con webpack y HMRVue.js + Django - configuración para desarrollo con webpack y HMR
Vue.js + Django - configuración para desarrollo con webpack y HMRJavier Abadía
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...Wim Selles
 
Node in Production at Aviary
Node in Production at AviaryNode in Production at Aviary
Node in Production at AviaryAviary
 
Naive application development
Naive application developmentNaive application development
Naive application developmentShaka Huang
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEORNodeXperts
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Frost
 
Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8wsmarouan
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyUlrich Krause
 
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...wesley chun
 
Make the Web 3D
Make the Web 3DMake the Web 3D
Make the Web 3DAdam Nagy
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10Chris Schalk
 

Similar to Mobile, web and cloud - the triple crown of modern applications (20)

Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
 
Modern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIsModern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIs
 
Utilizing HTML5 APIs
Utilizing HTML5 APIsUtilizing HTML5 APIs
Utilizing HTML5 APIs
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
Introduction to App Engine Development
Introduction to App Engine DevelopmentIntroduction to App Engine Development
Introduction to App Engine Development
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJS
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive Forms
 
Vue.js + Django - configuración para desarrollo con webpack y HMR
Vue.js + Django - configuración para desarrollo con webpack y HMRVue.js + Django - configuración para desarrollo con webpack y HMR
Vue.js + Django - configuración para desarrollo con webpack y HMR
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
 
Node in Production at Aviary
Node in Production at AviaryNode in Production at Aviary
Node in Production at Aviary
 
Naive application development
Naive application developmentNaive application development
Naive application development
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
 
Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
 
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
 
Make the Web 3D
Make the Web 3DMake the Web 3D
Make the Web 3D
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10
 

More from Ido Green

How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta Ido Green
 
Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Ido Green
 
The Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is HereThe Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is HereIdo Green
 
Open Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core SummitOpen Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core SummitIdo Green
 
DevOps as a competitive advantage
DevOps as a competitive advantageDevOps as a competitive advantage
DevOps as a competitive advantageIdo Green
 
Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)Ido Green
 
Create An Amazing Apps For The Google Assistant!
Create An Amazing Apps For The Google Assistant!Create An Amazing Apps For The Google Assistant!
Create An Amazing Apps For The Google Assistant!Ido Green
 
Google Assistant - Why? How?
Google Assistant - Why? How?Google Assistant - Why? How?
Google Assistant - Why? How?Ido Green
 
The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)Ido Green
 
Actions On Google - GDD Europe 2017
Actions On Google - GDD Europe 2017Actions On Google - GDD Europe 2017
Actions On Google - GDD Europe 2017Ido Green
 
Building conversational experiences with Actions on Google
Building conversational experiences with Actions on GoogleBuilding conversational experiences with Actions on Google
Building conversational experiences with Actions on GoogleIdo Green
 
Actions On Google - How? Why?
Actions On Google - How? Why?Actions On Google - How? Why?
Actions On Google - How? Why?Ido Green
 
Startups Best Practices
Startups Best PracticesStartups Best Practices
Startups Best PracticesIdo Green
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For StartupsIdo Green
 
Earn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMobEarn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMobIdo Green
 
How To Grow Your User Base?
How To Grow Your User Base?How To Grow Your User Base?
How To Grow Your User Base?Ido Green
 
Amp Overview #YGLF 2016
Amp Overview #YGLF 2016Amp Overview #YGLF 2016
Amp Overview #YGLF 2016Ido Green
 
AMP - Accelerated Mobile Pages
AMP - Accelerated Mobile PagesAMP - Accelerated Mobile Pages
AMP - Accelerated Mobile PagesIdo Green
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWAIdo Green
 

More from Ido Green (20)

How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta
 
Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]
 
The Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is HereThe Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is Here
 
Open Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core SummitOpen Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core Summit
 
DevOps as a competitive advantage
DevOps as a competitive advantageDevOps as a competitive advantage
DevOps as a competitive advantage
 
Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)
 
Create An Amazing Apps For The Google Assistant!
Create An Amazing Apps For The Google Assistant!Create An Amazing Apps For The Google Assistant!
Create An Amazing Apps For The Google Assistant!
 
VUI Design
VUI DesignVUI Design
VUI Design
 
Google Assistant - Why? How?
Google Assistant - Why? How?Google Assistant - Why? How?
Google Assistant - Why? How?
 
The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)
 
Actions On Google - GDD Europe 2017
Actions On Google - GDD Europe 2017Actions On Google - GDD Europe 2017
Actions On Google - GDD Europe 2017
 
Building conversational experiences with Actions on Google
Building conversational experiences with Actions on GoogleBuilding conversational experiences with Actions on Google
Building conversational experiences with Actions on Google
 
Actions On Google - How? Why?
Actions On Google - How? Why?Actions On Google - How? Why?
Actions On Google - How? Why?
 
Startups Best Practices
Startups Best PracticesStartups Best Practices
Startups Best Practices
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For Startups
 
Earn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMobEarn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMob
 
How To Grow Your User Base?
How To Grow Your User Base?How To Grow Your User Base?
How To Grow Your User Base?
 
Amp Overview #YGLF 2016
Amp Overview #YGLF 2016Amp Overview #YGLF 2016
Amp Overview #YGLF 2016
 
AMP - Accelerated Mobile Pages
AMP - Accelerated Mobile PagesAMP - Accelerated Mobile Pages
AMP - Accelerated Mobile Pages
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWA
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

Mobile, web and cloud - the triple crown of modern applications

  • 1. Mobile, Web and Cloud - The Triple Crown of Modern Applications Ido Green, Developer Advocate Danny Hermes, Developer Programs Engineer
  • 3. Modern Applications ● Self Contained ● "Offline First" ● MV* Frameworks ● Device Aware ● #Perfmatters #io13
  • 4. AngularJS - Client Side Framework Angular.js - Let you extend HTML vocabulary for your application. ● Data binding ● Extensible HTML ● Dependency Injection / Testable #io13 More options: addyosmani.github.com/todomvc/
  • 5. Mobile World - RESTful World #io13 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...
  • 6. ● 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? #io13
  • 7. ● 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) #io13
  • 9. Modern Apps and The Server Conundrum All modern applications have to deal with a server ○ Offload Computation ○ Sharing and Collaboration ○ Logs But who wants to run a server ○ Spikey traffic ○ Client Server communication ○ Serialization ○ OAuth Dance #io13
  • 13. Back the Truck Up #io13
  • 14. Google APIs: The Discovery Document #io13
  • 15. Google APIs: Client Libraries Like Whoa!! ● 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 #io13
  • 16. Google APIs Client Libraries Like Whoa!! 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>
  • 17. What Was that Again: Google Cloud Endpoints #io13
  • 19. Data Model for CRUD App Python from endpoints_proto_datastore.ndb import EndpointsModel class Photo(EndpointsModel): ...
  • 20. Data Model for CRUD App Python from endpoints_proto_datastore.ndb import EndpointsModel class Photo(EndpointsModel): title = ndb.StringProperty()
  • 21. Data Model for CRUD App Python from endpoints_proto_datastore.ndb import EndpointsModel class Photo(EndpointsModel): title = ndb.StringProperty() description = ndb.StringProperty()
  • 22. Data Model for CRUD App Python from endpoints_proto_datastore.ndb import EndpointsModel class Photo(EndpointsModel): title = ndb.StringProperty() description = ndb.StringProperty() base64_photo = ndb.BlobProperty('base64Photo', indexed=False)
  • 23. Data Model for CRUD App Python from endpoints_proto_datastore.ndb import EndpointsModel class Photo(EndpointsModel): title = ndb.StringProperty() description = ndb.StringProperty() base64_photo = ndb.BlobProperty('base64Photo', indexed=False) updated = ndb.DateTimeProperty(auto_now=True, indexed=False)
  • 24. Data Model for CRUD App Python from endpoints_proto_datastore.ndb import EndpointsModel class Photo(EndpointsModel): _message_fields_schema = ('id', 'title', 'description', 'base64Photo', 'updated') title = ndb.StringProperty() description = ndb.StringProperty() base64_photo = ndb.BlobProperty('base64Photo', indexed=False) updated = ndb.DateTimeProperty(auto_now=True, indexed=False)
  • 25. Simple GET API Request
  • 26. 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
  • 27. Insert With Drag and Drop Demo Python
  • 28. Update Python @Photo.method(path='photo/{id}', http_method='PUT', name='photo.update') def PhotoUpdate(self, photo): if not photo.from_datastore: raise endpoints.NotFoundException('Photo not found.') photo.put() return photo
  • 30. Add some tags to support that UI Python class Photo(EndpointsModel): title = ndb.StringProperty() description = ndb.StringProperty() base64_photo = ndb.BlobProperty('base64Photo', indexed=False) created = ndb.DateTimeProperty(auto_now_add=True, indexed=False) tags = ndb.StringProperty(repeated=True)
  • 31. List and Search, All at Once Python @Photo.query_method(query_fields=('limit', 'pageToken', 'title'), path='photos', name='photo.list') def PhotoList(self, query): return query
  • 32. 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); });
  • 33. Lemme, Lemme Upgrade U! picturesque-app-upgrade.appspot.com
  • 34. Adding auth via OAuth 2.0 Python @Photo.method(user_required=True, path='photo/{id}', http_method='PUT', name='photo.update') def PhotoUpdate(self, photo): ... Really that easy
  • 35. Adding auth via OAuth 2.0 Python from endpoints_proto_datastore.ndb import EndpointsUserProperty class Photo(EndpointsModel): _message_fields_schema = ('id', 'title', 'description', 'base64Photo', 'updated' title = ndb.StringProperty() description = ndb.StringProperty() base64_photo = ndb.BlobProperty('base64Photo', indexed=False) updated = ndb.DateTimeProperty(auto_now_add=True, indexed=False) owner = EndpointsUserProperty(required=True, raise_unauthorized=True) Alternative: Using models for auth
  • 36. OAuth2.0 Demo - 1 Python The live demo
  • 37. Interface Informed by Client ● Network calls are expensive ● "Client" photo library ○ Lawnchair allows us to store photos' metadata offline ○ filer.js to store the photos ○ Application Cache ○ HTML5 Storage ● DRY: Applies to code and to API calls ○ Only retrieve photos that have been updated since the last API call
  • 38. Extending query_method Python from endpoints_proto_datastore.ndb import EndpointsAliasProperty from endpoints_proto_datastore import utils class Photo(EndpointsModel): ... _last_updated = None @EndpointsAliasProperty(name='lastUpdated', setter=LastUpdatedSet) def last_updated(self): if self._last_updated is not None: try: return utils.DatetimeValueToString(self._last_updated) except: raise endpoints.BadRequestException( 'Invalid timestamp for lastUpdated')
  • 39. Extending query_method Python class Photo(EndpointsModel): ... def LastUpdatedSet(self, value): try: self._last_updated = utils.DatetimeValueFromString(value) if not isinstance(self._last_updated, datetime.datetime): self._last_updated = None raise TypeError('Not a datetime stamp.') except TypeError: raise endpoints.BadRequestException('Invalid timestamp for lastUpdated.') self._endpoints_query_info._filters.add( Photo.updated >= self._last_updated)
  • 40. Extending query_method Python @Photo.query_method(query_fields=('limit', 'pageToken', 'title', 'lastUpdated'), path='photos', name='photo.list') def PhotoList(self, query): return query.order(Photo.updated)
  • 41. Client Side Conventions Javascript PicturesqueApp.showCarousel = function() { if (!PicturesqueApp.localImagesAdded) { PicturesqueApp.populateCarouselFromLocalImages(); }; PicturesqueApp.applyLastUpdated(PicturesqueApp.listSinceUpdated); };
  • 42. Key Take Aways ● Build powerful applications with Google Cloud Endpoints ● Cloud Endpoints makes for easy deployment at scale ● Use AngularJS to be more productive ● Leverage Modern Browser Features: ○ Offline ○ Web RTC ○ Websockets ○ New CSS3 artifacts ○ Web workers #io13
  • 43. Questions? Ido Green Developer Relations http://plus.google.com/+greenido App:: https://picturesque-app-upgrade.appspot.com/ Code: https://github.com/greenido/ Slides: https://picturesque-app-upgrade.appspot.com/slides Danny Hermes Developer Programs Engineer plus.google.com/+DannyHermes