REST is DSL

I like RESTful URLs. They clearly express the intent of the provided resource. We humans speak a language close to REST when we talk to The Internet. 

Take a look at Google’s RESTful search query, probably the most used RESTful URL ever:

http://www.google.com/search?q=your-terms-of-choice

in freeform language this translates to: “Google, search for this term.”

How about the Flickr RESTful tag cluster search service:

http://api.flickr.com/services/rest/?method=flickr.tags.getClusters&
api_key=a6f11b67ae348a7b3f2da0d865b8bc1d&tag=Berlin

In Flickr lingo this means: “Fetch all tag clusters for the ‘Berlin’ tag”.

It doesn’t take much to understand RESTful URLs. They speak the language of the domain they represent and therefore in the Web Services provider-consumer world:

The collection of all RESTful services provided by a domain represents its web-oriented Domain Specific Language.  

DSLs have been around for a long time. For more information check Martin Fowler’s talk on the subject.