Cordova and GitHub Electron What you’ll see Modern business applications The Web: HTML5, CSS, TypeScript (or JavaScript) as a base Angular: Application framework for the browser Electron: creating desktop applications Cordova: building mobile apps Topics
Cordova and GitHub Electron § Modern lifestyle, modern way of working § Data and processes need to be mobile, not just the devices we use § Reach is important § Boundaries are blurring – and will vanish Mobile-First
Cordova and GitHub Electron § User experience will become an even more important part of software development § Facing new challenges § Building UIs with one technology approach § But optimized for certain platforms and/or form factors Mobile-First
Cordova and GitHub Electron § (Micro)Service-based architectures § Web / REST APIs § Use any platform server-side § Express / Restify / Ruby on Rails / ASP.NET Core Web API § Push Services § socket.io / SignalR § Consider Offline-first § Heavily influences your architecture and entire project Target architecture
Cordova and GitHub Electron § Web browser & HTML5 as a powerful platform § JavaScript & TypeScript as application programming languages § Angular as smart client application framework § Flexible layouts with CSS3 & flexbox Real applications
Cordova and GitHub Electron § Client-side single page applications (SPA) § Features § Consequently component-driven § Metadata-driven § Rich tooling ecosystem § Focus on proven pattern and separation of concerns § Components, views, view models § Services and dependency injection Component-based applications with Angular
Cordova and GitHub Electron § Angular bets on TypeScript § Components are build as classes and described with metadata Angular & TypeScript @Component({ selector: 'game-details' templateUrl: 'game.html', }) export public class GameDetailsComponent { @Input() game: GameData; @Output() ended = new EventEmitter<GameData>(); … } … <game-details [game]="myCurrentGame" (ended)="onGameEnded($event)" > …
Cordova and GitHub Electron Desktops § Create real desktop applications from web apps § Target Windows desktop, macOS, and Linux § Marriage of Chromium and Node.js § Independent of installed browsers on target machines § Does not need native SDKs to build final artifact § Access to native platform features § Electron API § Node modules ecosystem GitHub Electron
Cordova and GitHub Electron Electron architecture Desktop OS Electron Renderer Process (technically Chromium) Electron Main Process (technically Node.JS) MacOS Windows Linux Your Single Page Application Electron API Your custom Node.JS modules IPC Remote Node.JS
Cordova and GitHub Electron mobile platfosm Toolkit and framework for building native application shells for our web apps • Make ‘app apps’ from ‘web apps’ • Uses native web view components to host the original web app locally • Provides framework and APIs via plugins to interact with underlying native platforms CLI tools for automating project creation & build • We always need the native SDKs (e.g. iOS, Android, Windows) Mobile apps with Cordova JS HTML CSS Native wrapper Deploy to devices
Cordova and GitHub Electron Cordova architecture Mobile OS iOS Android Windows 10 UWP many more Cordova Application Cordova Plugins Geolocation Notifications Contacts Media Camera Custom Plugins HTML Rendering Engine (WebView) Single Page App HTML JS CSS Assets config.xml HTML APIs Cordova APIs OS APIs OS APIs Cordova Native APIs
Cordova and GitHub Electron What you’ve seen Modern business applications Web Standards Angular for the frontend GitHub Electron for desktop applications Apache Cordova for mobile apps Recap