This is a continuation of a series on a Rest Agent library I am building for accessing REST apis. The first post is here and and the second is here. So far the only significant operation that we enabled our RestAgent to perform is NavigateTo(). However, for a RestAgent on a mission, going places is [...]
Archives for Uncategorized
Rest Agent uses hypermedia
As I alluded to in my first post, REST clients really should be driven by hypermedia. So how can our RestAgent class access this hypermedia and its links. Ideally, given a single root URI, I would like to be able to do: var agent = new RestAgent(new HttpClient()); agent.NavigateTo(new Uri(“http://api.stackoverflow.com/”)); var questionsLink = agent.CurrentLinks[“Questions”] agent.NavigateTo(questionsLink); [...]
Rest Agent – An introduction
You might say I’m a bit of a fan of the REST architectural style. Let me provide a little background to clarify why REST is important to me, so you can better understand my underlying objectives. If we have similar objective then maybe this series of posts will be of interest to you. I write [...]
The StackOverflow question that couldn’t stay open
This http://stackoverflow.com/questions/3285704/why-does-rest-exist is the question that I want to give an answer to. I am answering here because people keep closing it. Sorry, the post refers directly to issues raised in the question and so won’t make much sense without reading the question first. I would even recommend reading version of the question prior to [...]
World’s simplest OData service
I get frustrated sometime trying to play around with new Microsoft technologies. The process usually involves; install this CTP, apply this hotfix, create a project using this template, and this item using another template. By then end I may have something working but I don’t know what magic happened behind the scenes. Here is a [...]
Using the HttpClient and the OData service to download Mix videos
Here is some code I wrote to give me some experience playing with an OData service, learning more Linq, using my favourite HTTP client library and getting to download mix videos. It will download only the videos related to the tag name that you specify and currently it is set to download the low quality [...]
Convert XML to JSON using XSLT
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, <Customers> <Customer Id="99"> <Name>Bob</Name> <Age>39</Age> <Address> <Street>10 Idle Lane</Street> <City>Yucksville</City> <PostalCode>xxxyyy</PostalCode> </Address> </Customer> <Customer Id="101"> <Name>Bill</Name> <Age>39</Age> <Address> <Street>10 Idle Lane</Street> <City>Yucksville</City> <PostalCode>xxxyyy</PostalCode> </Address> </Customer> </Customers> [...]
But can you test it?
Testing code that uses HttpWebRequest directly, is a real pain. Usually what I have seen people do is create a service interface that hides the real http client behind the interface and then create fake service implementations to actually run their tests against. The annoying part about that solution is that Http client interfaces tend [...]
FOR XML PATH and CQRS
In a recent twitter exchange with Colin Jack I claimed that SELECT {…} FROM […] FOR XML PATH() is pretty much all you need for providing the Reporting side of CQRS. Ok, so maybe I overstated it a tad, but it is a valuable technique. He suggested I blog about it, so I figured even [...]
Woe is me, the WOA unmanifesto
This started as a comment on the blog post here, but it got too long. I have two questions for Dion and a few comments. 1) Have you read (not just skimmed a few times) Roy’s dissertation on REST? 2) Have you written both a REST service and a REST client that is in production [...]

Posts