Web Browsers:Om nom nom – We have failednon-programmers – Web Standards Now



Web Browsers:Om nom nom – We have failednon-programmers – Web Standards Now

0 0


browsers_eat_the_world

A talk about how web browsers will eat the world.

On Github steveklabnik / browsers_eat_the_world

Web Browsers:Om nom nom

By Steve Klabnik

Slides: http://steveklabnik.github.io/browsers_eat_the_world/

We have failednon-programmers

"The thing I think historians will miss is that a web browser represents the first time we can download arbitraryexecutable code and not worry about screwing things up." - @tomdale

Web Standards Now

How it "works"

  • Browser vendor proposes feature.
  • W3C specification.
  • Other browser vendors implement the feature.
  • Someone implements a JS wrapper on top of feature.

Cons

  • Vendors don't build sites.
  • Takes forever.
  • No web dev feedback.
  • Spotty support.

Web Standards Tomorrow?

How it should work

  • Build new features in JS.
  • W3C specification.
  • Implement natively in browsers.

Pros

  • Devs do build sites.
  • Speed not limited by vendors.
  • Polyfill on day one.

Cons

Browsers aren't extensible.

Extending Browsers

Example: CSP

Content-Security-Policy: default-src 'self' ajax.googleapis.com

CSP in JS

var origin = window.location.origin;
 
page.addEventListener('fetch', function(e) {
  var url = e.request.url;
  if (origin !== url.origin) {
    // block the network request
    e.preventDefault();
  }
 
  // otherwise, allow the network request through
});

jQuery polyfill

"Apps"

Bookmarking a site == installing an 'app'

So... Rails?

  • Basically APIs only.
  • Use Rails-API.
  • Use JSON-API.
  • Use Ember.
  • Admit reality.

Web Browsers: Om nom nom

<3 - @steveklabnik

http://extensiblewebmanifesto.org