Infovark Underground

  • news
    • infoblog
    • underground
  • product
  • download
  • buy
  • support
  • about
    • ← Firebird 2.1 Released
    • Fighting the Framework →

    Using WCF for REST, Part 1

    22 Apr 2008 by Dean in .NET, REST, WCF, Web Services / 5 Comments

    Just because you can do something doesn’t mean it’s a good idea.

    We decided to use the Windows Communication Foundation to drive our REST-based web service. In hindsight, it was a poor choice. REST support in WCF seems like it was a last-minute addition to .NET 3.5. You can certainly hack something together, but I’ve found few real-world examples on the Internet, and most of those sidestep the tricky issues.

    Here’s the short of it: WCF was designed for RPC-SOAP. More importantly, it was designed to SOA-enable legacy services that used older communications channels like DCOM. If you’re starting from scratch, and have full control over the output of your web service and the design of your object model, I’d recommend using a different (and simpler) framework.

    We’ve gotten a good bit of blog traffic from people looking for help with Windows Communication Foundation and the REST architectural pattern. (It’s good to know that we’re not the only ones needing advice.) Here are the better sources we’ve found so far.

    Windows Communication Foundation documentation on MSDN

    Good overview presentation on REST and Syndication using WCF

    Microsoft’s Picture Services Sample

    Justin Smith’s WCF articles on Cybertopian Chronicles

    Nicholas Allen’s Indigo blog

    Steve Maine’s blog

    Assorted posts on Rick Strahl’s blog

    That Indigo Girl

    If you find other useful places to look, let us know!

    Related posts

    1. Using WCF for REST, Part 2
    2. Using WCF for REST, Part 3
    3. Put the “Web” Back in Web Services
    4. WCF Instance Context
    5. REST: How to respond to an HTTP POST
    • Tweet

    5 Comments

    • Alex Henderson

      I found the RestChess example from Mix this year a great resource for actually building a Restful API with WCF that handles OAuth / HiLo etc. (i.e. the trickier aspects)

      http://sessions.visitmix.com/?selectedSearch=T01
      http://www.restchess.com/

      Found your article on “WCF, WebHttp Binding, and Authentication” particularly handy, that little tid bit isn’t well documented elsewhere.

      02 May 2008 12:05 am
      Reply
      • Vish

        Hi

        I work on the WCF team in Microsoft and would love to know of the areas we could improve the framework to support REST.

        It would be fantastic if you could send me a mail describing the pain points and the areas we could improve.

        Thanks!
        Vish

        10 May 2008 09:05 pm
        Reply
        • Dean

          I’ll do that, Vish. I think most of my trouble stems from not having a solid background in the Indigo technology. I think of REST as the “simple case” for web services, while WCF views the WS-* stack as the default scenario. I’ll document my thoughts here and send you a copy as well.

          12 May 2008 02:05 pm
          Reply
          • Using WCF for REST, Part 2 « Infovark Underground

            [...] part one of this series, I listed several websites and blogs that had useful information on the Window [...]

            • Rinsing the SOAP from WCF (or, RESTful WCF Hyperlink Acupuncture) | The Freak Parade

              [...] Using WCF for REST, Part 1, Part2 and Part 3. Make sure you read all the comments though, several of the gripes brought up in these posts have been addressed with SP1. [...]

              Leave a Comment

              Posting your comment...

              Subscribe to these comments via email

              • Categories

                • .NET (41)
                • AJAX (3)
                • Books (7)
                • HTML (9)
                • Infovark (8)
                • Programming (48)
                • REST (11)
                • SQL (3)
                • Testing (3)
                • Tools (13)
                • UI (3)
                • WCF (11)
                • Web Services (8)
                • WPF (4)
                • XML (4)
              • Archives

              • Get future articles


                 

              • Blogroll

                • Ajaxian
                • Anne Van Kesteren
                • Brain.Save()
                • Coding Horror
                • Eric Sink
                • Joel Spolsky
                • John Resig
                • Mark Pilgrim
                • Raymond Chen
                • Scott Hansleman
                • Secret Geek
                • Steve Yegge
                • The Daily WTF
                • The Database Programmer
              • Meta

                • Log in
                • Entries RSS
                • Comments RSS
                • WordPress.org
            • Site map

              • News
              • Product
              • Download
              • Buy
              • Support
              • About
            • Recent Posts

              • Review: Brownfield Application Development in .NET
              • Using Modal Dialogs with a Splash Screen in WPF
              • Highlighting query terms in a WPF TextBlock
              • Getting XAML Hyperlink text to wrap
              • How to format the XAML Hyperlink NavigateUri
            • Twitter

              Copyright 2011 Infovark, Inc. All rights reserved.