Building Desktop-Class Productivity Apps with A...

Building Desktop-Class Productivity Apps with Angular and Projectย Fugu

Understand the objectives of Progressive Web Apps (PWAs) and Project Fugu, which aim to enhance web applications with platform-specific features and capabilities.
Learn how to integrate PWA capabilities into your Angular projects, enabling features such as offline functionality and app-like experiences, leveraging Angular Service Workers.
Explore the latest updates on PWA availability, including support in Safari on macOS, as well as push notifications on iOS and iPadOS.
Gain insights into brand-new web platform APIs that empower developers to create more powerful and immersive web experiences. Examples include the Async Clipboard API, File System Access API, and Web Share API.
Dive into background information about PWAs and Project Fugu, including their history, development, and their impact on the web ecosystem.

Christian Liebel PRO

July 25, 2023

Annual Pro sale ยท Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

31 slides
  1. https://paint.js.org โ€“ Productivity app โ€“ Draw images โ€“ Lots of

    actions & tools โ€“ Installable โ€“ Read/save files โ€“ Copy/paste images from/to clipboard โ€“ Share files to other apps โ€“ Register for file extensions Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Demo App LIVE DEMO
  2. Paint PWA Capabilities Progressive Enhancement Building desktop-class productivity apps with

    Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Agenda
  3. Browser Support Building desktop-class productivity apps with Angular and Project

    Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Paint Canvas element โœ“ โœ“ โœ“ 2D rendering context โœ“ โœ“ โœ“ ร  always build apps for the browser
  4. Paint PWA Capabilities Progressive Enhancement Building desktop-class productivity apps with

    Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Agenda
  5. @christianliebel Building desktop-class productivity apps with Angular and Project Fugu

    ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก Responsive Linkable Discoverable Installable App-like Connectivity Independent Fresh Safe Re-engageable Progressive
  6. Schematic ng add @angular/pwa Angular PWA Support @christianliebel Building desktop-class

    productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก LIVE DEMO
  7. Browser Support Building desktop-class productivity apps with Angular and Project

    Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Progressive Web Apps Offline Availability โœ“ โœ“ โœ“ Installability โœ“ (iOS/iPadOS only, macOS from Sonoma) (Android only) Push notifications โœ“ โœ“ โœ“
  8. Push Noti๏ฌcations Just as native apps, PWAs can receive push

    noti๏ฌcations Combination of two technologies: Web Noti๏ฌcations and Push API Supported by Chrome, Edge, Firefox, Safari Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Progressive Web Apps
  9. Paint PWA Capabilities Progressive Enhancemen t Building desktop-class productivity apps

    with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Agenda
  10. Browser Building desktop-class productivity apps with Angular and Project Fugu

    ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Capabilities navigator.share({ url: 'http://example.com' }); ShareIntent DataTransferManager โ€ฆ NSSharingServicePicker
  11. File System Access API Some applications heavily rely on working

    with ๏ฌles File System Access API allows you to open, save and overwrite ๏ฌles and directories Supported by Chrome, Edge Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Capabilities
  12. API const [handle] = await self.showOpenFilePicker({ multiple: true, types: [{

    description: 'PNG files', accept: {'image/png': ['.png']} }] }); Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel File System Access API LIVE DEMO
  13. Async Clipboard API Allows reading from/writing to the clipboard in

    an asynchronous manner Reading from the clipboard requires user consent first (privacy!) Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Capabilities
  14. API CopyContent await navigator.clipboard.writeText('foo'); await navigator.clipboard.write(/* data */); Paste Content

    const content = await navigator.clipboard.readText(); const content = await navigator.clipboard.read(); Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Async Clipboard API LIVE DEMO
  15. File Handling API Register your PWA as a handler for

    ๏ฌle extensions Requires installing the application ๏ฌrst Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Capabilities
  16. Manifest Extension { "file_handlers": [{ "action": "/", "accept": { "text/plain":

    [".txt"] }, "icons": [] }] } Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel File System Handling API
  17. API if ('launchQueue' in window) { launchQueue.setConsumer(async params => {

    const [handle] = params.files; // do something with the handle }); } Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel File System Handling API LIVE DEMO
  18. Browser Support Building desktop-class productivity apps with Angular and Project

    Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Capabilities Async Clipboard API โœ“ โœ“ (writeText() only) File System Access (Desktop only) โ€” โ€”
  19. Paint PWA Capabilities Progressive Enhancement Building desktop-class productivity apps with

    Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Agenda
  20. Overview if ('showSaveFilePicker' in window) { const handle = await

    window.showSaveFilePicker(); // โ€ฆ } else { // a) fall back to an alternative API (if available) // b) disable/hide functionality } Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel Progressive Enhancement
  21. Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก

    @christianliebel Photoshop https://creativecloud.adobe.com/cc/photoshop
  22. Capabilities (2021 ร  2022) Async Clipboard 8.91% ร  10.10% (percent

    of desktop websites) File System Access 29 ร  2,317 (+7889%) (desktop websites) https://almanac.httparchive.org/en/2022/capabilities Building desktop-class productivity apps with Angular and Project Fugu ๐Ÿ…ฐ๐Ÿ’˜๐Ÿก @christianliebel 2022 Web Almanac

More Decks by Christian Liebel

Other Decks in Programming