The Return
— of the —
Progressive Web
HTTP 0.9
— circ. 1991 —
graph TD;
web[http://example.com];
html[HTML Content];
web-->html;
html-- Link -->web;
<html>
<head><title>My Site</title></head>
<body>
<h1>Welcome!</h1>
<p>etc...</p>
</body>
</html>
Rise
— of the —
Googlebot
graph TD;
a[Super Important Page];
b[Page];
c[Page];
d[Page];
e[Page];
f[Page];
g[Page];
a-- Link -->b;
b-- Link -->a;
c-- Link -->a;
d-- Link -->c;
d-- Link -->a;
e-- Link -->a;
f-- Link -->a;
g-- Link -->a;
Good SEO
— starts with —
Crawlable content
JavaScript
— circ. 1995 —
graph TD;
web[http://example.com];
html[HTML Content];
js[JavaScript];
web-->html;
html-- Link/Form -->web;
html-->js;
js-- "DHTML" -->html;
jQuery
- Server renders HTML
- Styles applied via CSS
- Rich interactivity via JavaScript
Progressive
Enhancement
— circ. 2003 —
“…all the way up from “baseline”, to “legacy”, to “midrange”, to “modern” and beyond.”
Steve Champeon
“Build in layers, from HTML to CSS to Javascript. This creates a less fragile and more foolproof Web page”
Luke Wroblewski
“Progressive enhancement becomes an important strategy in order to deal with today and tomorrow’s diverse landscape.”
Brad Frost
“Fundamentally, progressive
enhancement is about accessibility”
Aaron Gustafson
Building with
— the web’s —
Foundational elements
- Semantic HTML
- Links and forms
- Standard form elements
Accessible,
Curlable
— & —
Crawlable
The Ajax Revolution
— circ. 2005 —
graph TD;
web[http://example.com];
api[http://api.example.com];
html[HTML Content];
js[JavaScript];
web-->html;
html-- Link/Form -->web;
html-->js;
js-- AJAX -->api;
api-->js;
js-- "DHTML" -->html;
Rise
— of the —
Single Page App
graph TD;
web[http://example.com];
api[http://api.example.com];
js[JavaScript];
web-- HTML Transport -->js;
js-- AJAX -->api;
api-->js;
AngularJS
<html>
<head><title>My Site</title></head>
<body>
<script src="my-awesome-app.js"></script>
</body>
Your single page app without JavaScript
“Make sure your web design adheres to the principles of progressive enhancement as this helps our systems (and a wider range of browsers) see usable content and basic functionality”
Google Webmaster Central
“We don’t have any non-JavaScript users”?
“All your users are non-JS
while they’re downloading your JS”
Jake Archibald, Google
Designed
— for the —
real world
If you haven’t tested your design
on a spotty 3G connection,
you haven’t tested your design
— When should we use —
progressive
enhancement?
- Initial page load speed is critical
- SEO is a priority
- Accessibility is a priority
- Your site is content-driven & publicly available
- Your site is an “essential service”, i.e. Coles Online
— Why should we —
Create single
page apps?
- Long-lived applications
- Richer, more app-like experiences
- Fluid transitions between multiple states
- Singular, cohesive UI codebase
- Easier to build, test and reason about
- Can be packaged into an app, e.g. PhoneGap
Make a choice…
Progressive enhancement or rich, app-like experience?
Node.js
&
React
// Server
React.renderToString(<Component />);
<div id="app"
data-reactid=".23qqlyvw6io"
data-react-checksum="509597258">
<h1 data-reactid=".23qqlyvw6io.0" >Welcome!</h1>
<p data-reactid=".23qqlyvw6io.1" >etc...</p>
</div>
<script src="my-awesome-app.js"></script>
// Client
React.render(<Component />, element);
// Your server rendered code
// is now a single page app!
graph TB;
web[http://example.com];
api[http://api.example.com];
html[HTML Content];
js[React Code];
web-- I. Runs -->js;
js-- II. Request -->api;
api-- III. Response -->js;
js-- IV. Renders --> html;
html-- V. Runs --> js;
Fig. I — With Client JavaScript
graph TB;
web[http://example.com];
html[HTML Content];
web-- I. Runs React code -->html;
html-- II. Link/Form --> web;
Fig. II — Without Client JavaScript
- Progressively enhanced
- Gracefully degrades to web 1.0
- Inherently crawlable
- More accessible by default
Making a choice…
Between progressive enhancement or a rich, app-like experience?
— “UX specialist”? —
Progressive
Enhancement is all
about the user
— “Front end developer”? —
You should be
looking at this
right now
The future
— belongs to —
Rich, progressive apps
Looking to get started with progressive React?