This content has moved permanently to:
https://blog.jonm.dev/posts/rest-based-service-design-v2/
Wednesday, February 13, 2008
Subscribe to:
Post Comments (Atom)
The Art of Writing Software
This content has moved permanently to:
https://blog.jonm.dev/posts/rest-based-service-design-v2/
All articles Copyright © 2007-2019 by Jon Moore. All rights reserved.
2 comments:
One thing that "smells" to me about this is that you've created a data service with three operations. Read, Update and Delete. Where Update is an implied Create. Since CRUD is such a common acronym I can't help but think that there's some reason not to cause implicit data creation. I can't say I know what that reason is, but it's probably worth it to investigate.
Yes, I can see where you're coming from. In this case, in the way I'm thinking about it, there isn't any data to update -- the only data we care about is whether the resource exists or not (i.e. the boolean flag of whether a food is a favorite or not). So I think this is just a degenerate case. Maybe the right way to look at this is that we've created a resource with Create, Read, and Delete, but no Update. So it's CRD. That might make it smell a little less?
Post a Comment