When working on Mojo, one of the first things we did was to come to an agreement on the API that the application would use. I think we went in this direction early as we had always intended for the Mojo to be used as an 'widget' platform to access the Web21C SDK Services. I think it was a great move, and I'd certainly recommend this, even if you don't intend your web app to have an API.
With modern REST based web apps, we tend to think about the URI a lot more along with what to POST or GET to that URI. There are no real rules, and as such - toolkits, to help the developer with building REST-friendly URIs, it's more of a mind set. I won't repeat those rules here, but it essentially boils down to cool URIs and being mindful of resources.
The part where can come stuck is thinking in terms of actions or methods, it's something we all have to get used to, but I truely believe that if you invest a little time to agree URI as contract, it'll save headaches later on.
Showing posts with label rest. Show all posts
Showing posts with label rest. Show all posts
Thursday, April 03, 2008
Thursday, May 31, 2007
Filter/Dispatcher pattern for URI handling in .Net
I put together an interesting component of an application recently. It didn't get used in the end, but I liked it none the less. Using the HttpModules in the web.config I was able to get it to act as a filter pattern, intercepting all web requests through the web server. Then using a custom configuration I was able to implement a dispatcher pattern to configurable classes. This resulted in a web site that could catch any requests and process regardless if that page actually existed. It's a nice way to think about implementing a REST friendly web site.
Subscribe to:
Posts (Atom)