User:Dmose:Fx-Docs:ContentTypeProcessing: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
 
(Add bug number for content-handling simplification.)
 
(11 intermediate revisions by 2 users not shown)
Line 2: Line 2:
;Feature tracking bug
;Feature tracking bug
* {{bug|372949}}
* {{bug|372949}}
* ''any other high-level tracking bugs can be listed here''
''Any relevant status comments for the feature can be placed here.''


= Overview =
= Overview =
Streamline and extend the handling of MIME content on the web.
Streamline and extend the handling of typed content on the web.


== Motivation ==
== Motivation ==
Line 20: Line 17:
** allow a website to render an Excel spreadsheet into HTML in an iframe
** allow a website to render an Excel spreadsheet into HTML in an iframe
** hand off a mailto: URL to a web mail app for composition
** hand off a mailto: URL to a web mail app for composition
** display a news: URL using Google Groups


== Requirements ==
== Requirements ==
* CON-001a P1 FR Support web services as MIME type handlers
{| border="1"
* CON-001b P2 FR Minimize/remove local MIME type database for local applications
| CON-001a || P1 || FR || Support web services as MIME type & protocol handlers || ||{{bug|380415}}, {{bug|372441}}
* CON-001c P3 FR Properly handle streaming content types - embedded or handed off to a helper app
|-
| CON-001b || P2 || FR || Minimize/remove local MIME type database for local applications || This actually means that we'll pass it up to the OS rather than directly to an application.
|-
| CON-001c || P3 || FR || Properly handle streaming content types - embedded or handed off to a helper app
|-
| CON-003a || P1 || NFR || Simplify content-handling UI || UI is ugly; needs to be less ugly || {{bug|377782}}
|-
| CON-003b || P2 || NFR || Create an easy-to use MIME-type handling configuration system || Isn't this the same as the previous item?
|-
| CON-003c || P3 || FR || Ability to show or sniff content on-demand and view in plaintext or html or other format instead || Need to find a non-scary way to present this to users.
|}


== Schedule ==
== Schedule ==
Line 31: Line 39:
= Design & Implementation =
= Design & Implementation =
;Documentation
;Documentation
* [[/User Interface|User Interface]]
* [[:CH Scratchpad|Content Handling Scratchpad]]
* [[ContentHandling:User_Interface|User Interface]]
* [[/Architecture|Architecture]]
* [[/Architecture|Architecture]]
* [[/Test Plan|Test Plan]]
* [[/Test Plan|Test Plan]]


;Repository
;Repository
:''Indicate where the code for the feature lives (in branch or as extension).''
The plan is to develop this on the trunk of the core Mozilla CVS repository.  


== API Changes ==
== API Changes ==
''list any API changes made by this feature.''
* navigator.registerContentHandler() will actually use registrations for non-feed types rather than dropping them on the floor
* navigator.registerProtocolHandler() will be implemented
* probable internal API changes related to both of the above
* possible internal API changes related to streaming content handling
* possible internal API changes related to minimizing database duplication


== Extensibility ==
== Extensibility ==
''list work done to make feature extensible by add-ons & any impact to extensibility of Firefox''
register{Content,Protocol}Handler are by definition extensibility features.  If one wanted to implement a handler in add-on chrome, that should theoretically Just Work, but if we care about this case, we should explicitly say so to ensure appropriate testing.  To some degree, everything else we're doing here is also about enhancing and streamlining the extensibility experience.


== Customization ==
== Customization ==
''list changes to preferences and customization controls for the feature''
Similarly, this set of features is entirely related to the ability for users to customize their web experience.


== Performance ==
== Performance ==
''list effects on performance, tests used, metrics targeted''
The only performance change that I anticipate is that web-based content handlers are almost certain to be slower than local ones.  I suspect that any overhead incurred by the browser here is likely to be lost in the noise of network latency.  That said, it would be good to do some profiling to ensure that this is the case.


== Reliability/Stability ==
== Reliability/Stability ==
''list effects on reliability/stability, tests used, metrics targeted''
We'll need to figure out what the failure mode should be when content is handed off to a website handler that is down.  This is particularly interesting in the case of dynamically generated content (e.g. receipts).


== Security ==
== Security ==
''list security impact and link to results of security reviews''
The content-handler stuff will definitely need a security review. The [http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers WHATWG Web Apps spec] discusses some of the stuff we'll need to think about there.  We also need to ensure that any changes made w.r.t. how we interact with OS definitions of content-handlers don't introduce new security flaws.


== Privacy ==
== Privacy ==
''list privacy impacts and any tie-ins to user privacy features''
Any content that a user chooses to have handled by a web app will (or at least could) be disclosed to the operator of the web application.


== Global Audience ==
== Global Audience ==
''list l10n requirements and a11y efforts''
* Each locale will want to offer multiple default choices for protocol handlers for at least mailto: URLs; perhaps other schemes.
* Similarly, we should be offering default choices for key MIME-types as well (text/calendar, pdf, etc.).


