SlideShare una empresa de Scribd logo
1 de 47
A Look Ahead: Surveying Next-
Gen Modern Browser
(hardware/native) APIs
Shikhir Singh
@shikhirsingh
Current: Offline + Native/Hardware Access via Hybrid Apps
3
Common Considerations: Choosing Native, Hybrid, or
WebApp
Performanc
e
Hardware or
Native
Deployment
& Access
Connectivity
Performance
Connectivity/
Offline
Deployment/
Access
Hardware
Native ✓ ✓ ✓
App Store / Home Screen
✓
Hybrid ✓ ✓
App Store / Home Screen
✓
WebApp
✓
✓ ✓ ✓
Links / Home Screen
✓
Performance for Enterprise Apps
Desktop Apps: No Obsession in Enterprise for Native Apps
Vs
Hardware Accelerated Animations and Transformations
Performance
Connectivity/
Offline
Deployment/
Access
Hardware
Native ✓ ✓ ✓
App Store / Home Screen
✓
Hybrid ✓ ✓
App Store / Home Screen
✓
WebApp
✓
✓ ✓ ✓
Links / Home Screen
✓
W3C Development Process
Internal Draft
Public Working
Draft
Last Call
Announcement
(Working Draft)
Call For
Implementations
(CR)
Call For Review
(PR)
Standard
Web Incubator
Community
Group Charter
Abandoned
Example Dead Spec - FileSystem API
• Creates Sandbox Filesystem that a web apps can navigate around
• Let’s apps have offline storage features that involve large binary blobs
• Cannot access file via file://
• W3C Spec Status
- Implemented by Chrome, Opera, and Firefox
- Opposed by Edge and Safari
- Result: Dead Spec
Progressive Web Apps – Current Key Technologies
• Web Application Manifest
• Server Workers
{
"lang": "en",
"dir": "ltr",
"name": "Super Racer 3000",
"description": "The ultimate futuristic racing game!",
"short_name": "Racer3K",
"icons": [{
"src": "icon/lowres.webp",
"sizes": "64x64",
"type": "image/webp"
},{
"src": "icon/lowres.png",
"sizes": "64x64"
}, {
"src": "icon/hd_hi",
"sizes": "128x128"
}],
"scope": "/racer/",
"start_url": "/racer/start.html",
"display": "fullscreen",
"orientation": "landscape",
"theme_color": "aliceblue",
"background_color": "red”
}
Web App Manifest
• Provides Metadata for PWA
• Unique Features Features
- Short Name
- Lock Orientation
- Create Standalone and Full Screen apps
- Splash Screen
• Latest working draft contains new
features’
• Web App Manifest Generator
Service Worker
• JavaScript File that run in background
• Enables Modern Capabilities
- Caching
- Push Notifications
- Notifications API
• HTTPS only
Service Worker
Web Push API
• Used inside Service Worker
• Send upto 4 kilobytes of data via Push
• Server must encrypt Push data, which is decrypted by browser
• Action Buttons
Web Push API - Client
Subscribe
Send Subscription
ID to Server
Client Adds Event
Listener for “push”
On Push, Process
and Notify User via
Notifications API
Web Push API: Server-side Push
Endpoint Service Worker
title = “Credit Card Fraud”;
options = {
body: “Did you tip 133% at Mongolian BBQ?”,
icon: "images/ccard.png",
vibrate: [200, 100, 200, 100, 200, 100, 400],
tag: "request",
actions: [
{ action: "yes", title: "Yes", icon: “yes.png" },
{ action: "no", title: "No", icon: “no.png" }
]
};
serviceWorkerRegistration.showNotification(title,
options);
Notifications API
• Used with Push to inform user
• Must get Permissions from User
Offline Access
• AppCache API – Not great for multipage sites
• Service Worker
Web Assembly – Use Cases
• Platform Emulation (DOSBox)
• Language Interpreters and Virtual
Machines!
• Remote Desktop
• VPN
• Encryption
• Fat Clients for Enterprise Apps
• Hybrid Native Apps on Mobile Devices
• Speed for Existing Frameworks
• Images / Video Editing
• Games!
• Peer to Peer Applications
• Music Apps
• Image Recognition
• VR & Augmented Reality
• CAD, Education & Science
Visualizations
someElement.addEventListener("webkitmouseforcedown", enterForceClick,
false);
someElement.addEventListener("webkitmouseforceup", endForceClick,
false);
someElement.addEventListener("webkitmouseforcechanged",
forceChanged, false);
3D + Force Touch API
• Force Touch Trackpad
• iPhone 6+
navigator.geolocation.getCurrentPosition(showPosition);
GPS
• Geolocation
• Geofencing (likely abandoned)
let faceDetector = new FaceDetector({fastMode: true,
maxDetectedFaces: 1});
let barcodeDetector = new BarcodeDetector();
barcodeDetector.detect(theImage.then(detectedCodes => {
for (const barcode of detectedCodes) {
// barcode.rawValue
}
}});
Accelerated Shape Detection in
Images
• Hardware Accelerated Shape
Detection
- Faces
- Barcodes
- Custom Shapes
Web Share
navigator.share({title: 'Example Page',
url: 'https://example.com'});Web Share
• Allows sharing text, URLs and images
to arbitrary destinations of User’s
Choice
Web Crypto
• Asymmetric
• Symmetric
• Hashing
• Algorithms
- SHA
- AES
- Elliptical Curve
- Diffie-Hellman
- RSA
- PBKDF2
var recognition = new webkitSpeechRecognition();
recognition.continuous = true;
recognition.interimResults = true;
recognition.onstart = function() { ... }
recognition.onresult = function(event) { ... }
recognition.onerror = function(event) { ... }
recognition.onend = function() { ... }
var utterance = new SpeechSynthesisUtterance('Hello’ +
‘SenchaCon');
window.speechSynthesis.speak(utterance);
Web Speech API
• Recognized and Transcribe Human
Speech
- Choose Language and dialect
• Speech Synthesis
- Pick Voice
- Volume
- Rate
- Pitch
- Language
window.addEventListener(“deviceorientation”, handle, true)
function handle(data) {
var absolute = data.absolute;
var alpha = data.alpha; // Direction of Compass
var beta = data.beta; // Front or Back tilt
var gamma = data.gamma; // Right or Left lilt
// Do stuff with the new orientation data
}
DeviceOrientation API
• Access to Compass
• Access to Gyroscope
• Support: Edge, IE 11, Firefox,
Chrome, Opera, iOS Safari, Android
Browser, Chrome for Android
window.addEventListener(“devicemotion”, handle, true)
function handle(data) {
var acceleration = data.acceleration;
var accelGrav= data.accelerationIncludingGravity;
var rotationRate = data.rotationRate;
}
DeviceMotion API
• Access to Accelerometer
• Support: Edge, IE 11, Firefox,
Chrome, Opera, iOS Safari, Android
Browser, Chrome for Android
let sensor = new ProximitySensor();
sensor.start();
sensor.onchange = event =>
console.log(event.reading.distance);
Proximity Sensor
• Used in mobile devices to turn off
display when in proximity of human
ear or cover
window.addEventListener('devicelight', function(event) {
var html = document.getElementsByTagName('html')[0];
if (event.value < 50) {
html.classList.add('darklight');
html.classList.remove('brightlight');
} else {
html.classList.add('brightlight');
html.classList.remove('darklight');
}
});
Ambient Light Sensor API
• Measures light to conserve battery
document.addEventListener('copy', function(e){
e.clipboardData.setData('text/plain', 'Hello, world!');
e.clipboardData.setData('text/html',
'<b>Hello, world!</b>'); e.preventDefault(); // We
want our data, not selection
});
Clipboard API
• Actions
- Copy
- Cut
- Paste
navigator.getBattery().then(function(battery){
console.log(battery.level);
});
Battery Status API
• Check Battery Level
• Events
- onchargingchange
- onchargingtimechange
- ondischargingtimechange
- Onlevelchange
• W3C Candidate Recommendation
navigator.nfc.requestAdapter().then((nfcAdapter) => {
adapter = nfcAdapter;
adapter.onmessage = onMessage;
};
function onMessage(event) {
var data = event.message.data;
};
Web NFC
• Near Field Communication
• Chrome: In Development
• Firefox: Support
navigator.bluetooth.requestDevice({ filters: [
{ services: ['battery_service'] }
]
}).then(device => { /* ... */ })
.catch(error => { console.log(error); });
Web Bluetooth
• Activate Bluetooth
- chrome://flags/#enable-web-bluetooth
var request = new PresentationRequest(presUrls);
request.getAvailability().then(function(availability) {
handleAvailabilityChange(availability.value);
}
Presentation API
• Present to External Screen
- Projector
- TV
navigator.bluetooth.requestDevice({ filters: [
{ services: ['battery_service'] }
]
}).then(device => { /* ... */ })
.catch(error => { console.log(error); });
Web Share
• Activate Bluetooth
- chrome://flags/#enable-web-bluetooth
window.addEventListener("gamepadconnected",
function(e) {
console.log(”Connected at index %d: %s. %d buttons,
%d axes.", e.gamepad.index,
e.gamepad.id, e.gamepad.buttons.length,
e.gamepad.axes.length);
});
Gamepad API
• Near Field Communication
• Chrome: In Development
• Firefox: Support
Summary
• Web is gearing up to take on Native
• Performance Discussion is irrelevant for most apps
• Google Chrome is leading the way in implementing new technologies
• Nearly all hardware common mobile devices will be accessed easily
• Web Apps will be more stable than Cordova due to better plugin ecosystem
• Success will depend on adoption by all browsers
• Ext JS will incorporate new technologies and will help you manage browser
differences
Resources
• Progressive Web Apps
- https://www.udacity.com/course/intro-to-progressive-web-apps--ud811 (FREE Course!)
- https://developer.mozilla.org/en-US/Apps/Progressive
• W3C
- Device And Sensor Working Group
• https://www.w3.org/2016/03/device-sensors-wg-charter.html
- https://github.com/WICG
Resources
• Browser API Status
- CanIUse.com
- webkit.org/status/
- chromestatus.com
- developer.microsoft.com/en-us/microsoft-edge/platform/status/
• APIs
- App Manifest Generator - https://app-manifest.firebaseapp.com
Resources
• ApplicationCache is a Douchebag
- http://alistapart.com/article/application-cache-is-a-douchebag
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir Singh

Más contenido relacionado

La actualidad más candente

Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
vamsi krishna
 
PowerShell for SharePoint Admins
PowerShell for SharePoint AdminsPowerShell for SharePoint Admins
PowerShell for SharePoint Admins
Rick Taylor
 

La actualidad más candente (19)

Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
Xitrum @ Scala Matsuri Tokyo 2014
Xitrum @ Scala Matsuri Tokyo 2014Xitrum @ Scala Matsuri Tokyo 2014
Xitrum @ Scala Matsuri Tokyo 2014
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthrough
 
ASP.Net 5 and C# 6
ASP.Net 5 and C# 6ASP.Net 5 and C# 6
ASP.Net 5 and C# 6
 
PowerShell for SharePoint Developers
PowerShell for SharePoint DevelopersPowerShell for SharePoint Developers
PowerShell for SharePoint Developers
 
40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently
 
PowerShell for SharePoint Admins
PowerShell for SharePoint AdminsPowerShell for SharePoint Admins
PowerShell for SharePoint Admins
 
Laravel introduction
Laravel introductionLaravel introduction
Laravel introduction
 
Your First Scala Web Application using Play 2.1
Your First Scala Web Application using Play 2.1Your First Scala Web Application using Play 2.1
Your First Scala Web Application using Play 2.1
 
Play! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersPlay! Framework for JavaEE Developers
Play! Framework for JavaEE Developers
 
Life in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with djangoLife in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with django
 
Introduction in the play framework
Introduction in the play frameworkIntroduction in the play framework
Introduction in the play framework
 
Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)
 
SP24S053 Introduction to PowerShell for SharePoint Developers and Administrators
SP24S053 Introduction to PowerShell for SharePoint Developers and AdministratorsSP24S053 Introduction to PowerShell for SharePoint Developers and Administrators
SP24S053 Introduction to PowerShell for SharePoint Developers and Administrators
 
Laravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routingLaravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routing
 
Hey My Web App is Slow Where is the Problem
Hey My Web App is Slow Where is the ProblemHey My Web App is Slow Where is the Problem
Hey My Web App is Slow Where is the Problem
 
Using Play Framework 2 in production
Using Play Framework 2 in productionUsing Play Framework 2 in production
Using Play Framework 2 in production
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play apps
 

Similar a SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir Singh

Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
Robert Nyman
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
Robert Nyman
 
Sviluppare Applicazioni Real Time con AppSync Deck.pptx
Sviluppare Applicazioni Real Time con AppSync Deck.pptxSviluppare Applicazioni Real Time con AppSync Deck.pptx
Sviluppare Applicazioni Real Time con AppSync Deck.pptx
Amazon Web Services
 
HTML5 Programming
HTML5 ProgrammingHTML5 Programming
HTML5 Programming
hotrannam
 

Similar a SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir Singh (20)

Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
Web Standards Support in WebKit
Web Standards Support in WebKitWeb Standards Support in WebKit
Web Standards Support in WebKit
 
Comet from JavaOne 2008
Comet from JavaOne 2008Comet from JavaOne 2008
Comet from JavaOne 2008
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
AWS as platform for scalable applications
AWS as platform for scalable applicationsAWS as platform for scalable applications
AWS as platform for scalable applications
 
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Service
Araport Workshop Tutorial 2: Authentication and the Agave Profiles ServiceAraport Workshop Tutorial 2: Authentication and the Agave Profiles Service
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Service
 
Sviluppare Applicazioni Real Time con AppSync Deck.pptx
Sviluppare Applicazioni Real Time con AppSync Deck.pptxSviluppare Applicazioni Real Time con AppSync Deck.pptx
Sviluppare Applicazioni Real Time con AppSync Deck.pptx
 
signalr
signalrsignalr
signalr
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web apps
 
Back to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteBack to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static website
 
amis-adf-enterprise-mobility
amis-adf-enterprise-mobilityamis-adf-enterprise-mobility
amis-adf-enterprise-mobility
 
HTML5 Programming
HTML5 ProgrammingHTML5 Programming
HTML5 Programming
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
ASP.NET MVC 5 and SignalR 2
ASP.NET MVC 5 and SignalR 2ASP.NET MVC 5 and SignalR 2
ASP.NET MVC 5 and SignalR 2
 
HTML5 for Rich User Experience
HTML5 for Rich User ExperienceHTML5 for Rich User Experience
HTML5 for Rich User Experience
 
Romulus OWASP
Romulus OWASPRomulus OWASP
Romulus OWASP
 
The Future of Responsive Design Standards
The Future of Responsive Design StandardsThe Future of Responsive Design Standards
The Future of Responsive Design Standards
 

Más de Sencha

Más de Sencha (20)

Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web Components
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 Highlights
 
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
 
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop First
 
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
 
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridLeveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
 
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsIntroducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
 
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
 
Building Ext JS Using HATEOAS - Jeff Stano
Building Ext JS Using HATEOAS - Jeff StanoBuilding Ext JS Using HATEOAS - Jeff Stano
Building Ext JS Using HATEOAS - Jeff Stano
 
SenchaCon 2016: Improve Workflow Driven Applications with Ext JS Draw Package...
SenchaCon 2016: Improve Workflow Driven Applications with Ext JS Draw Package...SenchaCon 2016: Improve Workflow Driven Applications with Ext JS Draw Package...
SenchaCon 2016: Improve Workflow Driven Applications with Ext JS Draw Package...
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir Singh

  • 1. A Look Ahead: Surveying Next- Gen Modern Browser (hardware/native) APIs Shikhir Singh @shikhirsingh
  • 2.
  • 3. Current: Offline + Native/Hardware Access via Hybrid Apps 3
  • 4. Common Considerations: Choosing Native, Hybrid, or WebApp Performanc e Hardware or Native Deployment & Access Connectivity
  • 5. Performance Connectivity/ Offline Deployment/ Access Hardware Native ✓ ✓ ✓ App Store / Home Screen ✓ Hybrid ✓ ✓ App Store / Home Screen ✓ WebApp ✓ ✓ ✓ ✓ Links / Home Screen ✓
  • 7. Desktop Apps: No Obsession in Enterprise for Native Apps Vs
  • 8.
  • 9.
  • 10. Hardware Accelerated Animations and Transformations
  • 11. Performance Connectivity/ Offline Deployment/ Access Hardware Native ✓ ✓ ✓ App Store / Home Screen ✓ Hybrid ✓ ✓ App Store / Home Screen ✓ WebApp ✓ ✓ ✓ ✓ Links / Home Screen ✓
  • 12.
  • 13. W3C Development Process Internal Draft Public Working Draft Last Call Announcement (Working Draft) Call For Implementations (CR) Call For Review (PR) Standard Web Incubator Community Group Charter Abandoned
  • 14. Example Dead Spec - FileSystem API • Creates Sandbox Filesystem that a web apps can navigate around • Let’s apps have offline storage features that involve large binary blobs • Cannot access file via file:// • W3C Spec Status - Implemented by Chrome, Opera, and Firefox - Opposed by Edge and Safari - Result: Dead Spec
  • 15. Progressive Web Apps – Current Key Technologies • Web Application Manifest • Server Workers
  • 16. { "lang": "en", "dir": "ltr", "name": "Super Racer 3000", "description": "The ultimate futuristic racing game!", "short_name": "Racer3K", "icons": [{ "src": "icon/lowres.webp", "sizes": "64x64", "type": "image/webp" },{ "src": "icon/lowres.png", "sizes": "64x64" }, { "src": "icon/hd_hi", "sizes": "128x128" }], "scope": "/racer/", "start_url": "/racer/start.html", "display": "fullscreen", "orientation": "landscape", "theme_color": "aliceblue", "background_color": "red” } Web App Manifest • Provides Metadata for PWA • Unique Features Features - Short Name - Lock Orientation - Create Standalone and Full Screen apps - Splash Screen • Latest working draft contains new features’ • Web App Manifest Generator
  • 17. Service Worker • JavaScript File that run in background • Enables Modern Capabilities - Caching - Push Notifications - Notifications API • HTTPS only
  • 19. Web Push API • Used inside Service Worker • Send upto 4 kilobytes of data via Push • Server must encrypt Push data, which is decrypted by browser • Action Buttons
  • 20. Web Push API - Client Subscribe Send Subscription ID to Server Client Adds Event Listener for “push” On Push, Process and Notify User via Notifications API
  • 21. Web Push API: Server-side Push Endpoint Service Worker
  • 22. title = “Credit Card Fraud”; options = { body: “Did you tip 133% at Mongolian BBQ?”, icon: "images/ccard.png", vibrate: [200, 100, 200, 100, 200, 100, 400], tag: "request", actions: [ { action: "yes", title: "Yes", icon: “yes.png" }, { action: "no", title: "No", icon: “no.png" } ] }; serviceWorkerRegistration.showNotification(title, options); Notifications API • Used with Push to inform user • Must get Permissions from User
  • 23. Offline Access • AppCache API – Not great for multipage sites • Service Worker
  • 24. Web Assembly – Use Cases • Platform Emulation (DOSBox) • Language Interpreters and Virtual Machines! • Remote Desktop • VPN • Encryption • Fat Clients for Enterprise Apps • Hybrid Native Apps on Mobile Devices • Speed for Existing Frameworks • Images / Video Editing • Games! • Peer to Peer Applications • Music Apps • Image Recognition • VR & Augmented Reality • CAD, Education & Science Visualizations
  • 27. let faceDetector = new FaceDetector({fastMode: true, maxDetectedFaces: 1}); let barcodeDetector = new BarcodeDetector(); barcodeDetector.detect(theImage.then(detectedCodes => { for (const barcode of detectedCodes) { // barcode.rawValue } }}); Accelerated Shape Detection in Images • Hardware Accelerated Shape Detection - Faces - Barcodes - Custom Shapes
  • 29. navigator.share({title: 'Example Page', url: 'https://example.com'});Web Share • Allows sharing text, URLs and images to arbitrary destinations of User’s Choice
  • 30. Web Crypto • Asymmetric • Symmetric • Hashing • Algorithms - SHA - AES - Elliptical Curve - Diffie-Hellman - RSA - PBKDF2
  • 31. var recognition = new webkitSpeechRecognition(); recognition.continuous = true; recognition.interimResults = true; recognition.onstart = function() { ... } recognition.onresult = function(event) { ... } recognition.onerror = function(event) { ... } recognition.onend = function() { ... } var utterance = new SpeechSynthesisUtterance('Hello’ + ‘SenchaCon'); window.speechSynthesis.speak(utterance); Web Speech API • Recognized and Transcribe Human Speech - Choose Language and dialect • Speech Synthesis - Pick Voice - Volume - Rate - Pitch - Language
  • 32. window.addEventListener(“deviceorientation”, handle, true) function handle(data) { var absolute = data.absolute; var alpha = data.alpha; // Direction of Compass var beta = data.beta; // Front or Back tilt var gamma = data.gamma; // Right or Left lilt // Do stuff with the new orientation data } DeviceOrientation API • Access to Compass • Access to Gyroscope • Support: Edge, IE 11, Firefox, Chrome, Opera, iOS Safari, Android Browser, Chrome for Android
  • 33. window.addEventListener(“devicemotion”, handle, true) function handle(data) { var acceleration = data.acceleration; var accelGrav= data.accelerationIncludingGravity; var rotationRate = data.rotationRate; } DeviceMotion API • Access to Accelerometer • Support: Edge, IE 11, Firefox, Chrome, Opera, iOS Safari, Android Browser, Chrome for Android
  • 34. let sensor = new ProximitySensor(); sensor.start(); sensor.onchange = event => console.log(event.reading.distance); Proximity Sensor • Used in mobile devices to turn off display when in proximity of human ear or cover
  • 35. window.addEventListener('devicelight', function(event) { var html = document.getElementsByTagName('html')[0]; if (event.value < 50) { html.classList.add('darklight'); html.classList.remove('brightlight'); } else { html.classList.add('brightlight'); html.classList.remove('darklight'); } }); Ambient Light Sensor API • Measures light to conserve battery
  • 36. document.addEventListener('copy', function(e){ e.clipboardData.setData('text/plain', 'Hello, world!'); e.clipboardData.setData('text/html', '<b>Hello, world!</b>'); e.preventDefault(); // We want our data, not selection }); Clipboard API • Actions - Copy - Cut - Paste
  • 37. navigator.getBattery().then(function(battery){ console.log(battery.level); }); Battery Status API • Check Battery Level • Events - onchargingchange - onchargingtimechange - ondischargingtimechange - Onlevelchange • W3C Candidate Recommendation
  • 38. navigator.nfc.requestAdapter().then((nfcAdapter) => { adapter = nfcAdapter; adapter.onmessage = onMessage; }; function onMessage(event) { var data = event.message.data; }; Web NFC • Near Field Communication • Chrome: In Development • Firefox: Support
  • 39. navigator.bluetooth.requestDevice({ filters: [ { services: ['battery_service'] } ] }).then(device => { /* ... */ }) .catch(error => { console.log(error); }); Web Bluetooth • Activate Bluetooth - chrome://flags/#enable-web-bluetooth
  • 40. var request = new PresentationRequest(presUrls); request.getAvailability().then(function(availability) { handleAvailabilityChange(availability.value); } Presentation API • Present to External Screen - Projector - TV
  • 41. navigator.bluetooth.requestDevice({ filters: [ { services: ['battery_service'] } ] }).then(device => { /* ... */ }) .catch(error => { console.log(error); }); Web Share • Activate Bluetooth - chrome://flags/#enable-web-bluetooth
  • 42. window.addEventListener("gamepadconnected", function(e) { console.log(”Connected at index %d: %s. %d buttons, %d axes.", e.gamepad.index, e.gamepad.id, e.gamepad.buttons.length, e.gamepad.axes.length); }); Gamepad API • Near Field Communication • Chrome: In Development • Firefox: Support
  • 43. Summary • Web is gearing up to take on Native • Performance Discussion is irrelevant for most apps • Google Chrome is leading the way in implementing new technologies • Nearly all hardware common mobile devices will be accessed easily • Web Apps will be more stable than Cordova due to better plugin ecosystem • Success will depend on adoption by all browsers • Ext JS will incorporate new technologies and will help you manage browser differences
  • 44. Resources • Progressive Web Apps - https://www.udacity.com/course/intro-to-progressive-web-apps--ud811 (FREE Course!) - https://developer.mozilla.org/en-US/Apps/Progressive • W3C - Device And Sensor Working Group • https://www.w3.org/2016/03/device-sensors-wg-charter.html - https://github.com/WICG
  • 45. Resources • Browser API Status - CanIUse.com - webkit.org/status/ - chromestatus.com - developer.microsoft.com/en-us/microsoft-edge/platform/status/ • APIs - App Manifest Generator - https://app-manifest.firebaseapp.com
  • 46. Resources • ApplicationCache is a Douchebag - http://alistapart.com/article/application-cache-is-a-douchebag

Notas del editor

  1. My Background Presentation Focus: Focus on features which are visible to and impact users, not developers No Focus: ECMAScript 6 -> Lee Boonstra’s session after this one will focus on this
  2. Future Browser APIs: Making Native apps less relevant Accessing “Native” and Hardware features
  3. Introduce Cordova and Electron Cordova Summary WebView and Native Hardware access Electron Summary Chromium Content Module and Node
  4. Performace – Historically Native wins Connectivity – Historically meant Native or Hybrid for Offline Deployment / Access – Hybrid +Native = App Store / Home icon – Discuss Future for webapps Hardware / Native Access – Hybrid or Native
  5. Performance for Enterprise Apps
  6. No obsession with native Is Performance an issue? Not for enterprise apps Not even for BIG data applications Even in consumer space? Startup Idea: Social Network that is a native desktop app Download and install app Good idea? HTML5 is Good enough, why? Deployment / Maintenance / Overhead VS Perceived Performance
  7. Taken from Apple’s Presentation this year
  8. Creates Standards
  9. Document Maturity Discuss Later: WICGC Working Draft Candidate Recommendation Proposed Recommendation
  10. https://app-manifest.firebaseapp.com
  11. JavaScript Worker = Threading ; good for background tasks so that UI is not blocked Service Worker = Background
  12. JavaScript Worker = Threading ; good for background tasks so that UI is not blocked Service Worker = Background
  13. Use a Library Multiple Endpoints Currently only Mozilla and Chrome