Slide 1

Slide 1 text

Electron, Cordova, PWA Was, wann, wie und warum Thorsten Hans @ThorstenHans Consultant Christian Liebel @christianliebel Consultant

Slide 2

Slide 2 text

Hello, it’s me. Electron, Cordova, PWA Was, wann, wie und warum Christian Liebel Follow me: @christianliebel Blog: christianliebel.com Email: christian.liebel @thinktecture.com Cross-Platform & Serverless

Slide 3

Slide 3 text

Focus: Cloud Native & Infrastructure as Code Consultant @ Thinktecture AG [email protected] [email protected] thinktecture.com thorsten-hans.com https://thns.io/slides @ThorstenHans Thorsten Hans Was, wann, wie und warum Electron, Cordova, PWA

Slide 4

Slide 4 text

Intro Progressive Web Apps Electron Cordova Summary Electron, Cordova, PWA Was, wann, wie und warum

Slide 5

Slide 5 text

Electron, Cordova, PWA Was, wann, wie und warum BASTA! Spring 2013 »Cross-platform and cross-device development will become the norm in the next few years.« Christian Weyer, 2014

Slide 6

Slide 6 text

In 2019, the cross-platform story still works out – and it’s better than ever! Electron, Cordova, PWA Was, wann, wie und warum BASTA! 2019 One team One codebase Maximum reach

Slide 7

Slide 7 text

Electron, Cordova, PWA Was, wann, wie und warum

Slide 8

Slide 8 text

Intro Progressive Web Apps Electron Cordova Summary Electron, Cordova, PWA Was, wann, wie und warum

Slide 9

Slide 9 text

Electron, Cordova, PWA Was, wann, wie und warum Responsive Linkable Discoverable Installable App-like Connectivity Independent Fresh Safe Re-engageable Progressive

Slide 10

Slide 10 text

Electron, Cordova, PWA Was, wann, wie und warum Install Experience

Slide 11

Slide 11 text

Cross-Vendor Initiative Led By… Electron, Cordova, PWA Was, wann, wie und warum Project Fugu – A More Capable Web »Let’s bring the web back – API by API« Thomas Steiner, Google

Slide 12

Slide 12 text

Electron, Cordova, PWA Was, wann, wie und warum Project Fugu Contacts Picker Wake Lock API Picture in picture Native File System API Capability missing? http://bit.ly/new-fugu-request

Slide 13

Slide 13 text

Electron, Cordova, PWA Was, wann, wie und warum Project Fugu https://goo.gle/fugu-api-tracker

Slide 14

Slide 14 text

Example: Native File System API if ('chooseFileSystemEntries' in window) { const handle = await window.chooseFileSystemEntries(); const file = await handle.getFile(); // do something with the file } else { // use fallback API or disable feature in app } Electron, Cordova, PWA Was, wann, wie und warum Project Fugu Feature Detection Browser takes care of calling OS-level APIs

Slide 15

Slide 15 text

https://liebel.io/paint Electron, Cordova, PWA Was, wann, wie und warum LIVE DEMO

Slide 16

Slide 16 text

- One single codebase, maximum reach - No app store, installation, third-party software, … required - Super easy deployment (FTP is enough, no app store reviews, redeployment via MSI, …) - App Store support for Microsoft Store & Google Play Store (TWA) - Fully backwards compatible Electron, Cordova, PWA Was, wann, wie und warum Advantages

Slide 17

Slide 17 text

- No Apple App Store support (uploading PWAs is discouraged) - Web App Gap - not all native APIs are available on the web platform - expected to get smaller thanks to Project Fugu - not all web APIs are available in every browser - No control over execution environment - Requires an up-to-date browser If that’s an issue, web apps are still an option! Electron, Cordova, PWA Was, wann, wie und warum Disadvantages

Slide 18

Slide 18 text

Intro Progressive Web Apps Electron Cordova Summary Electron, Cordova, PWA Was, wann, wie und warum

Slide 19

Slide 19 text

Electron, Cordova, PWA Was, wann, wie und warum

Slide 20

Slide 20 text

- Many desktop target platforms - Windows 7+, macOS 10.10+, Ubuntu, Debian, Fedora - macOS App Store, Microsoft Store, Snapcraft - Access to all native APIs - Well-defined runtime environment (Chromium and Node.js) - Integration scenarios with native applications Electron, Cordova, PWA Was, wann, wie und warum Advantages

Slide 21

Slide 21 text

- Wrapper is large in size (“hello world” starts with ~100 MB) - Outdated Node.js & Chromium versions may pose security risks to users – developers have to take care of regular updates of the wrapper - Each Electron instance leads to RAM overhead (e.g. Slack) Electron, Cordova, PWA Was, wann, wie und warum Disadvantages

Slide 22

Slide 22 text

Intro Progressive Web Apps Electron Cordova Summary Electron, Cordova, PWA Was, wann, wie und warum

Slide 23

Slide 23 text

Electron, Cordova, PWA Was, wann, wie und warum

Slide 24

Slide 24 text

- Supports app development for iOS, Android, macOS, UWP - Access to all native APIs - Official store deployments Electron, Cordova, PWA Was, wann, wie und warum Advantages

Slide 25

Slide 25 text

- Plug-ins are often outdated - Cordova’s web and Electron platforms are inconvenient to use - Dependent on guidelines and goodwill of platform provider Electron, Cordova, PWA Was, wann, wie und warum Disadvantages

Slide 26

Slide 26 text

Electron, Cordova, PWA Was, wann, wie und warum https://medium.com/quark-works/why-our-app-got-removed-from-the-google-play-store-how-we-fixed-it-4c8d430eafa0 https://www.nytimes.com/interactive/2019/09/09/technology/apple-app-store-competition.html https://www.theverge.com/2019/1/30/18203551/apple-facebook-blocked-internal-ios-apps

Slide 27

Slide 27 text

Intro Progressive Web Apps Electron Cordova Summary Electron, Cordova, PWA Was, wann, wie und warum

Slide 28

Slide 28 text

Electron, Cordova, PWA Was, wann, wie und warum Target Platforms PROGRESSIVE WEB APPS CORDOVA ELECTRON + cars, smart fridges, …

Slide 29

Slide 29 text

- Developers should aim for Progressive Web Apps - If required, web apps can be (additionally) wrapped in a Cordova or Electron container à your web app investment always pays off! - Consider Cordova and Electron as “uber-polyfills” that might become increasingly irrelevant in the future - Feature-detect modern web APIs and use them, fall back to Electron/Cordova APIs or alternatives if unavailable - Report your use cases and missing web capabilities Electron, Cordova, PWA Was, wann, wie und warum Recap

Slide 30

Slide 30 text

Thank you for your kind attention! Christian Liebel @christianliebel [email protected] Thorsten Hans @ThorstenHans [email protected]