Re: Filters as views (ISSUE-45)

Hi Pierre-Antoine,

> – A collection may have a parent collection, which is a superset of that collection (every member of the collection is also a member of the parent)

Possible gap: is every collection that has a parent collection necessarily a view?
If not, do you have an example?

> – A view on a collection is a resource describing a subset of the members of that collection, based on a particular condition.

=> this might become "parent collection" (maybe we can avoid the repetition of "collection" somehow)

> I am a bit confused, Ruben, because it seems to me that yout alternative definition contradicts one of your previous points. 

Note that my definitions pertain to Markus' proposal, not to my own suggestions.

> This is why I don't understand Ruben's alternative definition, which conflates views and collections.

Well, actually, from my proposed definitions
– A collection is a set of members that somehow logically belong together.
and
– A view is a subset of those members of a collection that satisfy a particular condition.
would actually logically follow that a view _is_ a collection,
because a view satisfies the definition of a collection
(a view is a set of members, and the condition makes them logically belong together).
So this is why we might as well directly define a view as such.

So please challenge my original definitions:
can/should we define views in such a way that they are _not_ collections,
or is it more natural/easier to define them as such?

> * Markus would like to have only basic collections (no notion of parent), and unify all searches, filters and pages as views.
> * Ruben would like to keep searches/filters as full-fledge collections (while explicitly relating them to their parent collection), and keep the notion of view for paging only -- thus renaming them "pages" instead of "views".

While that was my initial proposal, I'm happy to abandon that.
I'm okay with following Markus' new proposal,
but I additionally suggest making view a subclass of collection
(unless somebody can make a definition that allows distinguishing either).

> I tend to lean towards Ruben's model: I like the idea that filtered collections can be handled by a client as a first-class collection, without having to care about the fact that it is part of a larger collection.

The combination of Markus' proposal and "view subclass of collection"
could have the elegance of both.

And even though it might seem complicated, it is actually super intuitive:
what else is a page than a collection of the first x items?

Best,

Ruben

PS For further threads on any proposal, we probably best number or name them.
I just noticed that things are getting confusing naming-wise.

Received on Thursday, 14 January 2016 19:34:38 UTC