users@jersey.java.net

RESTful Documents

From: Markus Karg <karg_at_quipsy.de>
Date: Wed, 20 May 2009 11:11:51 +0200

Ok, here is my third and hopefully last philosophic question of the day.

 

My database stores parts and part characteristcs (N:M). Like: The part
"Screw" has has the characteristics "Diameter" and "Length" for example.

 

If I want to do simple CRUD, what is the most "typical" design pattern
in the RESTful world:

 

(1) GET / PUT of the part uses an XML body which contains also the
embedded XML of all characteristics?

 

(2) GET / PUT of the part uses an XML body which contains a list of URLs
pointing to the characteristics and the client does a lot of subsequent
GETs / PUTs for their XML body?

 

(3) GET / PUT of the parts uses an XML body which contains just the IDs
of the characteristics and the client must inherently know how to obtain
their XML bodies?

 

I am pretty sure that the REST experts have some patterns which they
will use every day. But how do they look like?

 

Any comments welcome!

 

Regards

Markus