Hi Chris, If you PUT the person in the location, it means that the person somehow becomes the location, which is probably not what you want as several persons could be in the same location. You need to details your resource model:
I would add a resource containing the set of persons at a given location: http://localhost:8182/location/virginia/persons And update it. Check out org.restlet.data.ReferenceList to manage a list of URI and generate a simple representation for it. You can also use XML or JSON for it. Best regards, Jerome > -----Message d'origine----- > De : Chris Grindstaff [mailto:[EMAIL PROTECTED] > Envoyé : jeudi 9 novembre 2006 21:46 > À : [email protected] > Objet : REST design question > > Hello all, > I'm working on a sample app with restlets. It's going well so far. I > have a design question for those who are more familiar with the REST > style. > > Resources: > person > location > > A person has a location. How should you move an existing > person to an existing location? > Originally I did a POST on location like so: > curl -d "bob" -H "Content-Type: text/plain" -X POST > http://localhost:8182/location/virginia > > This says move person, bob to location virginia. > > Now I'm thinking it would be more "resource-ful" to PUT the person > with the updated location? > > Appreciate your thoughts, > Chris > -- > Chris Grindstaff | http://gstaff.org

