Personal tools

WebAPI

From MozillaWiki

(Difference between revisions)
Jump to: navigation, search
(APIs)
(27 intermediate revisions by 9 users not shown)
Line 5: Line 5:
 
WebAPI work is being tracked by Mozilla {{bug|673923}}.  Find an dependent bug that interests you (and is unassigned), and assign it to yourself.
 
WebAPI work is being tracked by Mozilla {{bug|673923}}.  Find an dependent bug that interests you (and is unassigned), and assign it to yourself.
  
== Use Cases  ==
+
== APIs ==
  
We are aiming at providing all the necessary APIs to build a basic HTML5 phone experience within the next 3-6 months.  
+
Here's a list of the APIs that we're working on. Some of them are done, and some of them we haven't gotten further than acknowledge that we probably need them.
  
 
{| cellpadding="2" border="1"
 
{| cellpadding="2" border="1"
 
|-
 
|-
! Application
+
! API
! Required APIs
+
! Bugs
 +
! Description
 +
! Progress
 
|-
 
|-
| Dialer
+
| [https://developer.mozilla.org/en/OpenWebApps/The_JavaScript_API Open Web Apps]
| [https://bugzilla.mozilla.org/show_bug.cgi?id=674726 Telephony & Messaging API], [https://bugzilla.mozilla.org/show_bug.cgi?id=674720 Contacts API]
+
| {{bug|697006}}
 +
| Install Open Web Apps, manage installed apps, allow an installed app to manage it self.
 +
| API drafted, implementation underway.  
 
|-
 
|-
| Address Book
+
| [[WebAPI/WebTelephony|WebTelephony]]
| [https://bugzilla.mozilla.org/show_bug.cgi?id=674720 Contacts API]
+
| {{bug|674726}}
 +
| Allow placing and answering phone calls as well as build in-call UI.
 +
| Basic functionality done. Some work remaining
 
|-
 
|-
| SMS
+
| [http://dev.w3.org/2009/dap/vibration/ Vibration API]
| [https://bugzilla.mozilla.org/show_bug.cgi?id=674726 Telephony & Messaging API], [https://bugzilla.mozilla.org/show_bug.cgi?id=674720 Contacts API]
+
| {{bug|679966}}
 +
| Control device vibration for things like haptic feedback in games. Not intended to solve things like vibration for notification.
 +
| Done on B2G and Android. Standard in progress.
 
|-
 
|-
| Clock
+
| [[WebAPI/WebSMS|WebSMS]]
| -
+
| {{bug|674725}}
 +
| Send/receive SMS messages as well as manage messages stored on device.
 +
| Done on Android though might not ship there for security reasons. Mostly done for B2G.
 
|-
 
|-
| Camera
+
| [[WebAPI/IdelAPI|Idle API]]
| [https://bugzilla.mozilla.org/show_bug.cgi?id=451674 Camera API], Filesystem API
+
| {{bug|715041}}
 +
| Get notifications when user is idle.
 +
| Implementation in progress.
 
|-
 
|-
| Gallery
+
| Screen Orientation
| Filesystem API
+
| {{bug|720794}} {{bug|673922}}
 +
| Get notification when screen orientation changes as well as control which screen orientation a page/app wants.
 +
| Notification API implement. Locking API still being designed. See [http://groups.google.com/group/mozilla.dev.webapi/browse_thread/thread/b26254a859ad317e following] [http://groups.google.com/group/mozilla.dev.webapi/browse_thread/thread/e1585bc9c0dd6bec thread].
 
|-
 
|-
| Calculator
+
| [[WebAPI/SettingsAPI|Settings API]]
| -
+
| {{bug|678695}}
 +
| Set system-wide configurations that are saved permanently on the device.
 +
| Implementation in progress.
 
|-
 
|-
| Settings
+
| [[WebAPI/ResourceLockAPI|Resource lock API]]
| [https://bugzilla.mozilla.org/show_bug.cgi?id=678694 Device Status API], [https://bugzilla.mozilla.org/show_bug.cgi?id=678695 Settings API]
+
| {{bug|697132}}
 +
| Prevent resources from being turned off, for example screen dimming, WiFi turning off, CPU going into sleep mode etc.
 +
| Implementation in progress.
 
|-
 
|-
| Games
+
| [[WebAPI/WebMobileConnection|Mobile Connection API]]
| <font color="green">Accelerometer API</font>, [https://bugzilla.mozilla.org/show_bug.cgi?id=633602 Mouse Lock API]
+
| {{bug|729173}}
 +
| Expose signal strength, operator, etc for GSM and other mobile connections. This does not cover WiFi.
 +
| Implementation in progress.
 
|-
 
|-
| Maps
+
| Socket API
| <font color="green">Geolocation API</font>, [https://bugzilla.mozilla.org/show_bug.cgi?id=674720 Contacts API]
+
|  
 +
| Low-level TCP socket API. Will also include SSL support.
 +
| Gathering requirements.
 
|-
 
|-
| Apps
+
| Sensor API
| [https://github.com/mozilla/openwebapps OWA API]
+
| {{bug|697361}}
 +
| Access to device sensors such as accelerometer, magnetic field (compass), proximity, ambient light etc.
 +
| API design and implementation started.
 +
|-
 +
| [http://groups.google.com/group/mozilla.dev.webapi/browse_thread/thread/ed980c42261c5f4a WiFi Information API]
 +
|
 +
| Enumerate available WiFi networks, get signal strength and name of currently connected network, etc.
 +
| API drafted, implementation started.
 +
|-
 +
| [[WebAPI/DeviceStorageAPI|Device Storage API]]
 +
|
 +
| Add/Read/Modify files stored on a central location on the device. For example the "pictures" folder on modern desktop platforms or the photo storage in mobile devices.
 +
| API drafted.
 +
|-
 +
| [[WebAPI/ContactsAPI|Contacts API]]
 +
| {{bug|674720}}
 +
| Add/Read/Modify the device contacts address book.
 +
| API drafted, implementation underway.
 +
|-
 +
| [[Platform/Features/VideoConferencing|Camera API]]
 +
|
 +
| This is part of the larger WebRTC effort. This is a big piece of work so see the link.
 +
| API and implementation underway.
 +
|-
 +
| [[Platform/Features/VideoConferencing|Peer to Peer API]]
 +
|
 +
| This is part of the larger WebRTC effort. This is a big piece of work so see the link.
 +
| API and implementation underway.
 +
|-
 +
| [http://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html Mouse Lock API]
 +
| {{bug|633602}}
 +
| Lock access to mouse and get access to movement deltas rather than coordinates.
 +
| API being standardized in W3C. Implementation underway.
 +
|-
 +
| [https://developer.mozilla.org/en/OpenWebApps/The_JavaScript_API Open WebApps]
 +
| {{bug|697006}}
 +
| Install web apps and manage installed webapps. Also allows an installed webapp to get payment information. Everything needed to build a Opeb WebApps app store.
 +
| API drafted, implementation underway.
 +
|-
 +
| [[WebAPI/WebNFC|WebNFC]]
 +
| {{bug|674741}}
 +
| Low level access to NFC hardware. So far focusing on NDEF support.
 +
| API drafted, implementation underway.
 +
|-
 +
| [[WebAPI/WebBluetooth|WebBluetooth]]
 +
| {{bug|674737}}
 +
| Low level access to Bluetooth hardware.
 +
| API drafted, implementation underway.
 
|}
 
|}
 
Mozilla will most likely '''not''' implement the FileSystem API. For local file access, we have implemented <font color="green">FileReader</font> and plan to implement parts of the [https://bugzilla.mozilla.org/show_bug.cgi?id=557540 FileWriter] specification. A file system abstraction can additionally be built on top of <font color="green">IndexedDB</font>.
 
 
'''Legend'''<br> [https://bugzilla.mozilla.org Work in progress, see linked bug]<br> <font color="purple">Implemented but not shipped yet</font><br> <font color="green">Shipped in Firefox already</font><br>
 
  
 
== Process ==
 
== Process ==
  
A draft specification and prototype implementation of new Web APIs will be discussed publicly on our mailing list and at our public meetings (see below). Once an initial implementation is available on trunk, we will submit the new API for standardization to the W3C.
+
A draft specification and prototype implementation of new Web APIs will be discussed publicly on our mailing list and at our public meetings (see below). Once we have an API that we feel that we are satisfied with, we will submit the new API for standardization to the W3C.
 +
 
 +
The goal is to standardize all APIs.
  
 
== Design Principles ==
 
== Design Principles ==
Line 74: Line 141:
 
== Meetings ==
 
== Meetings ==
  
* Tuesday @ 10:00am PDT
+
* Tuesday @ 10:00am Pacific Time
{{conf|9254}}
+
{{conf|254}}
* (you can also join room 254 on vidyo if you have a mozilla account)
+
* No vidyo since the phone-vidyo bridge is too unreliable
 
* *1 to unmute yourself
 
* *1 to unmute yourself
 
* join irc.mozilla.org #webapi for back channel
 
* join irc.mozilla.org #webapi for back channel
Line 92: Line 159:
 
Find us on irc.mozilla.org in #webapi.
 
Find us on irc.mozilla.org in #webapi.
 
[[IRC|Need help to use Mozilla IRC servers?]]
 
[[IRC|Need help to use Mozilla IRC servers?]]
 +
 +
=== See also ===
 +
* [http://hacks.mozilla.org/2011/08/introducing-webapi/ Introducing WebAPI] blog post by Robert Nyman
 +
* [http://hacks.mozilla.org/2011/08/more-details-about-the-webapi-effort/ More details about the WebAPI effort] blog post by Jonas Sicking
 +
* [http://hacks.mozilla.org/2012/01/mozilla-joins-the-w3c-dap-webapi-progress/ Mozilla joins the W3C DAP – WebAPI progress] blog post by Robert Nyman and Jonas Sicking
 +
* [http://johnhammink.blogspot.com/2011/11/lets-have-look-at-some-recently-landed.html A look at the latest WebAPIs]  a demo/blog post by John Hammink
 +
 +
=== Demos ===
 +
* [http://robnyman.github.com/battery/ Battery API by Robert Nyman]
 +
* [http://robnyman.github.com/vibration/ Vibration API by Robert Nyman]
 +
* [http://people.mozilla.org/~jhammink/webapi_test_pages/ Demos by John Hammink]
 +
 +
==== Other efforts ====
 +
* [http://www.w3.org/2009/dap/ W3C Device APIs (DAP)]. Mozilla developers are [http://www.w3.org/2000/09/dbwg/details?group=43696&public=1 members] of the DAP working group ([http://hacks.mozilla.org/2012/01/mozilla-joins-the-w3c-dap-webapi-progress/ announcement]).
 +
* [http://www.wacapps.net/specifications Wholesale Applications Community (WAC) ]
  
 
== Subpages of {{FULLPAGENAME}}==
 
== Subpages of {{FULLPAGENAME}}==
 
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}
 
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}
 +
 +
[[Category:Web APIs]]

Revision as of 07:43, 28 February 2012

The Mozilla WebAPI team is pushing the envelope of the web to include --- and in places exceed --- the capabilities of competing stacks.

Contents

Contributing

WebAPI work is being tracked by Mozilla bug 673923. Find an dependent bug that interests you (and is unassigned), and assign it to yourself.

APIs

Here's a list of the APIs that we're working on. Some of them are done, and some of them we haven't gotten further than acknowledge that we probably need them.

API Bugs Description Progress
Open Web Apps bug 697006 Install Open Web Apps, manage installed apps, allow an installed app to manage it self. API drafted, implementation underway.
WebTelephony bug 674726 Allow placing and answering phone calls as well as build in-call UI. Basic functionality done. Some work remaining
Vibration API bug 679966 Control device vibration for things like haptic feedback in games. Not intended to solve things like vibration for notification. Done on B2G and Android. Standard in progress.
WebSMS bug 674725 Send/receive SMS messages as well as manage messages stored on device. Done on Android though might not ship there for security reasons. Mostly done for B2G.
Idle API bug 715041 Get notifications when user is idle. Implementation in progress.
Screen Orientation bug 720794 bug 673922 Get notification when screen orientation changes as well as control which screen orientation a page/app wants. Notification API implement. Locking API still being designed. See following thread.
Settings API bug 678695 Set system-wide configurations that are saved permanently on the device. Implementation in progress.
Resource lock API bug 697132 Prevent resources from being turned off, for example screen dimming, WiFi turning off, CPU going into sleep mode etc. Implementation in progress.
Mobile Connection API bug 729173 Expose signal strength, operator, etc for GSM and other mobile connections. This does not cover WiFi. Implementation in progress.
Socket API Low-level TCP socket API. Will also include SSL support. Gathering requirements.
Sensor API bug 697361 Access to device sensors such as accelerometer, magnetic field (compass), proximity, ambient light etc. API design and implementation started.
WiFi Information API Enumerate available WiFi networks, get signal strength and name of currently connected network, etc. API drafted, implementation started.
Device Storage API Add/Read/Modify files stored on a central location on the device. For example the "pictures" folder on modern desktop platforms or the photo storage in mobile devices. API drafted.
Contacts API bug 674720 Add/Read/Modify the device contacts address book. API drafted, implementation underway.
Camera API This is part of the larger WebRTC effort. This is a big piece of work so see the link. API and implementation underway.
Peer to Peer API This is part of the larger WebRTC effort. This is a big piece of work so see the link. API and implementation underway.
Mouse Lock API bug 633602 Lock access to mouse and get access to movement deltas rather than coordinates. API being standardized in W3C. Implementation underway.
Open WebApps bug 697006 Install web apps and manage installed webapps. Also allows an installed webapp to get payment information. Everything needed to build a Opeb WebApps app store. API drafted, implementation underway.
WebNFC bug 674741 Low level access to NFC hardware. So far focusing on NDEF support. API drafted, implementation underway.
WebBluetooth bug 674737 Low level access to Bluetooth hardware. API drafted, implementation underway.

Process

A draft specification and prototype implementation of new Web APIs will be discussed publicly on our mailing list and at our public meetings (see below). Once we have an API that we feel that we are satisfied with, we will submit the new API for standardization to the W3C.

The goal is to standardize all APIs.

Design Principles

Security

Security will be a central aspect of all the APIs that we design. We wouldn't want any random webpage to be able to read the user's contact list, or able to issue arbitrary commands to any USB device which is hooked up to the user's computer.

In some cases the solution will be to simply ask the user, like we do today for Geolocation for example. In other cases, where security implications are scarier or where describing the risk to the user is harder, we'll have to come up with better solutions.

This is an area where we're still doing a lot of research. I really want to emphasize that we don't have all the answers yet, but that we plan on having them before we roll out these APIs to millions of users.

Low Level vs. High Level

One question that often comes up, is should we do low level APIs, like USB access, or high level APIs, like camera access?

In many cases we are going to want to do both high level and low level APIs, with an initial priority on low level. High level APIs will let us create more friendly APIs, which are both easier to use for developers, and better for users since we can provide better security guarantees. However low level APIs will provide support for a wider range of hardware and use cases and will get the browser out of the critical path for innovation.

Meetings

  • Tuesday @ 10:00am Pacific Time
  • Dial-in: conference# 254
    • US/California/Mountain View: +1 650 903 0800, x92 Conf# 254
    • US/California/San Francisco: +1 415 762 5700, x92 Conf# 254
    • US/Oregon/Portland: +1 971 544 8000, x92 Conf# 254
    • CA/Vancouver: +1 778 785 1540, x92 Conf# 254
    • CA/Toronto: +1 416 848 3114, x92 Conf# 254
    • UK/London: +44 (0)207 855 3000, x92 Conf# 254
    • FR/Paris: +33 1 44 79 34 80, x92 Conf# 254
    • US/Toll-free: +1 800 707 2533, (pin 369) Conf# 254
  • No vidyo since the phone-vidyo bridge is too unreliable
  • *1 to unmute yourself
  • join irc.mozilla.org #webapi for back channel

Communication

Mailing-list / Newsgroup

You can subscribe to the mailing list here: https://lists.mozilla.org/listinfo/dev-webapi

And the web based API is here: http://groups.google.com/group/mozilla.dev.webapi/topics

The newsgroup lives on the news.mozilla.org server and has the name mozilla.dev.webapi

IRC

Find us on irc.mozilla.org in #webapi. Need help to use Mozilla IRC servers?

See also

Demos

Other efforts

Subpages of WebAPI

WebAPI/0-0-0WebAPI/2011-08-23
WebAPI/2011-08-30WebAPI/2011-09-06WebAPI/2011-09-20
WebAPI/2011-09-27WebAPI/2011-10-04WebAPI/2011-10-11
WebAPI/2011-10-18WebAPI/2011-10-25WebAPI/2011-11-01
WebAPI/2011-11-08WebAPI/2011-11-15WebAPI/2011-11-22
WebAPI/2011-11-29WebAPI/2011-12-13WebAPI/2011-12-20
WebAPI/2012-01-03WebAPI/2012-01-10WebAPI/2012-01-17
WebAPI/2012-01-24WebAPI/2012-01-31WebAPI/2012-02-07
WebAPI/2012-02-14WebAPI/2012-02-28WebAPI/2012-03-06
WebAPI/2012-03-13WebAPI/2012-03-20WebAPI/2012-04-03
WebAPI/2012-04-10WebAPI/2012-04-24WebAPI/2012-05-01
WebAPI/2012-05-08WebAPI/2012-05-15WebAPI/2012-05-22
WebAPI/2012-05-29WebAPI/2012-06-05WebAPI/2012-06-12
WebAPI/2012-06-19WebAPI/2012-06-26WebAPI/2012-07-03
WebAPI/2012-07-10WebAPI/2012-07-17WebAPI/2012-07-24
WebAPI/2012-07-31WebAPI/2012-08-07WebAPI/2012-08-14
WebAPI/2012-08-21WebAPI/2012-09-04WebAPI/2012-09-11
WebAPI/2012-09-18WebAPI/2012-09-25WebAPI/2012-10-02
WebAPI/2012-10-09WebAPI/2012-10-16WebAPI/2012-10-23
WebAPI/2012-10-30WebAPI/2012-11-13WebAPI/2012-11-20
WebAPI/2012-11-27WebAPI/2012-12-04WebAPI/2012-12-11
WebAPI/2012-12-18WebAPI/2013-01-15WebAPI/2013-01-22
WebAPI/2013-01-29WebAPI/2013-02-12WebAPI/2013-02-19
WebAPI/2013-02-26WebAPI/2013-03-05WebAPI/2013-03-12
WebAPI/2013-03-19WebAPI/2013-03-26WebAPI/2013-04-02
WebAPI/2013-04-09WebAPI/2013-04-23WebAPI/2013-04-30
WebAPI/2013-05-07WebAPI/2013-05-14WebAPI/2013-05-21
WebAPI/2013-05-28WebAPI/2013-06-04WebAPI/2013-06-11
WebAPI/2013-06-18WebAPI/2013-06-25WebAPI/2013-07-02
WebAPI/2013-07-16WebAPI/2013-07-23WebAPI/2013-07-30
WebAPI/2013-08-06WebAPI/2013-08-13WebAPI/2013-08-20
WebAPI/2013-08-27WebAPI/2013-09-03WebAPI/2013-09-10
WebAPI/2013-09-17WebAPI/2013-09-24WebAPI/2013-10-01
WebAPI/2013-10-08WebAPI/2013-10-15WebAPI/2013-10-22
WebAPI/2013-10-29WebAPI/2013-11-05WebAPI/2013-11-12
WebAPI/2013-11-19WebAPI/2013-11-26WebAPI/2013-12-03
WebAPI/2013-12-10WebAPI/2013-12-17-take2WebAPI/2014-01-07
WebAPI/2014-01-14WebAPI/2014-01-21WebAPI/2014-02-04
WebAPI/2014-02-11WebAPI/2014-02-18WebAPI/2014-03-04
WebAPI/2014-03-11WebAPI/2014-03-18WebAPI/2014-03-25
WebAPI/2014-04-01WebAPI/2014-04-15WebAPI/2014-04-18
WebAPI/AlarmAPIWebAPI/AppDefinedTeleophonyWebAPI/AppDefinedTelephony
WebAPI/ArchiveAPIWebAPI/AudioChannelsWebAPI/B2G1.0
WebAPI/BatteryAPIWebAPI/BrowserAPIWebAPI/CalendarAPI
WebAPI/CameraControlWebAPI/ContactsAPIWebAPI/ContactsAPI/2012
WebAPI/DataStoreWebAPI/DeviceIndexedDBWebAPI/DeviceStorageAPI
WebAPI/DeviceStorageAPI2WebAPI/Direct BillingWebAPI/Docs schedule
WebAPI/ExposureGuidelinesWebAPI/FileHandleAPI
WebAPI/IdleAPIWebAPI/Inter App CommunicationWebAPI/Inter App Communication Alt proposal
WebAPI/KeboardIMEWebAPI/LogAPI
WebAPI/Navigator.hasFeatureWebAPI/NetworkAPIWebAPI/PlannedWork
WebAPI/PowerManagementAPIWebAPI/ProposedDeviceStorageAPIWithNotificationsWebAPI/Push
WebAPI/Push/MeetingsWebAPI/Push/RequirementsWebAPI/PushAPI
WebAPI/PushAPI oldWebAPI/ResourceLockAPIWebAPI/ResourceStats
WebAPI/ScreenOrientationWebAPI/SecurityWebAPI/Security/Alarm
WebAPI/Security/BackgroundWebAPI/Security/BatteryWebAPI/Security/Bluetooth
WebAPI/Security/BrowserAPIWebAPI/Security/CameraWebAPI/Security/Contacts
WebAPI/Security/DeviceStorageWebAPI/Security/FMRadioAPIWebAPI/Security/Geolocation
WebAPI/Security/IdleWebAPI/Security/MobileConnectionWebAPI/Security/NetworkInfo
WebAPI/Security/NetworkInformationWebAPI/Security/OpenWebAppWebAPI/Security/PermissionsAPI
WebAPI/Security/PowerManagementWebAPI/Security/ResourceLockWebAPI/Security/SMS
WebAPI/Security/ScreenOrientationWebAPI/Security/SensorWebAPI/Security/Settings
WebAPI/Security/TCPSocketWebAPI/Security/VibrationWebAPI/Security/WebNFC
WebAPI/Security/WebTelephonyWebAPI/Security/WebUSBWebAPI/Security/Wifi
WebAPI/Security/indexDBWebAPI/Security/pushNotificationsAPIWebAPI/SettingsAPI
WebAPI/SimpleCellIDWebAPI/SimplePushWebAPI/SimplePush/Meetings
WebAPI/SimplePush/Meetings/2013-02-26WebAPI/SimplePush/Meetings/2013-02-27WebAPI/SimplePush/Protocol
WebAPI/SimplePush/ServerAPIWebAPI/SpeakManagerWebAPI/SpeakerManager
WebAPI/Storage2013WebAPI/WebActivitiesWebAPI/WebBluetooth
WebAPI/WebIccManager/Multi-SIMWebAPI/WebMMSWebAPI/WebMobileConnection
WebAPI/WebMobileConnection/Multi-SIMWebAPI/WebMobileConnection嗎WebAPI/WebNFC
WebAPI/WebPaymentWebAPI/WebPayment/Multi-SIMWebAPI/WebPaymentProvider
WebAPI/WebPrintAPIWebAPI/WebSMSWebAPI/WebSMS/Multi-SIM
WebAPI/WebSTKWebAPI/WebSerialWebAPI/WebSocketOverApps
WebAPI/WebTelephonyWebAPI/WebTelephony/Multi-SIMWebAPI/WebUSB
WebAPI/WebVoicemailWebAPI/WebVoicemail/Multi-SIMWebAPI/XHRBatch