Changes

Jump to: navigation, search

Tantek-Mozilla-Projects

1 byte added, 22:10, 20 August 2010
resort/prioritize
== Web Apps ==
=== DOM API vendor prefixing ===
==== spec implementation problem statement ====
Problem statement: the '''specification-implementation co-dependency problem'''.
 
All standards in development have the challenging seemingly contradictory problems of:
# '''needing some implementation to reality-check''' that the API/protocol/format "works" as intended, or is workable/usable
# '''being stuck with a specific (often buggy) implementation''' once it ships because there's content/pages/apps out there that depend on it.
 
There are three areas of the open web app platform that this has been problematic:
# '''CSS'''. In the past, some properties were implemented, either as spec'd (and the spec was buggy), or in a way that made sense but incompatible with the spec (because the spec didn't make sense or was not useful to web authors), and then we got "stuck" with those implementations and were not able to update/fix the spec and the respective properties and/or values. Examples:
## 'clip' property. mis-specified in CSS 2.0. implemented as presumed intended in IE4/Windows etc. but turned out to be buggy. some content started depending on it. we (CSS WG at the time) were unable to really fix it in a way that implementations could change, though [http://www.w3.org/TR/CSS21/visufx.html#clipping CSS 2.1 tries to fix clip].
## 'word-wrap' property. in this case, created/proposed by Microsoft, and [http://msdn.microsoft.com/en-us/library/ms531186.aspx implemented as of IE5.5/Windows ca 2000], we are again, kind of stuck with the particular implementation. [http://www.codingforums.com/archive/index.php/t-2075.html Forum posts as of 2002 were recommending use of the literal word-wrap property]. Though since Microsoft did switch to advocating/supporting a prefixed version '-ms-word-wrap'. Note that it is also [https://developer.mozilla.org/en/CSS/word-wrap supported in Firefox 3.5 ca 2009], and it is in the latest (2007) version of the [http://www.w3.org/TR/2007/WD-css3-text-20070306/#word-wrap CSS3 Text spec which is just a working draft].
### See related 'word-break' property ([http://www.w3.org/TR/2007/WD-css3-text-20070306/#word-break word-break in CSS3 Text WD] - latest, 2007), also [http://msdn.microsoft.com/en-us/library/ms531184.aspx initially (partially) implemented in Internet Explorer 5.x as word-break], and later switched to the prefixed '-ms-word-break'. [http://msdn.microsoft.com/en-us/library/cc351024%28VS.85%29.aspx More on CSS Compatibility and Internet Explorer].
# '''HTML'''. Too many examples to list here. Some browsers are still stuck supporting <code>&lt;blink&gt;</code> and <code>&lt;marquee&gt;</code> (which has many odd details), nevermind the classic example of <code>&lt;table&gt;</code> layout, with tons of odd special cases and error-handling for compat, originally from Netscape's implementation, reverse-engineered by Microsoft in Internet Explorer, which has subsequently been reverse-engineered by every other browser.
# '''DOM'''. In particular [http://www.w3.org/TR/2009/WD-webstorage-20091222/ Web Storage working draft] (e.g. the 'localStorage' attribute/property) was implemented in multiple browsers (IE8+, Chrome, Safari, Opera, Mozilla as of 2010 - date order unknown). By the time people discovered it was not threadsafe as specified, it was too late to change the spec to fix that problem - it would have broken too many apps/sites already written which apparently depended on it.
 
==== existing solutions ====
 
The only one of these areas of technology that has an explicit solution to the specification-implementation co-dependency problem is CSS, through vendor-prefixes.
 
===== CSS vendor prefixes =====
In the early 2000s the participants in the CSS working group agreed to formalize a way for implementors to build experimental implementations of new properties and values which were only in a working draft (not yet in a Candidate Recommendation) without saddling the property with implementation specific bugs that content would end up inadvertently depending on.
 
CSS prefixing is fairly straight forward:
 
<pre>- abbreviated_vendor_prefix - property_name</pre>
 
(spaces added for clarification of the different components)
 
Examples include:
* -moz-opacity
* -o-border-radius
* -webkit-border-radius
* -ms-word-wrap
 
