DEV Community

Discussion on: RESTful API design concerns

Collapse
 
nogtini profile image
Joey D. • Edited

Generally the concept of a resource should be fully decoupled from any middleware that generates the representation of that resource. A resource is a concept, and, while the representation is dependent on your architecture, the resource should remain conceptually independent and coupled only to the problem domain.

Additionally, it's recommended REST practice to try to make your URIs as still and unchanging as possible, as the concept of the resource should change very slowly if at all (see "Cool URIs Don't Change" w3.org/Provider/Style/URI). The representation of this resource can change as often as it want so long as it conceptually equivalent to the original resource.

Collapse
 
piczmar_0 profile image
Marcin Piczkowski

Yes, this makes also a lot of sense. This reason would probably win if I am doing a publicaly available API.