As he promised yesterday, Clemens describes his RESTful extensions to WCF/Indigo in a most enjoyable article on his weblog.

I really liked his detailed comparison of the HTTP and SOAP (as-practiced) dispatching models, as well as that of RPC vs. uniform operations. While there were a few little things I disagreed with, they weren’t significant enough to warrant mention, so I won’t.

Unfortunately, I’m not a big fan of his extensions.

I think the mapping he lays out there is reasonable in cases where you’ve already got legacy code with legacy interfaces which need binding to the Web, because you can just annotate those existing interfaces with these extensions. But when you’re developing new code, what purpose do service-specific interfaces serve? Nobody’s invoking them, since they’re just invoking the HTTP methods. So why are they there? I think that can only serve to hide the resource-centric REST model away from developers, and make other tasks more difficult; for example, dealing with resource collections.

I think the general approach to Web based models should resemble HTTP Servlets. Not to suggest that Java, nor inheritance, nor any language-specific feature of Servlets themselves need be used. But instead, just to say that the logical model of a RESTful programming framework should be one which requires “objects” (or “services”, or whatever you want to call them) expose the uniform interface.

FWIW, the best (for my definition of “best” 8-) one I’ve seen so far – though I haven’t vetted it yet – is this nameless Ruby one which is, AIUI, proposed for use as a Rails extension.

Trackback

no comment until now

Add your comment now