background preloader

Web API

Facebook Twitter

ASP.NET Frameworks and Raw Throughput Performance. A few days ago I had a curious thought: With all these different technologies that the ASP.NET stack has to offer, what's the fastest technology overall to return raw data for a server request? When I started this it was mere curiosity rather than a real practical need or result. Different tools are used for different problems and so performance differences are to be expected. But still I was curious to see how the various technologies performed relative to each orher just for raw throughput of the request getting to the endpoint and back out to the client with as little processing in the actual endpoint logic as possible (aka Hello World). I want to clarify that this is merely an informal test for my own curiosity and I'm sharing the results and process here because I thought it was interesting.

Source Code on GitHub I looked at these technologies: It's quite a mixed bag, of course and the technologies target different types of development. First test: Raw Throughput Http Handler WebForms. Where does ASP.NET Web API Fit? With the pending release of ASP.NET MVC 4 and the new ASP.NET Web API, there has been a lot of discussion of where the new Web API technology fits in the ASP.NET Web stack. There are a lot of choices to build HTTP based applications available now on the stack - we've come a long way from when WebForms and Http Handlers/Modules where the only real options. Today we have WebForms, MVC, ASP.NET Web Pages, ASP.NET AJAX, WCF REST and now Web API as well as the core ASP.NET runtime to choose to build HTTP content with.

Web API definitely squarely addresses the 'API' aspect - building consumable services - rather than HTML content, but even to that end there are a lot of choices you have today. So where does Web API fit, and when doesn't it? But before we get into that discussion, let's talk about what a Web API is and why we should care. What's a Web API? These mobile or rich Web applications use their HTTP connection to return data rather than HTML markup in the form of JSON or XML typically.

ProgrammableWeb - Mashups, APIs, and the Web as Platform. Microsoft Web API – the REST is done by WCF (Part 1) Postings published on this series so far: (c) geek&poke When speaking of SOA today, many developers still think about Web Services (which in case of .NET are ASP.NET Web Services or Windows Communication Foundation, briefly WCF) handling SOAP using XML and other standards to enable Remote Procedure Calls (read: calling functions on remote computers). As remote computers may be part of foreign domains or even available on the internet the need for authentication and authorization came up fast and has been satisfied by introducing the WS-Security extension to SOAP.

Another need of course has been to have reliable messaging which lead to another extension called WS-Reliability. In order to be able to describe schemas of SOAP messages WSDL had been introduced. As you can see, there is a great effort to exchange data between two endpoints on the network. And even worse: the list of extensions and format definitions is by far not complete, not to mention the problems arising in the wild. Web API Scaffolding. WCF Community Site. Announcement: WCF Web API is now ASP.NET Web API! ASP.NET Web API released with ASP.NET MVC 4 Beta. The WCF Web API and WCF support for jQuery content on this site wll removed by the end of 2012. What is WCF Web API? Applications are continually evolving to expose their functionality over the web for example social services like Flickr, Twitter and Facebook.

Aside from social applications, organizations are also looking to surface their core enterprise business functionality to an ever expanding array of client platforms. WCF Web API allows developers to expose their applications, data and services to the web directly over HTTP. This allows developers to fully harness the richness of the HTTP as an application layer protocol. Click here to access our FAQ.

Quick Start Getting Started: Building a simple Web API Architecture overview Below is a high level diagram of the WCF Web API architecture Listener – This component listens over HTTP and accepts an incoming HTTP message. Features.