Go to content Go to navigation

What's up with REST?

I've been waiting for a long time to write my view on RESTful web services. Today I have the opportunity because I've just turned the last page of RESTful web services, a book from O'Reilly.

In my opinion, there is a lot of hype on RESTful web services. In the first place, there are lots of people talking about REST web services. I seriously doubt all these people really know what does it mean to be RESTful. Therefore, there is also a big buzz and lots of topics and misunderstandings. I recommend reading this book to get a clear picture. For instance, you often hear that RESTful are "lightweight" web services, and therefore, quicker to develop and faster at run-time. That's a myth, at least in my opinion. Although the authors of the book are clearly pro-REST, they carefully avoid any statement about the "better performance" or "lightweightness" of the RESTful web services. That is one of the strong points of the book.

However, there are also shadows in the book (always in my opinion, of course). The authors admit they have a bias towards REST, and this bias has a reflection on the text. They harshly speak of non-REST web services ("[non-HTTP based Big Web Services are a] bizarre spectacle"). They discard content-negotiation because it is not RESTful enough (although it is a basic feature of HTTP). Instead, they propose to use different URIs for different representations of the same resource. They advice programmers to include links in the responses of RESTful web services in order to improve the linkedness of the programmable web, while in my opinion, they are useless because they lack semantics (let me expand on this: I think links in HTML pages are OK, because they have well-defined semantics; links between RDF nodes are OK, because they have well-defined semantics; URIs included in an attribute in an XML file with a custom schema, or a JSON file, are just plain literals without meaning). Last but not least, they talk a lot about the "web of the machines", the "programmable web"... but they don't even say a word about the semantic web and semantic web services.

Finally, a quote from the book: "The Internet and the Web did not have to exist. They come to us courtesy of misallocated defense money, skunkworks engineering projects, worse-is-better engineering practices, big science, naive liberal idealism, cranky libertarian politics, techno-fetishism, and the sweat and capital of programmers and investors who thought they'd found an easy way to strike it rich".