We have failed
non-programmers
"The thing I think historians will miss is that a web browser represents the first time we can download arbitrary
executable code and not worry about screwing things up." - @tomdale
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.
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.
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
});
"Apps"
Bookmarking a site == installing an 'app'
So... Rails?
- Basically APIs only.
- Use Rails-API.
- Use JSON-API.
- Use Ember.
- Admit reality.