Java News from Thursday, November 1, 2007

Sun has published the early draft review of JSR-311, JAX-RS: The Java API for RESTful Web Services in the Java Community Process (JCP). Despite the name what this really is seems to be is a generic HTTP server API. There's no client side component, no support for non-HTTP RESTful services, and "will be sufficiently flexible to support a variety of HTTP applications including WebDAV[6] and the Atom Publishing Protocol[7]." WebDAV is of course the poster child of non-RESTful Web services.

I no longer think this API is a bad thing. If it's done right, it could be quite useful. There's some very interesting stuff in here, and I can see some clear use cases. I'm not at all sure it should be more RESTful than it is. There's a lot to be said for an API that faithfully implements the HTTP spec and leaves it to application developers to design their architectures using RESTful principles. An API is probably the wrong place to enforce architectural decisions (though it can encourage the right ones.) However this API is badly misnamed. REST is not HTTP and HTTP is not REST, though they are related. This API has only a familial connection to REST, and really should be renamed something like the "Java HTTP Server API". Is anyone else really tied of companies jumping on buzzwords they don't understand and don't intend to support? Comments are due by November 23.