Leverage T4Scaffolding for WCF Web API
MvcScaffolding is a tremendous productivity improvement for MVC developers. Earlier this year, Steve Sanderson posted the definitive 7-part series on MvcScaffolding which is a must-read for anyone serious about doing scaffolding. The best part about the scaffolding infrastructure is that MvcScaffolding is actually built on top of another package called T4Scaffolding. T4Scaffolding can be used as the basis for *any* scaffolding – not just MVC projects. To that end, we can enjoy the same power of MvcScaffolding ......
Posted On Thursday, July 14, 2011 11:22 PM | Comments (20)
Documenting Link Relations with Web API
In a previous post, I talked about how to build your own custom Media Type Formatter with the WCF Web API. In this post, I used HAL as the media type to expose an API for Nerd Dinner. There are a core set of guiding principles to building RESTful services and one of those principles is that documentation efforts for a service should be focused on defining the media type(s) and link relations that the service uses. While it’s important to have a consistent pattern for URI design, it’s really not that ......
Posted On Monday, June 6, 2011 8:32 PM | Comments (2)
Understanding Custom WCF Web API Media Type Formatters on Both Server and Client
Media Type Formatters in the WCF Web API provide a way for the consumer of your service to not only specify the format they want for their response, but also specify the format they are using on their request. Typically the desired response format is specified in the “Accept” request header and the request body format is specified in the “Content-Type” request header. Media types are central to building any RESTful service. Two of the most common media types are “application/xml” and “application/json”. ......
Posted On Monday, June 6, 2011 12:19 AM | Comments (3)
WCF Web API is Pure Simplicity with NuGet
Last week at MIX11, Preview 4 of WCF Web API was released. If you missed it, you can watch the video here. One way to get Preview 4 and start playing with it is to download it here. However, an even easier way to to just grab the bits from NuGet: When you download the latest Web API bits, there are a couple of sample applications that show off the latest features of the Web API (these are in the CodePlex download, not the NuGet packages). The first one is a Contact Manager “Simple” project which ......
Posted On Thursday, April 21, 2011 2:49 AM | Comments (6)
Use a Fake Http Channel to Unit Test with HttpClient
Applications get data from lots of different sources. The most common is to get data from a database or a web service. Typically, we encapsulate calls to a database in a Repository object and we create some sort of IRepository interface as an abstraction to decouple between layers and enable easier unit testing by leveraging faking and mocking. This works great for database interaction. However, when consuming a RESTful web service, this is is not always the best approach. The WCF Web APIs that are ......
Posted On Wednesday, February 16, 2011 12:26 AM | Comments (4)
WCF REST Services Inside MVC Projects
Recently I blogged about WCF REST services with no svc file and no config. In this post I also discussed the pros/cons of WCF services as compared to using MVC controller actions for web services and I made the case that, in many instances, WCF REST services is better than using the MVC infrastructure because WCF provides: a more RESTful API with less work a convenient automatic help page to assist consumers of your service automatic format selection (i.e., xml/json) depending on HTTP headers In ......
Posted On Wednesday, September 22, 2010 10:55 PM | Comments (7)

View Steve Michelotti's profile on LinkedIn

profile for Steve Michelotti at Stack Overflow, Q&A for professional and enthusiast programmers

Google My Blog

Tag Cloud