The latest code in CXF’s SVN takes a cue from the Ruby community and knows how to turn CRUD operations into resources automatically.
Examples:
- Selection:
Collection<People> getPeople()
is mapped to an HTTP GET on /people Person getPerson(id)
is mapped to an HTTP GET on /people/{id}.void addPerson(Person person)
is mapped to an HTTP POST on /people.void updatePerson(long id, Person person)
is mapped to an HTTP PUT on /people/{id}.void deletePerson(long id)
is mapped to an HTTP DELETE on /people/{id}
Very neat.
Hmm, but why the “People” qualifier on all the verbs? What value does that add? Why not just “Collection get()”?