===== CSS vendor prefixes case studies =====
* '''border-radius'''. for a few years now browsers have been implementing ''vendor prefixed'' versions of the border-radius properties, web authors have been experimenting on the web, and the spec has iterated/improved based on feedback. Now we have a well-designed and road-tested 'border-radius' property in a CR spec and implementations are implementing that.
* '''word-wrap vs whitespace: pre-wrap'''. interactions between new properties and new values on existing properties. See this [http://scottonwriting.net/sowBlog/archive/0000/00/00/163005.aspx example of the property vs value interaction] between the new 'word-wrap' property and the (sometimes prefixed) new 'pre-wrap' value on the 'whitespace' property. The point is to show how prefixing can actually work across different approaches to evolving CSS.
 
==== analysis of applicability ====
Can we apply similar thinking and solutions to HTML and/or DOM?
 
For HTML (or any markup) the thinking is no - because of the fact that an element only allows one tagname, there is no way to have content first use a vendor prefixed tagname (or tagnames from multiple vendors), and then also use a final unprefixed tagname all at the same time as part of a content evolution/transition strategy. CSS vendor prefixing works (as illustrated in the case studies) because authors ''can'' create style sheets that use multiple versions of a property (vendor prefixed and unprefixed) in one style sheet, together while evolving their content over time.
 
For DOM, it is not only possible, but there are examples in the wild.
 
[https://developer.mozilla.org/en/DOM/window.onmozorientation mozOrientation] is a good example of a vendor prefixed DOM interface implementation. (Note mozOrientation needs to be submitted to a W3C working group for standardization/iteration)
 
==== simple DOM vendor prefixes proposal ====
 
For all DOM interfaces that are:
* Proprietary. No standards organization draft yet published. OR
* In a W3C working draft, not yet in a Candidate Recommendation.
 
Use vendor prefixed interfaces and values as follows:
 
<pre>vendor_prefix _ unprefixed_name</pre>
 
E.g. in the above example of mozOrientation, we really should be using:
 
<pre>moz_Orientation</pre>
 
This works because standard DOM APIs do not use underscores.
 
Our goal is to establish a convention (like the above) for all such pre-CR DOM APIs that has the consensus of implementers so that we can avoid creating broken versions of APIs
 
=== UI Styling ===
At a high level there are two general clusters of use cases that web pages/apps want/need to solve in terms of user interface fidelity.
* [https://bugzilla.mozilla.org/show_bug.cgi?id=431176 431176] - (border-radius) Tracking bug for remaining issues with CSS3 border-radius
*[https://bugzilla.mozilla.org/show_bug.cgi?id=451134 451134] - change -moz-border-radius* properties to css3-background names
 
=== DOM API vendor prefixing ===
==== spec implementation problem statement ====
Problem statement: the '''specification-implementation co-dependency problem'''.
 
All standards in development have the challenging seemingly contradictory problems of:
# '''needing some implementation to reality-check''' that the API/protocol/format "works" as intended, or is workable/usable
# '''being stuck with a specific (often buggy) implementation''' once it ships because there's content/pages/apps out there that depend on it.
 
There are three areas of the open web app platform that this has been problematic:
# '''CSS'''. In the past, some properties were implemented, either as spec'd (and the spec was buggy), or in a way that made sense but incompatible with the spec (because the spec didn't make sense or was not useful to web authors), and then we got "stuck" with those implementations and were not able to update/fix the spec and the respective properties and/or values. Examples:
## 'clip' property. mis-specified in CSS 2.0. implemented as presumed intended in IE4/Windows etc. but turned out to be buggy. some content started depending on it. we (CSS WG at the time) were unable to really fix it in a way that implementations could change, though [http://www.w3.org/TR/CSS21/visufx.html#clipping CSS 2.1 tries to fix clip].
## 'word-wrap' property. in this case, created/proposed by Microsoft, and [http://msdn.microsoft.com/en-us/library/ms531186.aspx implemented as of IE5.5/Windows ca 2000], we are again, kind of stuck with the particular implementation. [http://www.codingforums.com/archive/index.php/t-2075.html Forum posts as of 2002 were recommending use of the literal word-wrap property]. Though since Microsoft did switch to advocating/supporting a prefixed version '-ms-word-wrap'. Note that it is also [https://developer.mozilla.org/en/CSS/word-wrap supported in Firefox 3.5 ca 2009], and it is in the latest (2007) version of the [http://www.w3.org/TR/2007/WD-css3-text-20070306/#word-wrap CSS3 Text spec which is just a working draft].
### See related 'word-break' property ([http://www.w3.org/TR/2007/WD-css3-text-20070306/#word-break word-break in CSS3 Text WD] - latest, 2007), also [http://msdn.microsoft.com/en-us/library/ms531184.aspx initially (partially) implemented in Internet Explorer 5.x as word-break], and later switched to the prefixed '-ms-word-break'. [http://msdn.microsoft.com/en-us/library/cc351024%28VS.85%29.aspx More on CSS Compatibility and Internet Explorer].
# '''HTML'''. Too many examples to list here. Some browsers are still stuck supporting <code>&lt;blink&gt;</code> and <code>&lt;marquee&gt;</code> (which has many odd details), nevermind the classic example of <code>&lt;table&gt;</code> layout, with tons of odd special cases and error-handling for compat, originally from Netscape's implementation, reverse-engineered by Microsoft in Internet Explorer, which has subsequently been reverse-engineered by every other browser.
# '''DOM'''. In particular [http://www.w3.org/TR/2009/WD-webstorage-20091222/ Web Storage working draft] (e.g. the 'localStorage' attribute/property) was implemented in multiple browsers (IE8+, Chrome, Safari, Opera, Mozilla as of 2010 - date order unknown). By the time people discovered it was not threadsafe as specified, it was too late to change the spec to fix that problem - it would have broken too many apps/sites already written which apparently depended on it.
 
==== existing solutions ====
 
The only one of these areas of technology that has an explicit solution to the specification-implementation co-dependency problem is CSS, through vendor-prefixes.
 
===== CSS vendor prefixes =====
In the early 2000s the participants in the CSS working group agreed to formalize a way for implementors to build experimental implementations of new properties and values which were only in a working draft (not yet in a Candidate Recommendation) without saddling the property with implementation specific bugs that content would end up inadvertently depending on.
 
CSS prefixing is fairly straight forward:
 
<pre>- abbreviated_vendor_prefix - property_name</pre>
 
(spaces added for clarification of the different components)
 
Examples include:
* -moz-opacity
* -o-border-radius
* -webkit-border-radius
* -ms-word-wrap
 
===== CSS vendor prefixes case studies =====
* '''border-radius'''. for a few years now browsers have been implementing ''vendor prefixed'' versions of the border-radius properties, web authors have been experimenting on the web, and the spec has iterated/improved based on feedback. Now we have a well-designed and road-tested 'border-radius' property in a CR spec and implementations are implementing that.
* '''word-wrap vs whitespace: pre-wrap'''. interactions between new properties and new values on existing properties. See this [http://scottonwriting.net/sowBlog/archive/0000/00/00/163005.aspx example of the property vs value interaction] between the new 'word-wrap' property and the (sometimes prefixed) new 'pre-wrap' value on the 'whitespace' property. The point is to show how prefixing can actually work across different approaches to evolving CSS.
 
==== analysis of applicability ====
Can we apply similar thinking and solutions to HTML and/or DOM?
 
For HTML (or any markup) the thinking is no - because of the fact that an element only allows one tagname, there is no way to have content first use a vendor prefixed tagname (or tagnames from multiple vendors), and then also use a final unprefixed tagname all at the same time as part of a content evolution/transition strategy. CSS vendor prefixing works (as illustrated in the case studies) because authors ''can'' create style sheets that use multiple versions of a property (vendor prefixed and unprefixed) in one style sheet, together while evolving their content over time.
 
For DOM, it is not only possible, but there are examples in the wild.
 
[https://developer.mozilla.org/en/DOM/window.onmozorientation mozOrientation] is a good example of a vendor prefixed DOM interface implementation. (Note mozOrientation needs to be submitted to a W3C working group for standardization/iteration)
 
==== simple DOM vendor prefixes proposal ====
 
For all DOM interfaces that are:
* Proprietary. No standards organization draft yet published. OR
* In a W3C working draft, not yet in a Candidate Recommendation.
 
Use vendor prefixed interfaces and values as follows:
 
<pre>vendor_prefix _ unprefixed_name</pre>
 
E.g. in the above example of mozOrientation, we really should be using:
 
<pre>moz_Orientation</pre>
 
This works because standard DOM APIs do not use underscores.
 
Our goal is to establish a convention (like the above) for all such pre-CR DOM APIs that has the consensus of implementers so that we can avoid creating broken versions of APIs
=== UI Layout ===
** need to get in touch with Tab Atkins and catch-up on the current state of his work vs. existing prefixed partial implementation in Firefox and Safari.
*** 2010-155 briefly spoke with Tab about flex box in irc and noted that I'm working on css3-color and css3-ui first.
 
== Web Apps Waiting For ==
Canmove, confirm
2,698
edits

Navigation menu