restkat
2011-12-16 06:18:45 UTC
I’ve been using JAX-RS and like the simplicity and marshaling of parameters
and responses.
I'm reading about how to design the URI space and also like the simple,
resource centric approach.
But when it comes to performing actions from an HTTP client that do not
pertain to CRUD operations against a resource, am I supposed to use a
different technology? That doesn't make any sense. Now I have JAX-RS for the
resource centric requests and maybe POX over HTTP for invoking actions. Two
different frameworks to maintain...this would be an abomination from a
maintenance and testing perspective.
Here's an example I'm working with related to a simple TV Guide client:
For getting and displaying a TV guide, REST fits well. You can imagine URI's
like /programs and /programs/{programId}.
But once I have a program object and want to tell the back end to tune my TV
to the appropriate channel to watch the program, REST doesn't make much
sense. I'm telling the back end to tune a set-top box to channel 4. That
doesn't have much to do with the original resource. The closest URI I can
come up with is something like
PUT /set-top/{id}
But that doesn’t sound right.
Certainly you could use JAX-RS to expose the interface, but it wouldn't be
REST and everything I read says that this is wrong.
Ideas?
--
View this message in context: http://jersey.576304.n2.nabble.com/JAX-RS-RESTful-Interface-for-actions-tp7099767p7099767.html
Sent from the Jersey mailing list archive at Nabble.com.
and responses.
I'm reading about how to design the URI space and also like the simple,
resource centric approach.
But when it comes to performing actions from an HTTP client that do not
pertain to CRUD operations against a resource, am I supposed to use a
different technology? That doesn't make any sense. Now I have JAX-RS for the
resource centric requests and maybe POX over HTTP for invoking actions. Two
different frameworks to maintain...this would be an abomination from a
maintenance and testing perspective.
Here's an example I'm working with related to a simple TV Guide client:
For getting and displaying a TV guide, REST fits well. You can imagine URI's
like /programs and /programs/{programId}.
But once I have a program object and want to tell the back end to tune my TV
to the appropriate channel to watch the program, REST doesn't make much
sense. I'm telling the back end to tune a set-top box to channel 4. That
doesn't have much to do with the original resource. The closest URI I can
come up with is something like
PUT /set-top/{id}
But that doesn’t sound right.
Certainly you could use JAX-RS to expose the interface, but it wouldn't be
REST and everything I read says that this is wrong.
Ideas?
--
View this message in context: http://jersey.576304.n2.nabble.com/JAX-RS-RESTful-Interface-for-actions-tp7099767p7099767.html
Sent from the Jersey mailing list archive at Nabble.com.