On 18-01-15 11:49, Erik Sundvall wrote:
> Are you sure you have understood the difference between service 
> orientation and resource orientation? The background chapter in our 
> paper I referred to earlier briefly touches upon what a resource is, 
> Fielding's dissertation explains it in detail.
>

Erik, sorry, bit late, forgot to answer this one.

Reading RFC 3986 or Roy Fieldings dissertation, both are simply stating: 
'The key abstraction of information in REST is a resource. Any 
information that can be named can be a resource: a document or image, a 
temporal service (e.g. "today's weather in Los Angeles"), a collection 
of other resources, a non-virtual object (e.g. a person), and so on. In 
other words, any concept that might be the target of an author's 
hypertext reference must fit within the definition of a resource. A 
resource is a conceptual mapping to a set of entities, not the entity 
that corresponds to the mapping at any particular point in time.'

A resource is simply a conceptual mapping of something. So both the 
class and a document can be a resource.
If the document is generated via a class and doesn't really exists I'd 
use the class as resource.

Another quote says 'Some resources are static in the sense that, when 
examined at any time after their creation, they always correspond to the 
same value set. Others have a high degree of variance in their value 
over time. The only thing that is required to be static for a resource 
is the semantics of the mapping, since the semantics is what 
distinguishes one resource from another.' So even the content can change.

So, if the content contains the information that no person with that ID 
is in the system, then that is information, everything went well, the 
class did its work without error, then that is not an error, and one 
could argument that 200 should be returned, or maybe 204, and not 404, 
which means that the resource to look for (which is the call handling 
process/class) was not found.

Best regards
Bert



Reply via email to