class: center, middle # The past, present, and future of the Web ## By @steveklabnik --- class: center, middle # Agenda ## 1. A short history of the Web ## 2. What is "the web platform"? ## 3. Where are we going? (wasm) --- class: center, middle  --- class: center, middle # A short history of the Web --- class: center, middle ### In the beginning ## There was HTML ### And it was good --- class: center, middle ## August 6, 1991, the first web site goes live  --- class: center, middle  --- class: center, middle ## CSS was first proposed by Håkon Wium Lie on October 10, 1994. --- class: center, middle ## JavaScript was created in in May 1995 by Brendan Eich. --- class: center, middle ## The core technologies of the web were set 23 years ago. --- class: center, middle ### The first version of mod_perl was written by Gisle Aas and released on March 25, 1996. ### CGI, the "Common Gateway Interface", proposed in 1993, standardized in 2004. --- class: center, middle ## More stuff *has* happened, but mostly *refinement*, rather than *revolution*. --- class: center, middle ## There is a precursor, though: the rediscovery of JavaScript. --- class: center, middle # What is "the web platform"? ## It should be "the web *application* platform." --- class: center, middle # Platforms consist of: ## 1. An ISA (instruction set architecture) ## 2. A runtime environment and its API ## 3. Tooling to help you build stuff --- class: center, middle # Case study: Java ## 1. ISA: Java Bytecode ## 2. Runtime: JVM ## 3. Tooling: javac --- class: center, middle # Case study: UNIX on x86 ## 1. ISA: x86 ## 2. Runtime: UNIX (wait what?) ## 3. Tooling: shell, C, gcc --- class: center, middle ### The web platform is unusual in that it was developed ## out of order ### and it historically has had ## missing pieces --- class: center, middle ## Other platforms were local, then networked. ## The web platform is networked, and only now becoming local. --- class: center, middle # The browser was a *viewport* into an *application on the server*. --- class: center, middle # This limits the kind of applications that we can build on the web platform. --- class: center, middle # Where are we going? --- class: center, middle ## Further developing the web platform's capabilities requires filling in the missing pieces. --- class: center, middle # Case study: Web Platform ## 1. ISA: ??? ## 2. Runtime: JavaScript + Platform APIs ## 3. Tooling: So so so so so many --- class: center, middle # JavaScript as ISA? ## Sort of, but not *really*. --- class: center, middle # JavaScript was not designed for this task. ## "Compile to JS" works, but has significant drawbacks. --- class: left, middle ### Overhead: Download, Parse, Compile, Execute ### No integers? ### Too complex (885 pages) --- class: center, middle # Enter WebAssembly ## 1. ISA: **WebAssembly** ## 2. Runtime: JavaScript + Platform APIs ## 3. Tooling: So so so so so many ### Spec: 165 pages --- class: center, middle ## Previously, the web could only handle *high level* tasks. ## With wasm, the web platform can handle *low level* tasks. --- class: center, middle ## The Web Platform is closing in on application spaces previously only possible on other platforms. --- class: center, middle ## Aside: isn't this Java Applets? Flash? NaCL? # NO ## * One VM ## * Not tied to one language ## * Proper platform integration --- class: center, middle ## It's not just about wasm, it's also about the platform expanding: ## * WebGL ## * WebAudio ## * WebUSB (!) --- class: center, middle ## Soon, "web application" does not need to be synonymous with "networked application" or "web page" or anything else we associate with the web platform today. --- class: center, middle # Let's go back to an earlier slide: # --- class: center, middle ## SPAs shifted *some* of the application to the client. ## This work enables *all* of the application to be on the client. --- class: center, middle # Why is this useful? ## Universal, cross-platform applications. ## "no install neccesary" --- class: center, middle # What *is* WebAssembly, anyway? ## Extremely misunderstood 🙁 --- class: center, middle # Factorial ## Wasm is a compact, binary format:
20 00 42 00 51 04 7e 42 01 05 20 00 20 00 42 01 7d 10 00 7e 0b
--- class: center, middle ## It also has a text format, so you can "view source" easily.  --- class: center, middle ## It's designed to be small, efficient, and integrate with existing JS VMs. --- class: center, middle ## It's *not* designed to replace JavaScript --- class: center, middle ## It has limitations, such as not being able to access the DOM --- class: center, middle ## It has no GC integration ### This means, C, C++, and Rust #### JavaScript does *not* compile to wasm --- class: center, middle ## You can do cool things!  --- class: center, middle ## You can do cool things!  --- class: center, middle ## You can do cool things! ### *Nebulet* is an operating system where wasm is the native program format --- class: center, middle ## Traditional web applications will always be a thing. ### This is about *expansion*, not *replacement*. --- class: center, middle # The Birth & Death of JavaScript ## [A talk by Gary Bernhardt from PyCon 2014](https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript) --- class: center, middle ## Bootstrapping ## * Cross compile your shell to the browser, via wasm ## * Cross compile your compiler to the browser, via wasm ## * Compile your shell in the browser via the compiler you just cross-compiled --- class: center, middle ### Soon, "web application" does not need to be synonymous with "networked application" or "web page" or anything else we associate with the web platform today. --- class: center, middle # Thanks! ## @steveklabnik