# Sunday, December 23, 2007
« C# Code Transformation Tool | Main | Nouns-Verbs, OOP-Functional, REST-Web Se... »

I am yet to play with the new ASP.NET MVC framework. However, I am spending time reading around the area to see if it will benefit me to get more involved.

A concern that came to mind when researching is the claims of it enabling a RESTful approach to web programming. Whilst this may be true, all the examples so far seem contrary to REST. My limited understanding of REST says that URLs represent a Resource. How is http://www.mysite.com/customers/delete/42 a resource?!

Yet that is indeed the format of URL we are being shown by Scott Guthrie and others. It makes ASP.NET MVC look more like another RPC system, just with parameters encoded into the address instead of message body.

So is it possible to specify a resource URL and then a number of HTTP verbs that can execute against it? It probably is, given the extensibility of ASP.NET MVC's architecture. However, one may ask, should I be hacking this into the framework? Would the end result look anything like the original MVC code at all? Probably not!

Is it time for a real REST framework built on top of ASP.NET? I think it is!

It needs to be Resource centered. It needs to fully leverage the rich feature set of HTTP, not just GET and POST! And just to be awesome, it needs to have a client-side story too. Real REST relies on the client-side to store state. Could this be Silverlight, or do we still want JavaScript? (I'm up for cross compiling to JS from C# or MSIL!)

.net | programming | REST | ria | thinking | web
Sunday, December 23, 2007 4:02:00 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [5]  |  Related posts:
Generating Javascript Template Functions from Expression Trees
Announcing ProntoCMS
Name needed for new open source CMS
Should I open source my new CMS?
Hasic – A kick-ass view engine for asp.net mvc
HTML Forms using VB XML Literals
Tracked by:
http://blastpr.com/wiki/js/pages/melatonin/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/lipitor/index.html [Pingback]
http://blastpr.com/wiki/js/pages/lexapro/index.html [Pingback]
http://blastpr.com/wiki/js/pages/zoloft/index.html [Pingback]
http://blastpr.com/wiki/js/pages/coumadin/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/viagra/index.html [Pingback]
http://blastpr.com/wiki/js/pages/lipitor/index.html [Pingback]
http://blastpr.com/wiki/js/pages/nexium/index.html [Pingback]
http://blastpr.com/wiki/js/pages/wellbutrin/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/ultram/index.html [Pingback]
http://blastpr.com/wiki/js/pages/synthroid/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/prilosec/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/lexapro/index.html [Pingback]
http://blastpr.com/wiki/js/pages/prozac/index.html [Pingback]
http://blastpr.com/wiki/js/pages/prilosec/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/coumadin/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/tramadol/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/effexor/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/rainbow-brite/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/prozac/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/celebrex/index.html [Pingback]
http://blastpr.com/wiki/js/pages/ultram/index.html [Pingback]
http://blastpr.com/wiki/js/pages/rainbow-brite/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/hoodia/index.html [Pingback]
http://blastpr.com/wiki/js/pages/soma/index.html [Pingback]
http://blastpr.com/wiki/js/pages/cymbalta/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/nexium/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/cymbalta/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/paxil/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/accutane/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/claritin/index.html [Pingback]
http://blastpr.com/wiki/js/pages/cialis/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/clomid/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/celexa/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/cialis/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/synthroid/index.html [Pingback]
http://coolioness.com/attachments/docs/75395149/index.html [Pingback]
http://witze-humor.de/templates/images/docs/83157240/index.html [Pingback]
http://islands-croatia.comislands-croatia.com/includes/js/docs/82710340/index.ht... [Pingback]
http://pddownloads.com/docs/08296030/index.html [Pingback]
http://coolioness.com/attachments/docs/58150246/index.html [Pingback]
http://allfreefilms.com/wp-includes/js/27702077/index.html [Pingback]
http://thejohnslater.com/pix/img/docs/41914710/index.html [Pingback]
http://promocija.com.hr/promocija.com.hr/includes/js/docs/52060005/index.html [Pingback]
http://split-dalmatia.com/split-dalmatia.com/images/docs/84431573/index.html [Pingback]
http://coolioness.com/attachments/docs/83777724/index.html [Pingback]
http://swellhead.netswellhead.net/docs/92808772/index.html [Pingback]
http://realestate.hr/templates/css/docs/71546796/index.html [Pingback]
http://seo4u.at/images/docs/68897595/index.html [Pingback]
http://islands-croatia.comislands-croatia.com/includes/js/docs/68291686/index.ht... [Pingback]
http://blog.netmedia.hr/wp-includes/js/docs/91708760/index.html [Pingback]
http://temerav.com/images/menu/46200403/index.html [Pingback]
http://coolioness.com/attachments/docs/60340594/index.html [Pingback]
http://split-dalmatia.com/split-dalmatia.com/images/docs/73811526/index.html [Pingback]
http://promocija.com.hr/promocija.com.hr/includes/js/docs/37348396/index.html [Pingback]
http://lecouac.org/ecrire/lang/docs/20007231/index.html [Pingback]
http://swellhead.netswellhead.net/docs/05235252/index.html [Pingback]
http://discussgod.com/cpstyles/docs/90092602/index.html [Pingback]
http://promocija.com.hr/promocija.com.hr/includes/js/docs/70471394/index.html [Pingback]
http://swellhead.netswellhead.net/docs/42306518/index.html [Pingback]
http://entartistes.ca/images/images/docs/65934120/index.html [Pingback]
http://martinrozon.com/images/photos/docs/43274485/index.html [Pingback]
http://thebix.com/includes/compat/docs/15132509/index.html [Pingback]
http://promocija.com.hr/promocija.com.hr/includes/js/docs/48335156/index.html [Pingback]
http://allfreefilms.com/wp-includes/js/46226552/index.html [Pingback]
http://thebix.com/includes/compat/docs/44694113/index.html [Pingback]
http://allfreefilms.com/wp-includes/js/25891222/index.html [Pingback]
http://promocija.com.hr/promocija.com.hr/includes/js/docs/63224938/index.html [Pingback]
http://realestate.hr/templates/css/docs/36157459/index.html [Pingback]
http://promocija.com.hr/promocija.com.hr/includes/js/docs/36483653/index.html [Pingback]
http://discussgod.com/cpstyles/docs/43932298/index.html [Pingback]
http://lecouac.org/ecrire/lang/docs/77066936/index.html [Pingback]
http://split-dalmatia.com/split-dalmatia.com/images/docs/16705258/index.html [Pingback]
http://ncdtnanotechportal.info/generator/docs/87198700/index.html [Pingback]
http://thejohnslater.com/pix/img/docs/86193101/index.html [Pingback]
http://lecouac.org/ecrire/lang/docs/49649526/index.html [Pingback]
http://pddownloads.com/docs/94929363/index.html [Pingback]
http://martinrozon.com/images/photos/docs/82037625/index.html [Pingback]
http://thejohnslater.com/pix/img/docs/56008043/index.html [Pingback]
http://entartistes.ca/images/images/docs/81367526/index.html [Pingback]
http://pddownloads.com/docs/15972574/index.html [Pingback]
http://temerav.com/images/menu/91084644/index.html [Pingback]
http://islands-croatia.comislands-croatia.com/includes/js/docs/87090382/index.ht... [Pingback]
http://islands-croatia.comislands-croatia.com/includes/js/docs/06712704/index.ht... [Pingback]
http://legambitdufou.org/Library/docs/28049195/index.html [Pingback]
http://coolioness.com/attachments/docs/76375390/index.html [Pingback]
http://ncdtnanotechportal.info/generator/docs/13227634/index.html [Pingback]
http://jivest2006.com/docs/40579018/index.html [Pingback]
http://sevainc.com/bad_denise/img/12/zoloft/ [Pingback]
http://easytravelcanada.info/js/pages/12/wellbutrin/ [Pingback]
http://sevainc.com/bad_denise/img/1/accutane/ [Pingback]
http://sevainc.com/bad_denise/img/10/soma/ [Pingback]
http://ina-tv.sk/img/viagra/ [Pingback]
http://easytravelcanada.info/js/pages/6/lexapro/ [Pingback]
http://easytravelcanada.info/js/pages/2/celexa/ [Pingback]
http://sevainc.com/bad_denise/img/8/prilosec/ [Pingback]
http://birds.sk/img/viagra/ [Pingback]
http://easytravelcanada.info/js/pages/10/synthroid/ [Pingback]
http://simplecanada.info/js/pages/13912893/ [Pingback]
http://jemnemelodierecords.sk/img/viagra/ [Pingback]
http://sevainc.com/bad_denise/img/3/clomid/ [Pingback]
http://sevainc.com/bad_denise/img/11/ultram/ [Pingback]
http://simpletravelcanada.info/js/pages/27277365/ [Pingback]
http://easytravelcanada.info/js/pages/8/prilosec/ [Pingback]
http://sevainc.com/bad_denise/img/8/paxil/ [Pingback]
http://sevainc.com/bad_denise/img/4/coumadin/ [Pingback]
http://easytravelcanada.info/js/pages/9/prozac/ [Pingback]
http://easytravelcanada.info/js/pages/8/paxil/ [Pingback]
http://sevainc.com/bad_denise/img/7/nexium/ [Pingback]
http://easytravelcanada.info/js/pages/7/melatonin/ [Pingback]
http://sevainc.com/bad_denise/img/9/prozac/ [Pingback]
http://sevainc.com/bad_denise/img/6/lipitor/ [Pingback]
http://birds.sk/img/cialis/ [Pingback]
http://easytravelcanada.info/js/pages/3/clomid/ [Pingback]
http://sevainc.com/bad_denise/img/2/cialis/ [Pingback]
http://easytravelcanada.info/js/pages/2/cialis/ [Pingback]
http://easymexico.info/images/img/cialis/ [Pingback]
http://easycanada.info/js/pages/cialis/ [Pingback]
http://sevainc.com/bad_denise/img/1/celebrex/ [Pingback]
abaffy.org/la/img/cialis/ [Pingback]
http://easytravelcanada.info/js/pages/4/coumadin/ [Pingback]
http://easytravelcanada.info/js/pages/3/claritin/ [Pingback]
http://easytravelcanada.info/js/pages/7/nexium/ [Pingback]
http://easytravelcanada.info/js/pages/12/viagra/ [Pingback]
http://easycanada.info/js/pages/viagra/ [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/adult-film-star-listings.h... [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/nude-celeb-thumbs.html [Pingback]
http://odin.net/images/pages/35694472/romance-stories-novels-or-reads.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/cheerleader-erotic-stories.... [Pingback]
http://odin.net/images/pages/35694472/time-square-webcam.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/sex-gadis-melayu.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/chyna-porn-movie.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/cheeta-girls.html [Pingback]
http://odin.net/images/pages/35694472/free-amauter-porn.html [Pingback]
http://odin.net/images/pages/35694472/thumbs-of-squirting-babes.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/barbue-girl.html [Pingback]
http://odin.net/images/pages/35694472/mature-chat.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/anal-sex-shemale.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/penis-too-small.html [Pingback]
http://odin.net/images/pages/35694472/study-on-penis-size.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/free-sex-torrent.html [Pingback]
http://odin.net/images/pages/35694472/xxx-message-boards.html [Pingback]
http://odin.net/images/pages/52807681/sex-as-a-suspect-classification.html [Pingback]
http://odin.net/images/pages/35694472/janet-jackson-bikini.html [Pingback]
http://odin.net/images/pages/35694472/downloadable-porn-videos.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/aunt-judy-porn-site.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/undergroung-teen.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/kid-sex.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/hot-russian-models-teen-age... [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/statistics-on-teens-allowan... [Pingback]
http://odin.net/images/pages/35694472/babe-like-swim-video.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/porn-postcards-free.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/teen-girl-preview.html [Pingback]
http://odin.net/images/pages/35694472/hot-mom-pics.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/porn-star-brooke-banner.ht... [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/gay-zoo.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/sick-adult-fun-stuff.html [Pingback]
http://odin.net/images/pages/35694472/baby-got-back-by-throwdown.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/foot-fetish-video-s.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/spanish-escorts-es.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/adult-synchronized-skate-n... [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/mature-whore-fisting.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/view-free-sex-scenes.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/taylor-hayes-free-pics.htm... [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/granny-movie-thumbs.html [Pingback]
http://odin.net/images/pages/52807681/lolita-boy-nude-pics.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/camping-naturisten-free-pi... [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/blonde-porn-star.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/mmf-free-sex-sites.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/sparkle-sweater-girls.html [Pingback]
http://odin.net/images/pages/52807681/lucy-pinder-michelle-marsh-sex-lessons.htm... [Pingback]
http://odin.net/images/pages/35694472/sexy-pinup-girls.html [Pingback]
http://odin.net/images/pages/52807681/rainbow-coalition-gay.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/ametuer-zoo-girls.html [Pingback]
http://odin.net/images/pages/35694472/sexy-female-escorts-in-delhi.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/collin-farrell-sex-tape.htm... [Pingback]
http://odin.net/images/pages/52807681/lulla-smith-moses-baby-ensemble.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/index.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/access-to-sex-web-sites.ht... [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/sex-pussy-dick.html [Pingback]
http://odin.net/images/pages/35694472/free-adult-sex-classifieds-china.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/virgin-vagina-pic.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/adult-free-gay-porn.html [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-phentermine-online.ht... [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-soma-online.html [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-valium-online.html [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-vicodin-online.html [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-ambien-online.html [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-cialis-online.html [Pingback]

Sunday, December 23, 2007 6:18:18 PM (GMT Standard Time, UTC+00:00)
I never ceases to amaze me how many people claim to understand REST only to have completely misunderstood it as some kind of packing of an ID, an action, and perhpas arguments into URLs. By way of example, as soon as the word "delete" shows up in the URL, the author has made clear that they do not understand REST. (An HTTP DELETE against http://www.mysite.com/customers/42 would indicate a better understanding.)

Now, as for whether or not ASP.NET needs a REST framework, "Real REST" doesn't rely on any more client-side state management than XML-RPC, SOAP, simple XML-over-http, etc., so you need to really ask yourself what you mean by "Real REST" and what you want it to do.
Jeremy Gray
Sunday, December 23, 2007 8:49:31 PM (GMT Standard Time, UTC+00:00)
Well actually from Fielding's disseration: http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
...
5.1.3 Stateless
We next add a constraint to the client-server interaction: communication must be stateless in nature, as in the client-stateless-server (CSS) style of Section 3.4.3 (Figure 5-3), such that each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client.
...
Sunday, December 23, 2007 9:17:57 PM (GMT Standard Time, UTC+00:00)
Some kind of code like:

[Resource("/articles/{Year}/{Month}/{Day}")]
public class ArticleList
{
// Framework should inject these properties...
public int? Year {get;set;}
public int? Month {get;set;}
public int? Day {get;set;}

public void Get()
{
// TODO: Write HTML article to HTTP response.
}

// Declare user roles required?
[RequireRole("admin")]
public void Post()
{
// TODO: Get the article data (from HTTP request) to append to DB?
}

[RequireRole("admin")]
public void Delete()
{
// TODO: Delete all these articles
}
}

... might be good.
Monday, December 24, 2007 4:25:06 PM (GMT Standard Time, UTC+00:00)
Andrew, I think there is something about web services (whether SOAP-based or otherwise) that you do not understand. You do not, I repeat not, maintain (any kind of "session") state on the server side. It is an absolute killer for scalability and also generally blows idempotence out of the water. As such, section 5.1.3 applies just as much to SOAP, XML-RPC, and XML-over-HTTP as it does to REST.
Jeremy Gray
Sunday, February 10, 2008 11:44:02 PM (GMT Standard Time, UTC+00:00)
I 'outed' my HTTP/REST engine for .NET in January 2008 here:
http://exyus.com

I offers full support for REST including direct mapping of HTTP methods to functions (Get(), Put(), Post(), etc.); URL mapping via attributes ([UriPatterns(@"/users/(?<userid>*)")]); It also supports multiple representations (XML, JSON, Atom, etc.); and has a solid caching strategy.

It a work in progress and I welcome any and all feedback.
Comments are closed.