We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
Thanks for sharing. I'll use this approach from now on.
Interesting topic Sir. and indeed a good practice when designing restful APIs.
Some also call it the "Presenter Object Pattern" (see http://madhatted.com/2013/3....
Keep up the good stuff.
Or you can call it DTO (Data Transfer Object) wich is a represantation off a resource that can be an agregate off multiple objects. As in the example, let's assume that you want the client to know in wich category it is, and you only store it's categoryId...You send him the entire product (DTO) represantation and properties (regardless off you data storage strategy)..