Development Process Guide

Table of contents


Technology use

In general, POH Performance apps use the following criteria for client-side technology:

Server-side technology is only limited by server capabilities. The server is currently hosted on a Godaddy.com Web Hosting Plus shared host. The server is preconfigured to use Apache as the server framework and does not support NodeJS.

Project dependencies

The NodeJS scripts require some node libraries to be installed. See the Scripts Reference.

The app development and deployment process may rely on the following software:

WebApps

All clients are fundamentally WebApps. They may be deployed on desktop devices, but they may also be used on mobile devices for personal use outside of the app store distribution. The WebApp is a Progressive WebApp (PWA) that may be installed on a mobile device's homepage and can operate while disconnected from the internet after being installed or loaded.

The Service Worker and caching

The WebApp also contains a Service Worker that caches app source files but forwards server API requests to the network when connected. The WebApp build process inserts a manifest of all files (other than the Service Worker) into the index.html file. When connected, the index.html file is always fetched from the server, bypassing local or network caching. The Service Worker will preload all files in the manifest into the application cache whenever a different index.html file is fetched from the server.

The files in the manifest have a unique element in the path name for each build. This ensures that only the files associated with the current version of the index.html file will be placed in the cache. Any caching in the client or network will be ignored.

Native apps

The build process uses Apache Cordova to build native iOS and Android apps from WebApps. The WebApp Service Worker is disabled when using Cordova to avoid violating app store policies against loading code.

Building apps

The build process is run by a main Makefile in the project root directory. It has the following targets:

The root Makefile invokes sub-makefiles for targets that build for all apps. If a sub-makefile of the form <appId>.mk exists, it will use that to build the target. Otherwise, it will use app.mk.

Graphics

The icons, favicons, and splash screens are all automatically generated. See Icon and splash screen generation. The splash screens may contain an optional logo image which must be generated by hand.

Aircraft top view image

The aircraft apps require an aircraft top view image to use on the takeoff and landing runway diagrams, which is also used on the splash screens. This is typically cropped from the POH or other sources and adjusted for clarity using tools like Photoshop.

App store images

The app store icons are typically generated using the icon generation scripts. App images for the app stores are normally taken by running device simulators for different-sized devices in Xcode and Android Studio.

Building the airport database

Apps that require an airport database must be added to the aircraftApps in the main Makefile. This will ensure that databases for them will be built.

The airport database is built by combining the airport data from the NFDC and ourairports.com. See the Airport Database Reference. The bulk of the work is done using the buildAirportDB.js script.

The database is built by running make db in the project root directory. Prior to building the database, you must download the current version of the NFDC airport and runway data in the Legacy format APT.txt file to the source/airportData/NFDC/ directory. When make db is run, it does the following:

Use the source/airportData/dbFlags/<appId>.txt to specify the runway requirements that are unique to the aircraft. For example, to ensure that the included runways are long enough for any aircraft of that type to takeoff or land even under the best conditions. The log files are useful for answering questions about why a conflicting code was dropped or why an airport was dropped because it did not have runways compatible with the aircraft.

Common infrastructure testing

The Testapp is a standalone app designed to help test and debug MVCS and other infrastructure code. It runs unit tests and has pages to exersize various common functions.

Testing and debugging apps

Almost all testing and debugging use the WebApp form of an app. Running make serve builds the app and starts a web server on https://localhost:8000 that you can open with a browser and navigate to the app of interest. Use the browser's debugger as required. The makefile will automatically rebuild the app when the source is updated. You will have to refresh the browser to see the updated results.

The Settings page has a hidden card for developers. You can view the card by entering XYZZY (look it up) in the password field. The card contains the following:

Unit tests

Most apps have built-in unit tests. Pressing the Test button in the Settings page developer card will open the Test page and run all built-in unit tests. Tests are defined using unitTest. Aircraft apps typically have the following tests:

The test page will display failed test result. Selecting Show detailed results will display all results, both passed and failed.

Testapp

The Testapp is an internal WebApp specifically for testing the MVCS infrastructure. It contains pages that test UI elements, the infrastructure for common pages, and infrastructure unit tests.

Feedback and Trouble reports

Users can press the Email button in the Settings page "Questions or feedback" row to send email to the webmaster at info@pohperformance.com using their local email app.

Users may also file a Trouble Report (TR) by pressing the Send button on the "Trouble report" row. Trouble reports record all app state variables at the time of the report and include a user message. Each TR has an ID string that begins with "TR-". The ID contains some random digits that would make it difficult to guess. The reports are stored on the server and a notification is sent to the webmaster at info@pohperformance.com. A reminder notification is sent daily until the TR is archived.

A TR may be retrieved by pressing the Trouble Report "Load" button and entering the Trouble Report ID. This will set the app's input state variables according to the TR data allowing you to see the user's exact setup. Once the problem is determined, the TR can be archived by pressing the Trouble Report "Archive" button.

XXX use browser-sync and the php built in server.

Building the documentation

XXX