Re: [w3c/ServiceWorker] Declarative routing (#1373)

In case prior art is useful, [here's the syntax that Workbox uses](https://developers.google.com/web/tools/workbox/modules/workbox-build#generateSW-runtimeCaching) for expressing runtime routing information inside of a JS object. This is read by Workbox's build tools and translated into calls to the underlying Workbox libraries when generating a service worker file.

That syntax has a lot of baggage from the [earlier syntax used by `sw-precache`](https://github.com/GoogleChromeLabs/sw-precache#runtimecaching-arrayobject), which in turn had baggage due to how `sw-toolbox` was implemented. So... I'm not suggesting that it's actually something that should be used as-is. Maybe as a counter-example.

Also, I could be wrong here, but a syntax based on object properties rather than one based on classes seems like it would offer more flexibility when it comes time to write the inevitable JavaScript polyfill.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1373#issuecomment-452353115

Received on Tuesday, 8 January 2019 16:05:20 UTC