With the creation of the new Extensible Web W3C Community Group I’d like to outline my personal thoughts about what might be necessary to achieve a standard way for developers to make extensions. For more information about what the group is interested in doing read my post about it.
The following is a description of the elements or components of a framework for creating Prollyfills that I’ll call the Standard Prollyfill Extensible Web framework (SPEW, because I do want this stuff spewed all over the web). Nothing in SPEW currently exists. I’m simply listing out the ideas that I think it would have that would make it successful.
There isn’t anything in the SPEW that would be useful to help authors come up with or create the syntactical element of their Prollyfill but there could be tooling built to help authors identify if syntax doesn’t already exist or possibly exists and is just slightly different. I think leveraging the W3C and WHATWG documentation is an obvious part of this tooling and maybe there is something in the SPEW that helps coagulate the authors syntax additions and current standard documentation.
Shameless plug: I’ve created a parsing expression grammar library that I hope to advance enough to be considered for this part of SPEW: Peggy.js
Credit to Marcos Caceres. He mentioned the code generation idea on the nExt Web mailing list and I’m glomming on to it here.
Lastly SPEW would contain tooling to deploy and publish a Prollyfill, making it available for the world to use. This part of SPEW would largely copy other package systems and/or simply use them. A large feature of this repository is the ability for runtime inclusion of Prolyfills. Not unlike websites include Facebook and Twitter widgets the SPEW Repository would provide a way for web developers to consume Prolyfills in their own applications.
Note there is a framework out there that has a good start on this: Hitch
Now that the nExt Web group exists, I think that a successful endeavor would be to create a framework that helps with Syntax, Parser, API and Repository. For web developers creating Prolyfills, I believe these are the essential components for success. I hope I’m not alone with these ideas and if you agree then you should participate: Prollyfill.org. If you think these ideas are really bad … you should participate!