Mozilla hopes to standardise mobile applications on the web platform, according to a talk given by Mozilla Foundation chief technology officer Brendan Eich.

Mozilla hopes to standardise mobile applications on the web platform, according to a talk given by Mozilla Foundation chief technology officer Brendan Eich.

"The Mozilla vision for mobile is to have fewer silos and more hyperlinks, and more data portability," said Eich, Mozilla CTO and the creator of JavaScript, speaking yesterday at the O'Reilly Web 2.0 Expo in New York.

"Users should not lose their data in a data coffin, or lose it due to some terms of service or cloud accident," he said, referring to how user's data and applications are usually locked into one type of device. "You should take the apps you buy from one device to another."

The world for online mobile applications closely resembles that of the early days of the commercial internet, Eich said, where content providers such as America Online offered a "walled garden" approach in which content and services were offered as independent services. They were accessible only by a stand-alone application on the desktop, or, later, by a specific browser, notably Internet Explorer.

Today's mobile applications are a return to this walled-garden approach, Eich told the audience. So, Mozilla has set a goal for itself to standardise mobile application development on web standards.

Open Web Apps

While this may seem to be an ambitious effort, the effort is not unprecedented for Mozilla, Eich said. Founded in 2003 out of the ashes of Netscape, which was then controlled by AOL-Time Warner, the Mozilla Foundation set out to provide a competitive alternative to the then-dominant browser, Internet Explorer, as a way of promoting the use of company neutral standards across the web. The mission was to "keep the web open, interoperable and evolving, and represent the user above all else," Eich said.

Using the code from the Netscape browser, which had grown increasingly out of favour, Mozilla succeeded at this mission, namely by developing the popular Firefox browser, Eich said. "We got what we wanted. We got competition. We've gotten productive work in the standards bodies," he said. He pointed to how Microsoft's share of the browser market has declined in the years since the debut of Firefox - and the increasing popularity of other browsers such as Apple Safari and Google Chrome.

Now, the company wants to renew this battle in the world of mobile devices, Eich said. Mozilla calls this initiative Open Web Apps. The idea behind it is that mobile applications can be written once, using the web platform, and they then can be deployed across different mobile devices, such as an Android device or an Apple iPhone, for instance.

For developers, writing to a web platform would save development time, because each application would only have to be written once, Eich argued. And consumers could benefit by being able to run their applications across different devices, as well as be able to access their data no matter the device or the software used.

Some elements are already in place: HTML5 and associated technologies such as CSS and JavaScript can provide the tools the developers need ("There is nothing that Flash can do that browsers can't," he said).

Modification

Other existing technologies may need only slight modification for this new environment. Eich demonstrated a version of JavaScript developed by Intel, River Trail, that can execute some of the JavaScript code on the GPU (graphics processing unit). This can vastly increase the speed at which JavaScript apps can perform. He ran an animation that, without River Trail, executed on the browser at a rate of three frames per second, while with the Parallel JavaScript engine, ran at a much smoother 45 FPS.

Mozilla itself has a number of projects that could help with its goal. Mozilla employs about 570 employees, and about 1,000 active code committers.

One project is BrowserID, which uses the browser as a mechanism for verifying the user's identity. Once users verify their email address, that address can be used to log in to different sites, with the browser providing the password automatically. BrowserID works like OpenID, except that the email address, rather than a web address provides the authentication.

"BrowserID is the lynchpin for open web apps," Eich said.

Another project is called Boot To Gecko, which Eich demonstrated during his talk, using an Android phone. When he turned the phone on, the device displayed what looked like a typical Android home screen. But this screen was actually the Firefox browser, built on the Gecko rendering engine and OpenGL JavaScript graphics library. All the applications on the device were written using only HTML, CSS and JavaScript.

Expensive

Despite this work, Mozilla still faces difficulties in getting handset makers and phone carriers to go along with the approach, Eich admitted.

"It's still too expensive to develop mobile hardware. The phone's hardware is still a little too expensive, so the companies that build their phones have to lock their users in to vertical silos, and to keep the user relationship to make more money to recoup their investments," Eich said.

Much of Google's Android is open source, so Mozilla engineers can work intimately with the OS in that case. Other platforms, such as Apple's, are more closed. Browser makers would also have to grapple with individual device component drivers, which are usually difficult to work with.

"For some reason, Apple and Google for Android are not interested in standardising these device APIs," Eich said. "There is secret sauce from Apple. There is secret sauce in Android to get at these devices."

Nonetheless, as issues around individual device APIs are raised, such as security, device makers will be forced to disclose the inner workings of their mobile OSes. Mozilla already offers the capability to work with geospatial data, thanks to security issues raised around that technology, and will soon offer more capabilities tied in directly to device based cameras.

"There are no web standards at hand for mobile devices. We're going to change that," he said. "We're going to expose Web APIs in all these devices and standardise them in a fair way, so they can be in all the browsers."