Doing some research - found this great article: http://www.4guysfromrolla.com/articles/012710-1.aspx.
This hits on a problem I’ve been trying to address. Problem: developing a simple framework for doing REST based architectures in .Net. I’ve used HTTP Handlers with ashx files. This provides the simple approach but required you to handle all the routing (URL splitting).
With .Net 4, routing is handled by the System.Web.Routing. This allows a framework that provides routing for REST architectures while allowing the simple development of ASP.Net pages. Sure, MVC & WCF provide more… but the cost is complexity. If you need the extra features – go ahead and use them. For the problems I deal with, I’ll take the simple and easy (quick) to understand (and code) approach.
In a nutshell, the framework I’m working on is using ASP.NET Routing which allows a developer to define routing rules, which map a route pattern - such as
Categories/CategoryName - to a class that handles the request. My classes are handled in HTTP Handlers.
Download the code:
RoutingDemo40.zip (747.17 kb)