Consider your application has feature A and feature B, and in order to implement each of these features you need to invoke functions X, Y, Z: The gods of DRY would proclaim that you should create a new function to encapsulate the behaviour of X,Y,Z. However, I would argue that unless that group of functions […]
There have been a number of attempts to define a maturity model for building RESTful services. The idea of the maturity model is that is gives an indication how closely the service complies with the constraints of REST and hopefully demonstrates the trade offs to be expected when choosing to not follow a particular constraint. One area […]
Rob Conery asked for some feedback on an API he has been building for Tekpub. I know that Rob asked for URLs, and URLs he shall get, but I like to get a better understanding of the relationships between my resources before I start minting URLs for my service. On a number of occasions I […]
How about that for acronym soup? In the spirit of doing smaller posts but more often, here is a handy little XSLT. Assuming you have the following XML, Using this XSLT You can generate this JSON It would be really interesting to try and use this Javascript XSLT processor to do the transform directly in the browser. […]
Along with the latest release of WCF Web API there was a updated version of HTTPClient . With it came a bunch of breaking changes, most notably, there are no more Sync methods for doing HTTP requests. This is a change that brings consistency with Microsoft’s new policy that all APIs that take more than 30ms (or is it […]
It appears I need to go on vacation more often. I seem to get more chance to experiment. One of my first discussions about RACK was with Mike Kelly where he suggested a simple solution to implementing HEAD across an API. Simply use a RACK application to convert a HEAD request to a GET and then when […]
So there I was, sitting at my PC hunting some bugs when up pops John Sheehan on IM and starts asking me questions about OPTIONS and TRACE http methods. I pretty much always have the HTTP spec close at hand so I think I was able to at least fake some prior knowledge in attempting to answer […]
We all have to start somewhere, and I like to start with the simplest possible thing that works. So I created a Console application and used NuGet to pull in the WebAPI.All package which contains all my dependencies.[1] Once that was done, all I need is this: If you point a browser to http://localhost:9000 you will get your first […]
It seems everyone these days wants an API for their web application. Getting a primitive Web API up and running can be deceptively simple. However, what many people don’t realize is that with the success of an API can come a variety of problems. As developers, we are used to dealing with unforeseen problems, we […]