Quantcast
Channel: Question and Answer » web-services
Viewing all articles
Browse latest Browse all 136

What is really a resource?

$
0
0

I’m starting to study about web api’s and REST and I’m having a hard time to understand what is really a resource. Basically the book I’m reading says that a resource is a conceptual mapping to one or more entities. Searching on the internet I found this from a dissertation:

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.

Which again says a resource is a conceptual mappings to one or more entities, but that says that any information that can be named can be a resource. The book also stresses that entity in this case doesn’t refer to business objects but can be really anything.

Now, this idea of resource seems pretty important, but I can’t grasp what really a resource is and why it should be a mapping.

So what is really a resource, why it should be a mapping to one or more entities and what are some examples?


Viewing all articles
Browse latest Browse all 136

Trending Articles