December 5, 2011 23:08 by
Admin
One of the principles of REST is to use “Hypermedia As The Engine Of Application State” (HATEOAS). This means that a web service should provide its clients with all the information they need in order to interact with the service… and this information should be provided along with the response to any request. Most people understand this to mean URIs should be embedded into the responses that are served, so that a client can follow the links in order to change the application state. However, something else that the HTTP standard provides in order to support this discoverability is the Allow header that the server can populate to indicate which HTTP methods a resource support. The Resources Over MVC (ROM) assembly allows this header to be supported.
More...
205ad411-a96c-48a5-a653-0b28256cca2e|4|4.5
November 19, 2011 21:35 by
Admin
The Resources Over MVC (ROM) assembly allows your RESTful web service to serve multiple representations. Out of the box it supports JSON and XML. One advantage of creating a web service using ASP.Net MVC rather than Windows Communication Foundation (WCF) is that you also get great support for serving XHTML as another representation. This allows a developer to investigate your web service with their browser. In this post we’ll look at providing help (and a test harness) for the client developer directly within the web service.
More...
dd128d9a-65ba-4731-98f4-af824abe7a3f|1|5.0
November 9, 2011 23:31 by
Admin
Simple Clients Part 1 explained how introducing the MapRomRoute extension methods from the the Resources Over MVC (ROM) assembly allows simple User Agents to request resources in a particular format using a query string parameter. This post looks at how the same extension also allows User Agents to “Overload” the POST method if they don’t support the full range of HTTP Methods.
More...
80ae52a3-4a07-442d-9bde-2df93c36996a|0|.0
November 8, 2011 00:21 by
Admin
In an earlier post we created a Bare Minimum web service that supported XHTML, JSON and XML, but it did not make it easy for us to request one of the alternate representations directly from a web browser (as opposed to using JavaScript) as the user can’t change the Accept type the browser sends. It’s not only web browsers that can have this problem. There are many User Agent SDKs out there that don’t allow the developer to set the Accept header. This post shows how the sample introduced in the A More Complex Sample post uses the Resources Over MVC (ROM) assembly to create a RESTful web service (developed using ASP.Net MVC) to allow less sophisticated User Agents to specify the format they want. As ever… its just one line of code!
More...
e99d91a1-3f6f-41b7-acf9-5a36d0a7608c|0|.0
November 6, 2011 01:22 by
Admin
The previous Bare Minimum posts showed how to use the Resources Over MVC (ROM) assembly to add some RESTful features to a web site developed using ASP.Net MVC. This post introduces a second sample project that will be used in future posts to demonstrates the other functionality available within ROM.
More...
a0d885be-4337-48bc-8d58-1f6cfd25adb9|0|.0
October 31, 2011 21:29 by
Admin
Bare Minimum Part 1 of this series showed how to add a read only web service to an ASP.Net MVC web site with one line of code. In this post we’ll add a second line of code to give us a web service that can receive data.
More...
824aeb52-36e9-4a6e-9d3c-879da6aa0ee4|0|.0
October 31, 2011 21:00 by
Admin
This series of posts is introducing the features in the ROM code. If you haven’t been there already, take a look at the introduction and perhaps download the source from CodePlex. The absolute minimum you need to get going with Resources Over MVC (ROM) is an existing ASP.Net MVC web site, a reference to the ROM assembly (via NuGet) and a single line of code.
More...
1426c542-f9b6-420e-9eaf-2e063a78bc58|0|.0
October 31, 2011 20:51 by
admin
Over the last couple of years I have been blogging about using writing a RESTful web service using ASP.Net MVC. I’ve decided to put this code onto CodePlex and publish it via NuGet. Over the next few days I’ll publish a number of posts in which I’ll take you through creating a basic web service using the Resources Over MVC (ROM) assembly.
More...
72412ffe-f452-4d56-8d91-828c8309d5f6|0|.0
February 7, 2011 22:23 by
admin
Recently MVC 3 was released which is a good reason for me to update our RESTful web service framework. This latest version is compiled against ASP.Net MVC 3 and .Net 4. I have also taken the opportunity to introduce some new features that have either been requested or come out of actual implementations.
More...
9596c6c1-2a2b-4414-aeb8-a8dca2d44fbb|2|5.0
June 6, 2010 00:04 by
admin
Joel Feaster emailed to say he was having trouble with the Accept header handling of the web service. When he used jQuery’s getJSON method it would use the following Accept header:
application/json, text/javascript, */*
You’ll notice there are no q parameters in that header, so according to the HTTP 1.1 specification, they should all be treated as having a q value of 1. However, the specification does not dictate which format should take precedence when all acceptable formats have the same q value. But looking at that header and knowing it comes from a method named getJSON, you might hope the web service would pick application/json.
More...
d95688cb-b9d9-4102-8485-3b138d8ab091|2|4.0