|
From: Bill B. <bb...@re...> - 2008-06-23 23:46:33
|
olivier brand wrote:
> I will get to it. in the meantime, I as discussing with a friend of mine and a few questions were raised
>
> 1) why didn't they include regexp capabilities with the GET or PATH annotations?
No regexp capabilities were added because there is a W3C rft on it. The
problem with the RFC though is a) Its not finished, b) It really is only
useful for something like URL rewriting. JAX-RS does have a limited
form of expressions, i.e.:
/a/something{foo}-{bar}/{param}xxxxx
Basically inserting @PathParams anywhere within a URI string.
You also have:
@Path(value="/stuff", limited = false)
limited is like "*". So the expression would be /stuff/* in reality.
With that you can probably do *most* things, but not all. Personally,
I'd like to add the ability to specify query strings in @Path. It would
allow people to overload @POST. (Maybe that isn't such a good thing
though...)
> 2) why cont negociation just based on mime types and not any header fields?
>
Can you give an example of what you mean? There are some variant
processing where you can do matches based on ACCEPT, ACCEPT_LANGUAGE,
and ACCEPT_ENCODING parameters, but it is manual.
> if these make sense, would it make sense to provide that in resteasy and have a way to differentiate the package with the others?
Here's a few ideas for innovation that I've come up with:
* We already have a Client Proxy Framework.
* PathInfo rewriting (like URL rewriting, but only the path and only
with JAX-RS expressions)
* Client Framework support for CacheControl
* ServerSide CacheControl support. Annotate a JAX-RS method with
default CacheControl options. Cache the marshalled response on the
server to avoid reprocessing and re marshalling.
* Asynchronous HTTP (COMET) support. Ability to suspend within a JAX-RS
request.
* Asynchrnous JAX-RS. Basically implement a Job Queue with asyncrnous
JAX-RS endpoints. (See RESTFul Web Services book).
* Combine ideas from Resteasy MOM (the JMS facade I wrote) with Asych
JAX-RS and JBoss Cache and basically create a lightweight, RESTful
ESB-like thingy.
* Provide Ruby, Python, and PHP versions of JAX-RS. (Not sure if this
is even possible :) ) (Groovy and Scala should just work).
Another big thing to differentiate ourselves is with exactly what you're
doing. Provide examples on how to integrate with various technologies.
In your case Spring + Hibernate + OAuth. I was thinking of writing an
Adobe Flex application using JAX-RS as the backend.
Another way to differentiate is to have a shitload of connectors. Some
ideas I have are POI readers/writers (for MS docs).
Another way to is to have cool applications on top of Resteasy. i.e.
Resteasy MOM, maybe a automatic Hibernate RESTful interface.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|