== Web Compatibility ==
== Web Compatibility ==
''list any known effects on compatibility with websites''
We will likely be the first extensive implementor of the register{Content,ProtocolHandler} pieces.  This may merit some evangelism to key web application implementors.


== Other ==
== Other ==
Line 70: Line 84:
= Discussion & Implications =
= Discussion & Implications =


One of the interesting things that will need to be addressed
== Caveats / What We've Tried Before ==
== Caveats / What We've Tried Before ==
''links to previous design documents, discussions, etc.''
''links to previous design documents, discussions, etc.''


== References ==
== References ==
''links to external documents that could inform the design of the feature''
The [https://addons.mozilla.org/firefox/4498/ MIME Edit] addon has some example UI that is more complete than our current UI, though not particularly friendly to non-technical users.
 
[http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers WhatWG Web Applications spec]
 
[http://groups.google.com/group/mozilla.dev.apps.firefox/msg/99762afeb38859d0 API request from an extension author for dialog extensibility]

Latest revision as of 18:54, 1 June 2007

Status

Feature tracking bug

Overview

Streamline and extend the handling of typed content on the web.

Motivation

Our current MIME-type handling has some rough edges that needs to be cleaned up. Additionally, more and more people are using web-applications as their primary way to handle specific types of content (e.g. calendar, mail). It should be possible for web sites to register content-handlers for types other than just RSS.

Use Cases

  • dynamic handoff
    • subscribe to an ICS calendar in a web calendar application
    • properly hand off streaming content (music, video) to a local or embedded player
  • static handoff
    • take an event in an ICS file generated by evite and insert it into a web calendar
    • allow a website to render an Excel spreadsheet into HTML in an iframe
    • hand off a mailto: URL to a web mail app for composition
    • display a news: URL using Google Groups

Requirements

CON-001a P1 FR Support web services as MIME type & protocol handlers bug 380415, bug 372441
CON-001b P2 FR Minimize/remove local MIME type database for local applications This actually means that we'll pass it up to the OS rather than directly to an application.
CON-001c P3 FR Properly handle streaming content types - embedded or handed off to a helper app
CON-003a P1 NFR Simplify content-handling UI UI is ugly; needs to be less ugly bug 377782
CON-003b P2 NFR Create an easy-to use MIME-type handling configuration system Isn't this the same as the previous item?
CON-003c P3 FR Ability to show or sniff content on-demand and view in plaintext or html or other format instead Need to find a non-scary way to present this to users.

Schedule

Describe the rough schedule here, linking back to relevant product release milestones, as well as linking to any build/release notes.

Design & Implementation

Documentation
Repository

The plan is to develop this on the trunk of the core Mozilla CVS repository.

API Changes

  • navigator.registerContentHandler() will actually use registrations for non-feed types rather than dropping them on the floor
  • navigator.registerProtocolHandler() will be implemented
  • probable internal API changes related to both of the above
  • possible internal API changes related to streaming content handling
  • possible internal API changes related to minimizing database duplication

Extensibility

register{Content,Protocol}Handler are by definition extensibility features. If one wanted to implement a handler in add-on chrome, that should theoretically Just Work, but if we care about this case, we should explicitly say so to ensure appropriate testing. To some degree, everything else we're doing here is also about enhancing and streamlining the extensibility experience.

Customization

Similarly, this set of features is entirely related to the ability for users to customize their web experience.

Performance

The only performance change that I anticipate is that web-based content handlers are almost certain to be slower than local ones. I suspect that any overhead incurred by the browser here is likely to be lost in the noise of network latency. That said, it would be good to do some profiling to ensure that this is the case.

Reliability/Stability

We'll need to figure out what the failure mode should be when content is handed off to a website handler that is down. This is particularly interesting in the case of dynamically generated content (e.g. receipts).

Security

The content-handler stuff will definitely need a security review. The WHATWG Web Apps spec discusses some of the stuff we'll need to think about there. We also need to ensure that any changes made w.r.t. how we interact with OS definitions of content-handlers don't introduce new security flaws.

Privacy

Any content that a user chooses to have handled by a web app will (or at least could) be disclosed to the operator of the web application.

Global Audience

  • Each locale will want to offer multiple default choices for protocol handlers for at least mailto: URLs; perhaps other schemes.
  • Similarly, we should be offering default choices for key MIME-types as well (text/calendar, pdf, etc.).

Web Compatibility

We will likely be the first extensive implementor of the register{Content,ProtocolHandler} pieces. This may merit some evangelism to key web application implementors.

Other

any other implementation or design related documentation

Discussion & Implications

One of the interesting things that will need to be addressed

Caveats / What We've Tried Before

links to previous design documents, discussions, etc.

References

The MIME Edit addon has some example UI that is more complete than our current UI, though not particularly friendly to non-technical users.

WhatWG Web Applications spec

API request from an extension author for dialog extensibility