This domain and all content is a copy of my old website, for historical purposes only.

This post is over a year old, its content may be outdated.

Matt Wilcox

Web Development

Notes Nov 23rd 2014

Upcoming features for Web Developers

We have some new technologies coming up which are going to have a big impact on what we do and how we do it.

For a while some four or five years ago I really felt like web development was entering a bit of a doldrums in terms of feature development. CSS3 was about all I saw coming and, frankly, there was a lot of CSS3 I felt was mis-aimed and un-exciting. HTML got some love with HTML5, but the problem with HTML5 is that it's not really an enhancement in the same way CSS is – so you really need to wait for your core set of browsers to support the parts you want before you can use much of it, or you must rely on JS polyfills. That meant that I've not really used much HTML5 'stuff' until now. It's taken that long for me to feel it's viable.

Over the last year or so though, I've noticed a definite pick up in the rate of interesting stuff emerging. There's been the RICG and the Picture spec which, though flawed in some ways that still make me cringe, does a decent job of solving the responsive image problem in the present term.

Really though, I think there are three technologies that are going to be game changers, and I've mentioned them before as such on Twitter, but they are: HTTP2, Web Components, and Service Worker. Here's a quick run-down on why I think these are going to be fundemental changes to how we developers do what we do:

HTTP2 is aimed squarely at solving all the problems we have today with implementing app-like functionality. HTTP was based on a 'document' idea for what a website is; a page is a document, you serve the document and that's the end of it. Today though, we're after much richer things; we want the server and client to be able to keep better track of one another so things like partial-page updates can happen without the overhead of full document reloads, and other such issues. We want a much more fluid and optimised method of continual data exchange. And we want it to be secure from man-in-the-middle attacks, ISP manipulation, and governmental spying. HTTP2 answers all of this.

Web Components are going to be how we build web pages / web apps. They still need to bake in some Element Queries IMO, but they're already hugely exciting. We get to make our own HTML tags, and define what they do. We then get to re-use those tags wherever we like, and all of their associated styling, behaviours, and semantics come along for the ride. We get to make something like <map zone="uk"><brighton /><london /></map> – and have it render a map, scaled to fit in the UK, pinpointing Brighton and London. Marking up a web-page will become more high-level, a composition of available new elements that are far more expressive.

And there's the Service Worker, which is so powerful that it can allow us to write apps/pages that will work even without an internet connection, or to side-step the browser's black-hole cache mechanisms and do our own stuff. It allows us to keep open communication channel between client and server, push data to and fro, and a bunch of other useful things.

I'm so excited about these because, at last, they are low level tools built to allow us to make our own solutions to our problems as opposed to having 'browser feature' magical solutions that don't quite work how you really want them to and that you can't change.

If you'd like to learn more, the recent Chrome Developer Summit has a good selection of presentation videos that are well worth watching.

PS: Element Queries are the most exciting thing CSS could potentially offer over the next decade, IMO. They're the obvious logical answer to making modular components and something many people have proposed over many years – it is enormously exciting to see that at last the concept isn't getting cast aside. It's obvious how such a method would vastly reduce complexity of authorship and increase portability of code and it's nice to see it being tackled rather than passed over as 'too complex' or 'needing many use cases'.

PPS: Something that's been obvious to me for years and I've ranted about for years is that CSS is just fundamentally flawed – and on a number of levels, conceptually and in terms of implementation. Watch those videos and you may find yourself agreeing. I'd love to see something better replace it, and I don't care if that replacement comes from the W3C or not. Just make something that isn't littered with problems like CSS is.