RubenVerborgh / Hydra-Architecture-Diagram

6 stars 2 forks source link

Do we need to "describe collection representations"? #3

Closed tpluscode closed 7 years ago

tpluscode commented 7 years ago

Where you write describing representations: properties of resources that a collection representation will list, do I understand correctly that simply stating the type of collection's element should be enough? It's properties will be described by the very type of the Resource. Or is there more to it than meets the eye?

RubenVerborgh commented 7 years ago

Let me try to clarify with an example. Suppose that we have an application with products that contains title, description, price, photos, review, etc.

A representation of a collection of products would not necessarily list all those properties, but perhaps only the "basic" properties such as title and price (cfr. an Amazon product listing).

The "describing representations" part would then list which properties a representation of the collection would contain.

Would this be useful information to describe, and if so, should the wording be clarified?

tpluscode commented 7 years ago

I see. Personally I'd add a new resource type, specific to that collection. Do you think it too much and possible mess?

tpluscode commented 7 years ago

But even so, I'd make that part optional. If not present, the assumption is that all properties will be transferred. Let's just make it explicit.

RubenVerborgh commented 7 years ago

Personally I'd add a new resource type, specific to that collection. Do you think it too much and possible mess?

It's definitely not a "resource" type, but a representation. The resource is the same thing, it's just a matter of what detail level you'd provide.

But even so, I'd make that part optional

+1 for me as well

If not present, the assumption is that all properties will be transferred.

I would say that there is no assumption about the properties then, especially since "all" is tricky to define (open world assumption, whether RDF or not).

tpluscode commented 7 years ago

Of course, representation.

"all" is tricky to define

Well, given a collection of X, it would mean that you can at least expect any of the properties listed in X's description.

That said I agree that explicitly stating which of those to expect is useful. Just add the optional bit and I'm closing already.