Introducing WebAPI

Mozilla would like to introduce WebAPI with the goal to provide a basic HTML5 phone experience within 3 to 6 months.

The current situation

Where we are today, there’s a clear distinction between the Open Web and native APIs and how things have to be built. As many developers are aware of, we need consistent APIs across web browsers, operating systems and devices to be able to build something for the world, not just a specific device or vendor. We need a way to take the web to the next step.

What is WebAPI?

WebAPI is an effort by Mozilla to bridge together 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. Security is a very important factor here, and it will be a mix of existing security measurements (e.g. asking the user for permission, like Geolocation) or coming up with new alternatives to ensure this.

In the nearest timeframe we are looking into building:

  • Dialer: Telephony & Messaging API, Contacts API
  • Address Book: Contacts API
  • SMS: Telephony & Messaging API, Contacts API
  • Clock
  • Camera: Camera API, Filesystem API
  • Gallery: Filesystem API (could possibly be FileReader & FileWriter in conjunction)
  • Calculator
  • Settings: Device Status API, Settings API
  • Games: Accelerometer API, Mouse Lock API
  • Maps: Geolocation API, Contacts API

Contribute

We know that there are so many talented people out there with great input, so please contribute through any of these means:

Hiring developers

We are also hiring several full time engineers for working with WebAPI. Read the job description and apply.

View full post on Mozilla Hacks – the Web developer blog

Tagged on: ,

20 thoughts on “Introducing WebAPI

  1. Jason

    Does the inclusion of the FileSystem API means there’s going to be attempts to implements the parts of the W3C’s File API that includes system and directory.

    Or is it something else?

  2. Robert Nyman

    I agree. I believe this is a first step to explore and build upon to consider things like that.

  3. Jay Fienberg

    I also was going to bring this up: mobile devices commonly have microphones and speakers, and are natural audio devices. At the same time, there are increasing means in HTML5 / Javascript to both play and manipulate audio in the browser.

    The “Gallery API” concept, listed above, presumably is targeted at photos and perhaps video, but there’s a similar need for audio-only media–either “Gallery” includes a variety of media, or perhaps a broader “Media Collection” API could be an umbrella for photos, audio, video, mixed, etc..

  4. Robert Nyman

    Lee,

    There are many factors here, but one of the main ones is that with all the different operating systems and devices, it is quite costly and time wasting developing a separate application for each of them. On top of that, the problem there is that the owners of various app stores and operating systems decide what you can develop for it, what you are allowed to deploy.

    I would rather say that differentiation lies in user experience and similar things rather than if the API access is being done from native or web code.

  5. Jasper Janssen

    My new Macbook Air does BT 4.0 including LE, allegedly.

    It would not surprise me if that spreads with newer handsets from that manufacturer.

  6. Stuart Carnie

    There are platforms with specific restrictions whereby Mozilla could not include all the necessary features required by the API. For example, Apple would need to include these features in Mobile Safari / WebKit.

  7. Kamil Trebunia

    Lee, if those other technologies were so good, then they would be eclipsing Open Web and not the other way round as it is happening right now – it’s the Open Web that takes over more and more traditional technology stacks.

  8. Lee

    When I stop to think about the countless hours that so many smart people have spent on trying to recreate through the browser what we’ve already had for decades, it makes my head hurt. Do we really need to spend time recreating basic operating system functions (file storage among other things) through the browser? Seriously, why? There is no such thing as write once, run anywhere. If there is, that means the death of any kind of differentiation or break out technology because write once run anywhere requires no deviation in any way.

  9. Robert Nyman

    Walter,

    The goal is to have APIs that will work no matter the web browser and operating system. Naturally Firefox will support these APIs to in the environments where Firefox will be available.

  10. Robert Nyman

    Chad,

    Thank you, that sounds great! Please look under ways to contribute in this blog post too, and feel free to have ideas anytime!

    A man who loves Firefox,

    I’m sorry you feel that way. The objective of Mozilla is to keep the web open, and to empower both developers and users with open standards, tools and technologies. We deem this something very important in the mobile space, and given similar projects and efforts in this area, it seems to be a well-founded take.

    We will naturally also continue to make Firefox as good as we can.

    Chad,

    The idea is to generally offer various APIs to a web layer, but I understand that the term isn’t that descriptive.

  11. A man who loves Firefox

    I’m really sorry for such words, but I’m fed up with this. Mozilla, stop making shit, that no one needs, for god sake, make Firefox faster and less voracious!

  12. Chad Smith

    This is a great idea, and glad to see it happening. I have a business who does something similar but not quite the same thing. It’s named The Easy API – http://theeasyapi.com – and I saw the same struggle that all other developers are having. I decided to start to build an API that would encompass and encapsulate other APIs providing a single API to code for and get the power of all the others. Additionally it gave me the ability to cache some results where possible. I opened it up to other developers in Feb of 2010 and started tracking the requests in mid October 2011. The Easy API does about 250,000+ requests a day and is used by a variety of companies.

    This is a project that I am going to keep on my radar as it’s near and dear to my heart. I also am going to look for ways that I can help, and if you have anything specifically that you need help with please let me know.

    Take care,
    Chad

  13. Don Park

    The dream of peer to peer bluetooth for phones was dead the moment bluetooth 1.0 was released. The power hit to remain ‘discoverable’ was simply too much for cell phones to produce. Then there was the bluejacking scare. Also my guess is the cell providers feel threatened by a wireless data network they dont control.

    There is a new hope though, Bluetooth Low Energy, part of Bluetooth 4.0. Totally redone to be very low throughput and hence very low energy usage. It will enable games and social media apps to discover other people in the room that have the same apps/interests/etc.. I’m still waiting for the first handset to ship with it, but the chip itself seems to be well into production runs.

  14. Natanael L

    Also, NFC, gyroscope, etc…
    There’s actually quite a bit of hardware that could be supported, I have no idea how to figure out what should be prioritized.

  15. Natanael L

    Dying? Hardly! I use it all the time when I’m physically close my friends!
    You know, I’m not always on a WiFi, and Bluetooth doesn’t suck as much power for file transfers as WiFi/3G.
    Also, there’s few good options for wireless local file transfers. Apps like Bump don’t work on non-smartphones, etc, and not for laptops either (but Bluetooth does).

  16. Robert Nyman

    fatriff,

    Not sure Bluetooth is a dying technology, but it’s not up to me to decide.

    Matthew,

    Interesting, thanks for sharing!
    It is a good point about answering, and I hope it will be kept in mind.

    N.V.Balaji,

    All good questions, and I’m not sure it has been decided at this time. Please try the WebAPI discussion group.

    Kamil,

    Some ideas are similar, but in others there might be varying goals.

    Cole,

    I believe there will be cases where accessing the Contacts will be necessary and useful.

    Robert,

    Well, this is the name for now, but we’re always open for suggestions. 🙂

    Alexander,

    I don’t know those specifications in detail, but I believe there will be both collaboration and inspiration going on.

    Richard,

    I can’t say more about the implementation details in Firefox or any other web browser/device right now. If you have experience with this, though, please share in the WebAPI discussion group.

    Amit,

    This is the first steps, and the aim is to have it evolve into/be part of a specification so it will apply to everyone.

  17. Amit Naik

    An excellent effort by Mozilla – however any word on anyone else offering to join this initiative?

    A standard is only as good as the community it manages to attract and unless at least some of the other players like Google, Apple, Microsoft etc show some interest this will end up as just another API.

Leave a Reply