Re: Prefixes, examples, communicating expectations and Compatibility Tables

Thanks for starting this thread, Carlos!

This is a tough issue, because there are many competing concerns. On the
one hand, you want to make it so that examples actually work when
developers try them. On the other hand, if you include all of the prefixes
you find yourself in an overwhelming snarl of prefixes, which probably
isn't great practice for web developers to follow long term.

Another important factor is that many developers will just copy/paste/tweak
the examples we give, so it's important to follow best practices as much as
possible lest we inspire people to write bad production code.

On Google's HTML5Rocks site, code examples in the article don't include the
prefixed versions, but if readers hover over the property name we show a
tooltip of which prefixes to use for real. In addition, the live examples *do
*use all applicable prefixes so that they run for readers.

I don't necessarily know what the right approach is in practice, just
wanted to give some more context.


On Fri, Oct 25, 2013 at 7:43 AM, Julee Burdekin <jburdeki@adobe.com> wrote:

> Hi, Carlos!
>
> It was good seeing you at html5devconf. Thanks for following up with this
> email.
>
> One thing that I didn't think to ask you: you're talking about the lines
> of code that you copy from code.webplatform.org to the
> docs.webplatform.org page, right? The code that runs in
> code.webplatform.org needs to be there for it to run in the browsers,
> right?
>
> Regardless, for the code snippets on the page, I don't know how to go. A
> person can waste a lot of time if they copy and paste from the page to
> their environment, then fail in their browser. Then again, snippets with
> the prefixes may be confusing and may become outdated quickly.
>
> What about if we leave the prefixes out of the snippets on the page, but
> ask folks to call out in the description to add any prefixes themselves
> when copying and pasting?
>
> What do others think?
>
> Julee
> ----------------------------
> julee@adobe.com
> @adobejulee
>
> From: Carlos Araya <carlos.araya@gmail.com>
> Date: Thursday, October 24, 2013 3:19 PM
> To: WebPlatform Public List <public-webplatform@w3.org>
> Subject: Prefixes, examples, communicating expectations and Compatibility
> Tables
> Resent-From: WebPlatform Public List <public-webplatform@w3.org>
> Resent-Date: Thursday, October 24, 2013 3:20 PM
>
> I've been thinking a lot about examples and how are going to handle
> vendors dropping prefixed implementations moving forward.
>
> In my opinion the examples should provide the information as it relates to
> the spec and not vendor implementations which may change between vendors
> and even between versions of the same browser.
>
> In my little ideal world I'd like to see the information moved to
> compatibility tables and, if we're going to give examples then they should
> be clearly labeled as cross browser examples just so we are clear what each
> example is.
>
> Related to compatibility tables... is it too late to ask for information
> about browser compatibility and prefix use?
>
>
>

Received on Friday, 25 October 2013 00:21:08 UTC