This is a strange story. Web apps run anywhere there is a browser, but now Google has introduced a new twist on the "run anywhere" idea. Chrome apps that run on iOS and Android. What does this mean?
Once, what seems like a very long time ago, the web presented us with a huge opportunity. The standard web browser could act as a universal programming platform. All we had to do was write a program once and it could work on any OS that supported the browser. For many reasons this never quite worked out but now all of the big browser makers seem to see that it makes sense.
Google's very late attempt to allow web apps to run anywhere with the same or similar power to desktop apps finally managed to get up enough enthusiasm to make Chrome apps work on the desktop.
So what is a Chrome app?
The latest move extends the reach of Chrome apps to iOS and Android by way of the sneaky trick of using Apache Cordova, aka PhoneGap. This is a sneaky trick because you can already use Cordova to run very standard Web apps on iOS, Android and a range of other mobile operating systems.
So why bother with a Chrome app?
The simple answer is that Google has made a range fo the core Chrome APIs available which means if you basically just restrict what you are working with to the Chrome APIs you can port your Chrome app very quickly. Of course, you also have access to all of the Cordova APIs as well - but if you use any of them you no longer have a pure Chrome app.
The Chrome APIs that are available include:
- identity - sign-in users using OAuth2 without prompting for passwords
- payments (currently Android only) - sell virtual goods within your mobile app
- pushMessaging - push messages to your app from your server
- sockets - send and receive data over the network using TCP and UDP
- notifications (currently Android only) - send rich notifications from your mobile app
- storage - store and retrieve key-value data locally
- syncFileSystem - store and retrieve files backed by Google Drive
- alarms - run tasks periodically
Currently the pushMessaging and syncFileSystem APIs are only beta quality. There is a longer list of Chrome APIs, including NaCl, that seem to be on a list to be supported at some point in the future.
What makes it all easy is a new toolchain that wraps the Chrome App as a native application using Cordova. Once wrapped the app can be run on a real device or an emulator.
Once you have your native app you can submit it for inclusion in the appropriate app store. You are going to have no problems with the Android app store but iOS? What will Apple make of Chrome apps running on iOS?
At the moment there are too many people with an interest in keeping app development fragmented and too few who see the advantage in a unified platform.