Freigeben über


How to build a REST app in .NET (not)

This post by Jack Altiere describes how to build a REST API in .NET.   This spurred a respose...  

Firstly, I think really he is talking about a REST interface, not an API. REST is all about the interface.  Maybe I am splitting hairs here, but I think it is important to be careful about terminology. 

My main respoinse is this - use .NET 3.5 and the REST capabilities included as part of Windows Communication Foundation.  I respect the enthusiasm in the blog post, but the thing is, most devs don't want just a REST interface.  They want a service, and they want it to be accessible in various ways. REST is one of those ways.  They want it to be easy to handle parameters.  They want auditing and logging.  They want an easy way to map URIs to methods.  The .NET Framework v3.5, released in November 2007, gives developers those capabilities.   Sure, you can roll your own  REST Framework for .NET, but why would you?

-D

Comments

  • Anonymous
    March 18, 2008
    Can you point to an example of how to use .NET 3.5 (WCF I assume?) that looks as "good" as REST? Something that returns XML in a not-hard-to-parse-in-js way? Something that returns something with the content-type text/html or image/png?

  • Anonymous
    March 20, 2008
    My prior post talked about how NOT to write a REST app in .NET. I mentioned WCF As the preferred option.

  • Anonymous
    March 20, 2008
    Shahar, check out this post; http://blogs.msdn.com/dotnetinterop/archive/2008/03/20/how-to-build-a-rest-app-in-net-with-wcf.aspx