|
From: Christian B. <chr...@gm...> - 2008-07-16 10:06:08
|
On Jul 16, 2008, at 11:59 , Martin Algesten wrote: > I think it feels wrong to receive a Customer object in set() which > is supposed to be myself (sure I can copy the values over from one > to the other). Pulling the @PUT method up to the CustomerDatabase > class is a solution, but then I don't keep my operations together, > so that feels wrong too. In my own test implementations I've ended > up creating a wrapper resource around every entity which feels right > since I get a clean API separation from my domain model. Agree on that, I think it's the job of a CRUD framework like what Seam can offer. Even for simple applications I would not put resource annotations into my domain model. Or at least only annotations but no special methods. One of the points I brought up is RESTEasy integration with the Seam built-in controllers/homes/queries: http://docs.jboss.com/seam/2.1.0.A1/reference/en/html/framework.html |