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.
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:
.psd files are recorded in the source/image/<appName>/ directories. Typically, an aircraft top-view is derived from a top-view image in a POH and then edited in Photoshop. The top-view image is displayed on the takeoff and landing runway diagrams. The top-view image and a favicon are the only images required for a Web-only deployment.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 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.
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.
The build process is run by a main Makefile in the project root directory. It has the following targets:
buildcdv and web targets. This is the default target.cdvbuild/cdv. The images can be imported into a Cordova project.checkMdLinkscheckMdLinks.js on all Markdown files in doc/.cleanbuild/ directoryclobberclean and imageClean targets.dbdocsource/doc into HTML files in build/doc.docCleanbuild/doc.imageimageCleanlineCountlintbuild/lint so that only changed files are re-linted.lintCleanbuild/line so that all files will be re-linted the next time lint is made.servebuild/web. Listens for change in source/app and runs lint. If the lint produces output, then the web page for the app displays the lint output. Otherwise, the server displays the newly built web images.webbuild/web. The images can be directly transferred to a web server.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.
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.
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.
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.
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:
airports.csv and runway.csv files from ourairports.com to the source/airportData/ourairportscom/ directory.stations.cache.xml.gz file and unzips it to source/airportData/stations.xml.source/airportData/dbFlags/<appId>.txt file containing this app's unique flags.scripts/buildAirportDB.js passing the retrieved flags and directing the log output to source/airportData/logs/<appId>_log.txtUse 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.
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.
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:
Test button that opens the Test page and runs any built-in unit tests.JSON dump button that will mail the app state to the email address on the Settings page.JSON restore button presents a dialog that allows you to paste edited JSON to use to restore the app state.Load button to allow you to load a trouble report into the appMost 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.
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.
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.
XXX