I’ve been working on building a RESTful web service with ColdFusion lately and there isn’t much information out there. Lots of people talk about consuming them but few people are talking about how to build them. I’m not yet ready to share what I’ve learned (especially the insight from Kevin J. Miller) as I’m in process but I did want to toss out a neat application by Brian Carr on RIAForge that Kevin pointed me at: PowerNap.
PowerNap is a framework for building RESTful web services. I read through the docs and it appears to do nearly everything the 0.9 version of my API does. The only thing I’m not sure about yet is content-type negotiation which I find preferable to specifying the return type in the URL. Regardless, this looks like an excellent way to toss up a REST API and it takes advantage of my other favorite tool, Coldspring.
Well worth a read… in the mean time I’ll get to chronicling my development process.
Brett said:
on November 25, 2008 at 10:51 am
Hey Brian -
I gave a presenation on building RESTful CF applications at the NYCFUG this summer, the resources are posted here if you want to check it out:
http://www.nycfug.com/meetings/2008-06-10-Brett-On-RESTful-Web-Services.cfm
I have a slide or two in there on content type negotiation… We use a URL parameter to specify the content type since we have not been able to not rely on the clients to implement the accepts header consistantly. Ideally though, the URL parameter would be used as an optional override to the HTTP header to provide support to clients that are not using Accepts correctly.
Looking forward to seeing your follow up posts, I’m a huge REST fan. Lots of good info over at http://www.subbu.org/ too if you haven’t seen it.
cheers,
.brett
Ben Nadel said:
on December 12, 2008 at 7:17 am
Brett’s presentation was awesome (I know this is an old post but it just started showing up on CFBloggers). I thought I had an understanding of what REST was… I was waaaay wrong