« one trillion words from public Web pages | Main | links for 2006-08-04 »

Where are all the REST toolkits?*

Aaron Johnson: "Version 2.2 of WebWork introduced the ActionMapper interface and a class called RestfulActionMapper, which gives you the ability to create URLs that might look something like this: http://bookstore.com/books/category/java/keyword/webwork"

* I remember Pat Lightbody asking this a few years back; Pat works on WebWork :) RestfulActionMapper is very cool if you don't get hung up on parameter ordering. For example, JIRA 4 might be able to stop using .jspa extensions and have cacheable ticket queries and Confluence's feedbuilder could use this to produce clean URLs.



August 3, 2006 11:36 PM

Comments

Patrick Lightbody
(August 3, 2006 11:51 PM #)

Yup - they never really materialized. And what I was saying back then I still think is true: REST won't really take off until there are nice frameworks to make it happen.

By the way, the RestfulActionMapper is OK, but I've got an even nicer action mapper (and convention-based configuration) I've been using for HostedQA. It was inspired by that action mapper but does a tiny bit more.

I hope to opensource it soon.

Adam Rosien
(August 4, 2006 02:00 AM #)

Any thoughts on http://www.restlet.org ?

Ian Bicking
(August 4, 2006 05:52 AM #)

Why does the URL matter? Isn't it the thing on the other side of the URL that matters? It's also unclear to me what's wrong with /books?category=java&keyword=webwork -- creating a fake hierarchy is not a big improvement on anything.

There's more interesting questions, I think. Like, are they publishing resources? Do they support ETags and other HTTP features that are often forgotten in frameworks? Does that kind of support extend into authentication and internal caching? There's lots of room for more framework support, but this URL mapping support is only the most shallow aspect of that IMHO.

Bill de hOra
(August 5, 2006 07:04 PM #)

"REST won't really take off until there are nice frameworks to make it happen."

Pat, most frameworks need to stop doing things to become REST toolkits. If anything it's the thinking behind the feature I'm responding to - the WW guys *get it*.

There are some nice frameworks out there - WW2 is one of them. The problem with other frameworks I've seen is they think the Web is something you ought to be hiding from me so I can pretend I'm writing a desktop MVC GUI based on design patterns written before the web ever existed. That's just a nutso situation. Instead of letting me give things nice names, they give me controller proxies. Instead of letting me scale via a clean systems design they give me cookie and in-memory sessions from day one. They make me put needless patterns in my URLs so can they dispatch (servlets suck or used to suck, on that point). They make me put db operations in the URL (rails sucks on that point, I hear they're sorting it out). The don't let me distinguish easily between GET and POST (servlets are great there, but jeez, doService() realy needs to go). They don't default obey ladders for things like locale negotiation and get me to put it in a language cookie instead.

Bill de hOra
(August 5, 2006 07:17 PM #)

"Why does the URL matter?"

URLs are part of the architecture.

"creating a fake hierarchy is not a big improvement on anything"

It's not a hierarchy, it's a name. A nice name. One that will cache with no effort. No-one's expecting to be able to traverse up that URL. URLs with query strings are not really names, they're arguments to proxy. It's like not being able to talk to someone without going through their manager first.

We haven't talked about verbs in names here tho'.

"There's more interesting questions, I think. Like, are they publishing resources? Do they support ETags and other HTTP features that are often forgotten in frameworks?"

Agreed.

"but this URL mapping support is only the most shallow aspect of that IMHO."

Disagree. URLs are bread and butter stuff. Unless the basics are down, stuff like ETags are beside the point.

Good naming is a core competency of a web framework. A framework that bases naming on query strings first and foremost, fundamentally concerns me. How things are accessed and named tells me a lot about the framework, probably more than anything else on first glance. It tells me a lot about the tradeoffs that are being made and what the framework designers regard as important.


assaf
(August 20, 2006 11:00 PM #)

URLs are for one piece of software to access another, hence the "thou shalt be opaque".

The address bar is for people to access the service. They deal with usability.

When you write software you may care more about the people using it, or the code running it. Those are two different design aesthetics. I have more faith in software that place people first.

Post a comment

(you may use HTML tags for style)




Remember Me?

Trackback Pings

TrackBack URL for this entry:
http://www.dehora.net/mt/mt-tb.cgi/1939