Since 2010, I’ve been learning to write mobile apps. Professor Paul Hegarty from Stanford University had a great iOS programming course offered for free on iTunes U. I liked it so much that I introduced it to my colleagues at Xerox and started a series of group-learning iOS courses based on Prof Hegarty’s video lectures. To follow that up, we also brought in a professor from SUNY Geneseo to teach us Android app programming.
Since my colleagues and I were mostly C/C++ programmers, we had to learn to program in Objective-C and Java for iOS and Android respectively. We also have to learn the nuances of iOS and Android libraries, programming and build processes. I always thought that there should be a better way to do this.
Along the way, I’ve looked at different mobile app development approaches such web apps that run on the mobile’s browser, hybrid apps that are web apps packaged to run on the native web viewer and mobile apps that are compiled to native code via free/open or proprietary sourced compilers. Each has it’s own benefits and claims to be the answer to code once and to be able to run on different mobile platforms.
I have been experimenting with Ionic and Cordova and find the hybrid approach quite promising. Hybrid app did have it’s limitations. Frequently cited limitations are reduced performance, limited access to device’s features, non-native UX, cannot work off-line and might not run and/or be distributed in app stores for all platforms.
However, with the recent wide cross-platform support of PWA from Google, Apple and Microsoft, Progressive Web App development approach casts new hope for hybrid apps. PWA now promises to be:
-faster, better integrated with the native web viewer,
-can be installed with a native app like icon on the home screen,
-can work off-line or on slow networks and auto updatable vis service workers,
-supports push notifications,
-discoverable via web searches
-and easily shared via URL without complex installation.
And, with cross-platform UX framework support with Iconic, one can get close to native UX behavior with a common set of code.
As an example, I’ve developed a simple PWA called LoveCalc to demonstrate what one can do with a PWA. Two sources that I’ve consulted and borrowed code to build the demo are from Mirko Nasato’s YouTube video “Ionic 2 by Example”
https://www.youtube.com/watch?v=qdeD9rYlBU4&t=72s and Josh’s cryptoCurrency PWA https://www.joshmorony.com/building-a-cryptocurrency-price-tracker-pwa-in-ionic/.
Use your mobile device’s browser and go to https://lovecalculator-59e29.firebaseapp.com/ to access the Love Calculator app. Use Safari from an iOS device and Chrome from an Android. I do not have a Windows phone so was not able to test the LoveCalc app on the Windows platform. Check out how the app works on your particular phone. Note that since Apple has just started to support the PWA functionalities, Safari version 11.3 or later is required.
I have tried to add most of the PWA functionalities to the LoveCalc app. In particular, it supports the features of saving the app the home screen, running the app even when the mobile device is of-line, seeing a splash screen when the app launches and providing the native-like UX experience with the screen layout/animation.
Please note that I did not implemented the Web App Banner to automatically adding the app to the home screen. To save the app to the mobile device’s home screen, do the following:
On iOS devices
-Open Safari and go to https://lovecalculator-59e29.firebaseapp.com/
-Touch “Share” icon – one with a square box with arrow pointing up
-Touch “Add to Home Screen” – might need to scroll to the right
-Touch “Add” on upper right hand corner (on iPhones)
On Android devices
– Open Chrome and go to https://lovecalculator-59e29.firebaseapp.com/
– Click on the 3-dot menu and selected “Add to Homescreen”
Please email me at francis.tse@pleiadestechnology.com to let me know what your experience had been and/or if you ran into problems with the LoveCalc app.
Finally, the LoveCalc app code is in Github. Let me know if you are interested to get the code and play for it yourself. In future blogs, I might continue to explain, in more details, about various aspects of PWA. PWA is relatively new. All the mobile platforms finally seem to be jumping on board so there are still a lot to learn. I will be glad to share what I’ve found out.