Re: Filters as views (ISSUE-45)

Hi Karol,

> Consider that each element of the collection has an index - a value that is not directly assigned, but it's bound to that item whatever you'll do. In this approach paging is nothing else than a filter on that property (index).

Even then, paging is still different, because:
– it yields a set of related but different filtered resources (= the pages), whereas another filter just results in one filtered resource
– pages have a logical order (as you indicated), and having a "next", "previous", "first", "last" link on them makes sense, which is not the case for other filters
– pages typically have a fixed result size, which is not the case for other filters
– membership of a page is altered if new items are added or existing items are removed; this is not the case for membership of a filter, which is only altered if the item itself is altered (in other words: either the index property you describe, or the filter expression that selects it, is not a constant)
– for pages, the sum of the related resources (= other pages) always yields the entire collection; in contrast, not every filter always has its negation implemented (e.g., an application might allow you to search by keyword, but not necessarily by things that not contain the keyword)

Best,

Ruben

Received on Tuesday, 12 January 2016 18:36:42 UTC