Thursday, June 14, 2012

First look - REST architecture

After working with the REST architecture for over a year now, it's about time to mention some of it's traits. I started with reading the book REST in Practice and of course the very famous How I explained REST to My Wife. Must confess that this was the first architecture which appeared simple and straight-forward. Couldn't wait to put REST into practice.

During the course of the last year, I've been involved in designing several RESTful services. Having to stick to the standard HTTP protocol and verbs makes life much simpler when trying to figure out how the services should look like. There's not much room for creativity there! That said, all the creativity lies in getting the resources right. I must have spend 80% of the time in modeling the resources and attaching them to the respective domains. Used Domain Driven Design principles to modeling. This process of design helps create and document domain models, which were always missing and now without whom life seems impossible.

Some best practices to building RESTful services:
  • Domain model design preceeds service design
  • Stick to the standard HTTP protocol
  • Establish patterns specific to the applications, and write them down as guidelines
  • Create a service catalog for the RESTful services

Overall, I've been very satisfied with the REST architecture. When implemented cautiously, it has the ability to create a services landscape, which are re-usable across front ends, and other systems. A dream of many, a reality for some!