[x3d-public] TAG finding on Polyfills and the evolution of the Web: request for comment

Don Brutzman brutzman at nps.edu
Wed Nov 8 07:14:10 PST 2017


Michalis, thanks for looking this over.  It is interesting to consider how the user-interface landscape of a web page changes when X3D scene views can appear within a page, and when X3D models can float over a we page.

One starting comment we might have is that the term "polyfill" has nothing to do with polygon filling or rendering.

https://www.w3.org/2001/tag/doc/polyfills/#nomenclature-what-is-a-polyfill-
================================================================
1. Nomenclature: What is a polyfill?

A polyfill is a piece of JavaScript code that is intended to exactly simulate a native, interoperable feature of the web platform, for the purpose of allowing website developers to use modern web features in older browsers.

The term polyfill was coined by Remy Sharp in the 2009 book Introducing HTML5 (p276), and differentiated from shim:

     What makes a polyfill different from the techniques we have already, like a shim, is this: if you removed the polyfill script, your code would continue to work, without any changes required in spite of the polyfill being removed.

Since then, the term prollyfill has been used by some to refer to code which implements features that are yet to be sufficiently standardized to be considered part of the web platform. Ponyfill is occasionally used to refer to code which implements standard platform features but in a private scope. Other terms such as nottifill, shiv, sham, shim, library and patch also exist and are used with varying degrees of popularity and shared semantics.

We find that although the terms library and polyfill are the most well recognized of these, polyfill's etymology is non-obvious and is in part culturally specific to the UK. For the avoidance of confusion, we use the following terms in this finding and offer them as a useful reference:

     polyfill: Emulates a well established feature of the web platform
     speculative polyfill (aka 'ponyfill', 'prollyfill', 'nottifill'): Emulates a proposed feature of the web platform
     library (aka 'module'): Provides features or functionality not anticipated to be a web platform feature
================================================================

It is also instructive to consider extensibility parallels with X3D, as you have here.

On 11/7/2017 8:16 PM, Michalis Kamburelis wrote:
> 2017-11-08 3:03 GMT+01:00 Don Brutzman <brutzman at nps.edu>:
>> Polyfills and the evolution of the Web
>>
> 
> I'm not sure is this useful, but I thought about what is the
> equivalent of "polyfills" in the scope of X3D:
> 
> In the scope of X3D, an equivalent to a "polyfill" is defining an
> EXTERNPROTO that defines a node that is part of the X3D specification
> (or expected to become part of the X3D specification soon), but not
> yet implemented by all X3D browsers. This way even X3D browsers that
> don't (yet) implement this node can continue to operate as expected.
> 
> To make it work nicely (like a good "polyfill"), one specifies 2 (or
> more) URNs indicating the EXERNPROTO implementation. The first URN
> should indicate specification-compliant implementation (so that the
> EXTERNPROTO will use the native implementation, if possible). The last
> URN should refer to a PROTO implementation that provides (at least to
> some degree) a compatible implementation of this node using other
> nodes.
> 
> See
> - X3D spec about EXTERNPROTO:
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#Externalprototypesemantics
> - Web3d RFC about URN: http://www.ietf.org/rfc/rfc3541.txt?number=3541
> 
> For example, if the Teapot node would become part of the X3D standard,
> one could use this polyfill:
> 
> - https://github.com/castle-engine/demo-models/blob/master/prototypes/teapot_externproto.x3dv
> - https://github.com/castle-engine/demo-models/blob/master/prototypes/teapot_fallback_implementation.x3dv
> 
> (Tested in view3dscene).
> 
> Regards,
> Michalis

Not sure what responses we might assemble on this topic, but it seems important to respond when the Web at large takes common 3D terminology (polygon poly) and starts filling (shading, re-rendering) it with different meanings.

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list