Hi Markus,
I do not have the answers to your questions, domain/resource modeling is
clearly very hard. I just wanted to ask whether you got a hold of the
book RESTfull Web Services from O'Reilly:
http://www.crummy.com/writing/RESTful-Web-Services/
I found it did a nice job in diving into do and don'ts. For instance, it
taught me to deal with transactions just like any other resource, where
a newly allocated resource becomes the session so to speak. Not
everything can be modeled by a document approach I find, although it's
clearly the most efficient.
Regards,
Casper
Markus Karg wrote:
>
> 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
>