Book Review – RESTful .NET

Since we are using REST on top of WCF on my current project I was glad to see that this book had been written as I was hoping it would answer some questions I had.

However my first issue with this book was the title. As I say we’re using WCF but WCF isn’t the only way to implement REST in .NET, however the book does not take the time to evaluate alternatives (including building RESTful applications on top of ASP.NET MVC) so RESTful WCF would have been a more accurate title.

In fact if we wanted to truly represent the books focus I think we would call it WCF REST because the primary focus is on WCF. There was a lot of WCF detail in here, starting from chapter 2, and personally I found some if quite boring especially where the author has chosen to put in property listings of some key WCF classes. I just don’t find that sort of content all that useful and I’d have expected a lot of it to be in an appendix at best.

However the WCF focus has some other implications. Take HATEOS which is an important part of REST, my company has been lucky enough to have Sebastien Lambla and Alan Dean in our office and both emphasized its importance. However there is almost no discussion of it in the book, and the reason for this becomes clear on page 246 where the author states that although hypermedia is important in REST it isn’t covered in the book because WCF has poor support for it. As I say we’re using WCF so I knew that WCF’s support for links in normal representations was non-existent, but I do consider it a flaw of the book and in my view the author would have been better stating this big problem up-front or tried to add framework to make linking a lot easier (something Seb did for us).

Strangely the author actually states that he actually avoids discussing custom infrastructure code because it takes away from learning about the technology (page 97). Personally I would prefer the book if had a focus on REST and how to get the advantages of REST using WCF, low level WCF plumbing/architecture is a necessary evil not something I want to read much about and more importantly if we need extra framework then I’d like to see it discussed.

I also thought it was doubly odd that chapter 9 discussed “Using Workflow to Deliver REST Services”, all centred around Windows Workflow, when to me when I see the words workflow in a REST book I’m again thinking of HATEOS (the RESTbucks example at InfoQ shows this approach brilliantly and will form part of a rival book).

Before wrapping up I also wanted to identify one bit of the book where the advice is very questionable. Chapter 10 is called “Consuming RESTful XML Services Using WCF” and one approach described is to take the interface attributed with ServiceContract and use it client side. Just to be clear we’re talking about making class like channel.CreateAuthority(authority) and then letting WCF work out what HTTP request to make. You won’t want to be doing that.

Anyway I personally wouldn’t recommend this to anyone wanting to learn about REST, instead I’d recommend (for now) RESTful Web Services. If however you are using WCF and REST, and feel you already understand REST, then this book will give you some insight into support for REST in WCF.

Related Articles:

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

This entry was posted in Books, REST, WCF. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

5 Responses to Book Review – RESTful .NET

  1. Have you picked up Effective REST Services via .NET: For .NET Framework 3.5? Do you think this book should be any good?

    http://www.amazon.com/Effective-REST-Services-via-NET/dp/0321613252/ref=sr_1_1?ie=UTF8&s=books&qid=1242019934&sr=8-1

  2. colinjack says:

    @Jan
    Nope I haven’t but looks worth a read. Luckily a lot of serious REST heads are working on books so hopefully the market should be filling up during the rest of the year.

  3. joey says:

    should add this review to amazon so other customers are aware.

  4. Chuck says:

    Not a fan of REST in WCF.

    “WCF’s support for links in normal representations was non-existent”
    “tried to add framework to make linking a lot easier (something Seb did for us)”

    Have you seen other frameworks that have better support for this?

  5. colinjack says:

    @Chuck
    Something like OpenRasta has first class support and I’d definitely recommend anyone have a look at it:

    http://trac.caffeine-it.com/openrasta

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>