RSSAmplifier

Blog

Stateless Blog

by Mike Kelly

blog.stateless.coRSS feed ↗11 posts

Latest posts

The case for hyperlinks in APIs

There seems to be a couple of common concerns that people have about introducing hypermedia to their APIs. There’s a thread on the api-craft mailing list called “Selling the benefits of hypermedia” where these were voiced. I’d like to address them here: REST should be simple, and hypermedia only complicates stuff… …it’s much more complicated or complex…

Hypermedia APIs on Rails: why DHH should "give a fk"

In a nutshell: directing your clients around your web API via link relations, rather than having them rely on URL conventions, is a good idea for exactly the same reason that Rails’ routing helpers are a good idea. For the benefit of those not familiar with what routing helpers are: they’re helper functions for URL paths that Rails provides for use within your web app’s code as…

HAL-HTML: HTML for automatons

I’ve said recently that HTML is clunky for APIs, but I didn’t really give it much thought. Since then I have given it some more thought and that led to me creating an HTML variant of HAL to test the waters and find out exactly how awkward it is. tl;dr - it’s actually not that bad. I’m almost convinced. I wrote some jQuery helpers and a stylesheet to turn it into something…

Don't use HTML as the Media Type for your API

tl;dr Render one hypermedia type for your human consumers (HTML) and another hypermedia type for your machine consumers ( HAL ). Conneg (see HTTP’s Accept, Content-Type, Vary headers) should be relatively easy to leverage for this with a decent development stack. Why? Clearly the hypermedia API for you application will have parallels with your HTML application, but the interface you are…

Upgrading WebHooks To Be More Useful

tl;dr We should upgrade WebHooks so that they can be created by submitting a form/template of the callback request to be generated. This will allow users to connect APIs together arbitrarily without having to wait for providers to do the work to make it happen. The long version.. In case you don’t know what “WebHooks” are, here’s a quote from the official wiki : The concept…

JSON Linking with HAL

Since the discussion about links in JSON seems to be opening up, I thought I would briefly explain my take on linking with JSON and how that presents itself in the design of HAL . We need a media type (the HTML of machines), not another XLink We need a general purpose media type, which extends JSON, that can be used as a standard way to represent a resource and its relations to other resources on…

Let's make edge-processability more visible

Update : Happy to have found an existing solution to this problem I’ve been promoting ESI as a serious consideration for anyone building scalable web apps for a while now, and reading mnot’s recent post about ESI prompted me to think about ways we can make ESI more efficient. Something I think would be highly beneficial is a new HTTP header for marking responses as edge-processable.…

An open data set for Jersey bus timetables

I’ve just spent a decent chunk of my Sunday pulling together the new winter time table data for the latest update to the Jersey Bus iPhone app .. it was riveting stuff! My good mate @robdudley has already asked for the data so he can use it in a web app he’s building, and I guess it could be useful for others in the future; so I’ve put it up as json in a gist on github so that…

How I made my OSX user experience not suck

Window management and virtual desktops are, at least for me, a couple of the most important features an operating system provides in my day-to-day workflow. I do a lot of (re)arranging, resizing, and switching between windows. Being able to manage this via keyboard shortcuts is important because that’s where my hands are most of the time. I don’t want fancy gestures or GUI nonsense, I…

How Offline Web Apps Should Work

I believe the current proposal for offline web applications is too complicated, fiddly, and brittle. There is a cleaner and more efficient approach which makes better use of existing mechanisms of the web to negotiate and manage “offline assets”. Here’s a brief summary: The essence of this proposal is that a proper solution to the offline web app problem should not require…

How to get ITV1 HD from Channel Islands

For whatever reason we are not blessed with ITV1 HD in the Channel Islands. You can fix this however by setting the channel up manually, here’s the steps to do so: Go to the tv guide menu Select ‘options’ from the top menu Select 'add channels’. Put the following info in: Frequency: 10.832 Polarisation: H Symbol Rate: 22 FEC: 5/6 Press yellow button Highlight 'ITV…