Layered APIs
by @domenic / at BlinkOn 9
What are layered APIs?
Layered APIs overview
�Explainer: https://github.com/drufball/layered-apis�Blink design doc: https://bit.ly/lapis-design
Why high-level features?
Let's give the web a "standard library" comparable to other platforms.
Example potential LAPIs
Using LAPIs
<script type="module"� src="std:virtual-list|https://some.cdn.com/virtual-list.js">�</script>��<infinite-list>...</infinite-list>
Using LAPIs
<script type="module">�import { storage } from� "std:async-local-storage|https://other.cdn.com/als.mjs";��storage.get("key").then(...);�</script>
Implementation
In Blink, we plan to implement LAPIs in JavaScript.
LAPI status update
The project has solidified
LAPI projects in-flight
LAPI loading infrastructure
Settled on std:x|y module specifier syntax for now, after much deliberation. Now hiroshige@ is prototyping it so we can get feedback!
Async local storage
Like localStorage, but async!
Virtual list (aka "infinite list")
Goal for this quarter: comprehensive public explainer + standards outreach
Mystery third LAPI
More LAPIs out of the gate for a stronger offering
Suggestions welcome!
Open questions and issues
fn.toString()
Original built-ins
Fallback syntax
For now, we're settled on std:x|y
What other LAPIs should we prioritize?
We have a rough backlog of ideas. What's important?
Does your team work on some low-level capability, that could benefit from a high-level wrapper LAPI?
Thanks!