Progressive Web Apps - Closing the Web-Gap to Mobile
PWAs are a valuable way to deliver mobile content and applications. With the newest Features you also have more possibilities and use cases. The presentation shows a subset of this new APIs and how they are used with different examples
• … using web technologies to work (load) without a network connection • … has a responsive design to work on most devices • … could be installed and has an splash screen for a more native app feeling • … using features like push-notifications, home- screen button, fullscreen / standalone mode PWA explained
PWA is served over HTTPS • ServiceWorker to provide offline support • manifest.json - PWA configuration File • Home-Screen Icon in different sizes (for different devices) • (additional meta-tag for Safari) PWA Requirements
Firefox) • ServiceWorker • Cache API • Fetch API • New Features (in development / not in for all Browsers available) • Native File Access API / FileHandler API • Web Share (Target) API • Contact Picker API • And many more What has changed
part of the users FileSystem • Get access to single Files and a whole Folder • Read additional Information of a File with the help of the FileHandler API like Size, Last Modified. Mime Type • Save changed Files back to the FileSystem • Create new Files on the FileSystem in a selected Folder • This APIs are available in Chrome (with a origin trial access or flag) • Example: Online Editor http://fugu-edit.web.app/ Input[type=file] war Gestern
simple API to share Content of your PWA with other Apps or PWA’s like Twitter, Instagram, … • Web Share Target API can used to share external content to your App. • You define your PWA as Share Target over the manifest.json • You can configure how the content ist send • As POST Request with encryption to share images • As GET Request for simple text based informations • You can handle the complete share data processing local with the service worker fetch API • Example: https://qr-code-reader.webdev-jogeleit.de/ Share Buttons everywhere!
Pick on ore more Contacts and access predefined values from the selected values • Get the result and use it to send SMS / Emails / … or use it to populate a contact form • Example: https://fugu-journal.web.app/ Another way to share content or prepopulate a contact form
everything with JS but now you have a second chance with WebAssembly • Compile your Image Codec of Choice to WebAssembly to do crazy image compression on the Web Example: https://squoosh.app/ • Add missing browser functions like text detection / barcode scanner Example: https://io.perceptiontoolkit.dev/ There is no JS Solution? Lets try WebAssembly
way to wrap your PWA based on Androids „Custom Tabs“ • They are rendered from the Browser and works the same way like opened in the normal Browser (but in Fullscreen) • TWAs using the same local storage as the Web Browser, so local caches, auth tokens and so on are shared between web and TWA • Your device need a browser with TWA support. (Chrome +72) • Android without a supporting Browser has a „Custom Tabs" fallback PWA in the Play Store? No Problem
by Microsoft • PWABuilder helps to build and improve your PWA development with code snippets and static analysis • It has also a simple build process to wrap your PWA in a Cordova app, so you can also ship it in the App Store • Additional wrappers for Android and Microsoft are supported TWA for Android but and what’s about the App Store?