Mozilla WebAPI - a universal phone app |
Written by Harry Fairhead | |||||||||||||||||||||||||||
Sunday, 02 October 2011 | |||||||||||||||||||||||||||
Could Mozilla have found a way to make web apps as powerful as native apps and so to breach Apple's and Microsoft's walled gardens.
It can be difficult to keep up with what Mozilla is up to - it does so much and isn't good at telling people about it - but the latest big news is its WebAPI. This has the stated aim: We are aiming at providing all the necessary APIs to build a basic HTML5 phone experience within the next 3-6 months. Notice that it doesn't mention which phone? This is because the WebAPI is intended to provide a standard HTML5 way of writing an app that will work on any phone with a standards-supporting browser.
In other words, WebAPI is going to do what other web app frameworks, like PhoneGap, do and allow web apps to access the phone's internal hardware. WebAPI is an effort by Mozilla to bridge the gap, and have consistent APIs that will work in all web browsers, no matter the operating system. Specification drafts and implementation prototypes will be available, and it will be submitted to W3C for standardization. To get an idea of how ambitious this project is just take a look at the table below:
Two of these APIs, Accelerometer and Geolocation, are already in FireFox and can be used now. Three of the others, Telephony & Messaging, Camera and OWA, are implemented but not shipped and the rest are works in progress. The project claims to be rolling out the complete API in a few months, so this is fast moving, and Mozilla is hiring engineers to work on the project. Notice that the idea is that the API will become a standard and so you can choose to use any compliant browser on any phone or tablet and you can expect the web app to work in the same way. What effect will WebAPI have if it is rolled out in a few months? The answer is a complete turnaround in the phone app market place. We already have the ability to build apps using HTML5/JavaScript in the form of the PhoneGap framework, but this packages the web app and serves it up as a native app. This has big advantages in that you can take a single code base and run it on a range of devices and you can submit your app to the appropriate app store. This is, of course, also the problem with the PhoneGap approach. In the case of Apple and Microsoft you have to submit your app to their control if you want to even install it on a device. Frameworks like PhoneGap enable easy code reuse but they do nothing to break the control of Apple and Microsoft on the app markets. For applications that don't make use of the device's native hardware and don't need to access personal information then a web app is a good alternative and it frees the developer from the tyranny of the app store. This is exactly what Amazon has done in moving from a native iPhone app to a web app. However, this approach doesn't work if you want to use GPS, the accelerometer or the contacts list - unless you have something like WebAPI. As soon as you have a standard way of accessing the device's hardware and the user's personal information then a web app becomes the equal of the native app and you don't need to ask for Apple's or Microsoft's approval to serve the app to the device. To recap: WebAPI would allow web apps to be almost the equal of a native app and they would work on any platform that there was a compliant browser for. In a stroke both Apple's and Microsoft's walled gardens would be breached. The only way that this could be stopped would be not to let any compliant browsers into their respective app stores. This seems to be the only way that the app store monopolies could be defended, and yet can you imagine the outcry if either Apple or Microsoft banned Firefox or any HTML5 browser and only allowed ones that omitted certain features. It will be interesting to see how things unfold.
Further informationhttps://wiki.mozilla.org/WebAPI
To be informed about new articles on I Programmer, subscribe to the RSS feed, follow us on Twitter or Facebook or sign up for our weekly newsletter.
|
|||||||||||||||||||||||||||
Last Updated ( Sunday, 26 February 2012 ) |