build 2016 - p449 - hosted web apps myth #6: hosted web apps can’t run in the background
TRANSCRIPT
#Build2016
Myth Busting:Hosted Web AppsJeff Burtoft Kiril SeksenovPrincipal PM, Dev EX Program Manager, Web Plat
I don’t have to re-write my web site to ship it as an appYour App can be a Hosted Web AppRuns off your web serverCan be written with any server side technologyLoads at run time
Your App doesn’t need to be a Single Page AppSingle Page Apps or traditional Web Sites workPage transitions and navigation can be addressed in the App container
#Build2016
Myth Busting:Hosted Web AppsJeff Burtoft Kiril SeksenovPrincipal PM, Dev EX Program Manager, Web Plat
#Build2016
Myth Busting:Hosted Web AppsJeff Burtoft Kiril SeksenovPrincipal PM, Dev EX Program Manager, Web Plat
Hosted Web Apps aren’t good for gamesWith Maturity of WebGL, native graphics performance can be achieved with web technologies
#Build2016
Myth Busting:Hosted Web AppsJeff Burtoft Kiril SeksenovPrincipal PM, Dev EX Program Manager, Web Plat
Hosted Web Apps Take too long to loadWeb Apps can be packaged
Packaged Apps load app from package, just like native appsPages have bit-level caching to make pages respond even faster
Hosted Web Apps can be optimized for initial contentHosted Web Apps can have intial page inside app
Hosted Web Apps can utilize a webview for customizing loading experienceUse existing Web technologies to customize loading experience
#Build2016
Myth Busting:Hosted Web AppsJeff Burtoft Kiril SeksenovPrincipal PM, Dev EX Program Manager, Web Plat
Hosted Web Apps don’t work offlineBasic Offline Page msapp-error.html
Page is programmatically loaded any time the app would normally hit a 404 or when the app is offline
Customized offline experiencesmsapp-error.html can be used as the landing page for a full customized offline experience
Use Standard Web technology Application cache, Indexed DB, local storage can all be used within the app to provide a great experience while offline
#Build2016
Myth Busting:Hosted Web AppsJeff Burtoft Kiril SeksenovPrincipal PM, Dev EX Program Manager, Web Plat
Hosted Web Apps can’t run in the backgroundAudio, system events, system timers and moreYour Web App can run tasks in the background based on time, system events and other factors that
Allow your app to run even when it’s not open by the users
Handle push notifications, live tiles and moreApps can receive push notifications like any other app
Package the js file localYour background task is handles by a local js file inside the app package so that the task can run evenBefore a network connection is issued.
#Build2016
Myth Busting:Hosted Web AppsJeff Burtoft Kiril SeksenovPrincipal PM, Dev EX Program Manager, Web Plat
Hosted Web Apps can’t access hardware
Have access to same hardware stack as native appsBluetooth, NFC, camera sensors as have APIs exposed for Hosted Web Apps
Can be activated by hardwareApp can run in the background and be activated by hardware API such as NFC or radio
#Build2016
Myth Busting:Hosted Web AppsJeff Burtoft Kiril SeksenovPrincipal PM, Dev EX Program Manager, Web Plat
Hosted Web Apps don’t get the latest cool featuresCortana and Cortana canvasHosted Web Apps, like other store apps can have voice definition files that direct Cortana interactions, and even write to Cortana canvas
Can have different views for ContinuumMany hosted web apps naturally adapt to the screen the are on (responsive), so continuum features naturally work with Hosted Web Apps
Can run on Xbox, Raspberry Pi and HoloLensJust like other apps, Hosted Web Apps are UWPs that run on the entire family of Windows devices and adapt to each.
#Build2016
Myth Busting:Hosted Web AppsJeff Burtoft Kiril SeksenovPrincipal PM, Dev EX Program Manager, Web Plat
Hosted Web Apps can’t manage media as well as nativeAudio can play in the backgroundHosted Web Apps can play both single process and duel process background audio
Can integrate with system controlsSystem controls like SMTC can be integrated into the meida playing directly from the app, often with just a few lines of code
Can play media formats not available in the browserHosted Web Apps can take advantage of PlayReady and other media formats available to windows 10 apps.
#Build2016
Myth Busting:Hosted Web AppsJeff Burtoft Kiril SeksenovPrincipal PM, Dev EX Program Manager, Web Plat
My Web App can’t interact with native code
Add Web Allowed Object exposes native code directly to the web code in Webview or Hosted Web AppC++ or C# PCLs or custom WinRT APIs an be called directly from JavaScript on your site through a JavaScript API. Work in webview as well.
Can pass message with invoke script async and window.notifyMore traditional methods of passing messages back and forth are still available by adding a Webview to the app, but are often deprecated for the Add Web Allowed Object approach