BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Article: REST Anti-Patterns

Article: REST Anti-Patterns

Bookmarks
So you've decided to develop your application on the Web. The next step is probably WS-* or REST. This time you're convinced that REST is the way to go: how hard can it be compared to the other approaches? Well as Stefan discusses in this article, using HTTP doesn't necessarily mean you're being very RESTful.
HTTP is nothing new, but it has been applied in a wide variety of ways. Some of them were in line with the ideas the Web’s designers had in mind, but many were not. Applying REST principles to your HTTP applications, whether you build them for human consumption, for use by another program, or both, means that you do the exact opposite: You try to use the Web “correctly”, or if you object to the idea that one is “right” and one is “wrong”: in a RESTful way. For many, this is indeed a very new approach.
In his article he goes into detail on 8 common anti-patterns that he has encountered (and at least once been responsible for):

  • Tunneling everything through GET
  • Tunneling everything through POST
  • Ignoring caching
  • Ignoring response codes
  • Misusing cookies
  • Forgetting hypermedia
  • Ignoring MIME types
  • Breaking self-descripteness
As with any architectural style, whether it is for software, hardware or buildings, it's important to know the do's and don'ts, especially if they come from first-hand experience, so you can avoid making the same mistakes as others: you should be looking to make all new mistakes and learning from them.

Rate this Article

Adoption
Style

BT