We’re a few years deep in the REST revolution, and admittedly there are a few people really producing RESTful services. But almost everyone is missing the boat on the hypermedia requirement.
I’ve been reading some really interesting posts and blogs about hypermedia (see the mca link in my blog roll), and there is a growing resistance movement coming up against REST. People are making the claim that RPC is just a natural extension of programming practice, but we’re still arguing and struggling to figure out what REST is.
My personal opinion is that as the tools to support hypermedia evolve, REST as we know it today is going to become a side discussion. That the principles of REST will be just small part of the discussion on how we deliver hypermedia. A few examples of why I think that are:
If you think about it, from Roy Fielding’s point of view as a Network Architect — if I can use that term — focusing on the networking model behind REST makes a lot of sense. But from an industry point of view, the real success story of the Web is HTML. Fielding’s thesis is an interesting take on the principles that helped make the web successful, with special attention to HTTP, which he was partly responsible for. But the real, understated victory story in the web is HTML — hypermedia.
Contrast that with all the object serialization technologies that have risen and fallen. Corba, RMI, EJB, DCOM (is that right?), SOAP. Finally programmers got so frustrated with object marshaling being buried in this or that framework, that we just expose it. Today I just marshal everything to JSON with JAX-B and Jettison or Jackson, and AJAX is just an unpleasant memory.
But the Achille’s heel of all these technology is versioning. How do you support an object serialization scheme that doesn’t break the entire API the moment you touch one of the classes in your data model? HTML has done a fantastic job of that, and I think we should be looking at that to figure out what HTML did right, and all the others did wrong.
REST as construed by the adherents, is a good step in that direction, but after a promising start, it leaves out the most important pieces.
I think a few years from now, we’ll look back on the whole REST movement as an example of the tail wagging the dog, and hypermedia will be what everyone wants to talk about.