Re: [Jersey] Hypermedia Support is useless

From: Jan Algermissen <>
Date: Sun, 14 Feb 2010 14:41:08 +0100


just a quick comment on your 'solution':

On Feb 14, 2010, at 9:20 AM, Markus Karg wrote:

> A real RESTful application needs no actions to solve workflows like the above. In the real world, if a company lives that workflow and has no computers, they will forward paper documents: Review Orders, Review Results, Cheques, Receipts, Shipping Orders, Delivery Notes. In fact, due to usefulness, custom and legal / tax / customs regulations, they actually have to archive those documents for several years. So when replacing the paper process by an electronic process, you typically won't change the process or it's parameters (the documents), but just immitate it in an electronic form: Replacing the paper documents by XML documents. If you would apply the RESTful pattern, you will come to the following API by a simple 1:1 mapping of paper to electronic form:
> Review: POST http://.../orders/1/ @Consumes xml/reviewOrder @Produces xml/reviewResult
> Pay: POST http://.../orders/1/ @Consumes xml/cheque @Produces xml/receipt
> Ship: PUT http://.../orders/1/ @Consumes xml/shippingOrder @Produces xml/deliveryNote

I'd rather think about it like this:

Review: POST http://.../reviewProcessor @Consumes xml/order @Produces xml/order (with link to review log maybe)
Pay: POST http://.../invoicing @Consumes xml/order @Produces xml/invoice (but does the invoicing in the backend)
Ship: POST http://.../shipping @Consumes xml/order @Produces xml/trackingStatus (starting the shipping in thebackend)

Because I think that the resource that represents the order should not bother with starting other processes. But, of course, this depend a lot on the legacy systems and what components manage the orders and what components manage what processes.


 Jan Algermissen, Consultant
 NORD Software Consulting