Mozilla Favors Web Over Native Application Development
Mozilla has started working on WebAPI, a set of APIs for accessing device functionality usually accessible only for native applications in an attempt to develop a cross platform solution that will enable developers to write web applications once for all mobile OSes.
Mozilla launched Boot to Gecko (B2G) a month ago, a project aimed at creating a web OS similar to Chrome OS which does not target only netbooks but also Android-compatible phones and tablets. B2G will be based on Gecko and Android, and is meant to extend the web experience replacing the native one. It is not clear if Mozilla really wants to build such an OS or they just want to develop some web technologies they hope others will integrate into their browsers, as the B2G FAQ suggests:
Boot to Gecko (B2G) is an early-stage, exploratory project with the goal of building a complete, standalone operating system for the open Web. It is not a product offering, but if successful, could form the basis for one. …
We don't want B2G to lead to applications that only run atop B2G, or only run in Firefox. That's an important difference between what we're doing and proprietary mobile stacks today: we don't want a competitive advantage for Mozilla, we want a competitive advantage for the Web….
Ideally, the technology pioneered or refined in B2G will make its way into all mobile browsers, so that enhanced open Web applications can be great regardless of operating system or device. We look forward to working with other OS and browser developers on standards activities and even implementations.
B2G will be developed in four major areas: WebAPI, a Privilege Model – making sure the WebAPI can be safely accessed by web pages and applications-, Booting – a boot loader for Android-compatible devices, and Applications –either ported or new ones.
HTML5 is taking shape but developers still need to access various low or high level functionality – USB, camera, accelerometer, etc.- using only a common API in order for the unified web development experience to happen. And Mozilla has started working on that, the first step being a set of APIs for the phone to be ready in the next 3 to 6 months.
WebAPI will include the following APIs:
- Dialer: Telephony & Messaging API, Contacts API
- Address Book: Contacts API
- SMS: Telephony & Messaging API, Contacts API
- Camera: Camera API, Filesystem API
- Gallery: Filesystem API based on FileReader (already done) & FileWriter. Also, a file abstraction can be built on top of IndexedDB
- Settings: Device Status API, Settings API
- Games: Accelerometer API, Mouse Lock API
- Maps: Geolocation API, Contacts API
When this API is done and implemented, developers will be able to write web applications that are very similar to native ones, but they won’t have to rewrite the application for each mobile OS, but rather once for all implementers of the API. For this plan to succeed, the API needs to embraced by all major mobile OS manufacturers. Robert Nyman, a Technical Evangelist for Mozilla, declared in an official post that “[WebAPI] specification drafts and implementation prototypes will be available, and it will be submitted to W3C for standardization.” Some of these APIs are already developed by W3C, such as the Geolocation API, so it’s not clear if Mozilla will propose new ones or just enlists all the APIs needed for cross-platform web development.
It remains for Apple, Google and Microsoft to embrace the APIs, and contribute to them. Apple’s initial vision for iOS was based on HTML, as ArsTechnica observed, and Google is known for pushing web standards as much as possible. Microsoft is also working on an HTML5 UI for Windows 8, and that involves APIs for accessing PC’s hardware from the browser, so they will likely embrace the idea. It remains to see if W3C will build these APIs based on Mozilla’s WebAPI or on a proposal coming from one of the other big players.
Keith Adams Dec 06, 2013