You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Adam Winer <aw...@google.com> on 2008/08/28 18:45:29 UTC

New CollectionOptions API

Two quick questions:

- Are there String "enums" anywhere that list possible values for sort
by and filter?
- Is "topFriends" really both a filter *and* a sort order?  Shouldn't
it only be a sort order?

-- Adam

Re: New CollectionOptions API

Posted by Adam Winer <aw...@google.com>.
On Thu, Aug 28, 2008 at 10:38 AM, Cassie <do...@apache.org> wrote:
> On Thu, Aug 28, 2008 at 10:22 AM, Adam Winer <aw...@google.com> wrote:
>
>> On Thu, Aug 28, 2008 at 9:55 AM, Cassie <do...@apache.org> wrote:
>> > On Thu, Aug 28, 2008 at 9:45 AM, Adam Winer <aw...@google.com> wrote:
>> >
>> >> Two quick questions:
>> >>
>> >> - Are there String "enums" anywhere that list possible values for sort
>> >> by and filter?
>> >
>> >
>> > it can be any field of the object being sorted. so for people, it can be
>> > Person.Field.*, or topFriends, or some container specific js sort
>> extension
>>
>> Person.Field.*, we've got constants for.  Container-specific is
>> container-specific, of course.  Shouldn't we have a constant for
>> sorting topFriends and for filters, topFriends and hasApp?
>
>
> There are string constants in PersonService. Is that what you mean?

D'oh.  Thank you.

-- Adam



>
>
>>
>> >> - Is "topFriends" really both a filter *and* a sort order?  Shouldn't
>> >> it only be a sort order?
>> >
>> >
>> > yes. see the opensocial js spec.
>>
>> Weird (I'm hard-pressed to imagine a gadget developer actually wanting
>> the filter except by confusion), but OK.
>>
>
> In some containers topFriends is like a group. As in Adam is one of my top
> friends but Louis is not. (like the popular topfriends gadget) In other
> containers topFriends is a sort as in Adam is a better friend than Louis he
> comes above Louis as a top friend.
>
> Opensocial and thus Shindig need to support both concepts.
>
>
>>
>> -- Adam
>>
>> >
>> >
>> >>
>> >>
>> >> -- Adam
>> >>
>> >
>>
>

Re: New CollectionOptions API

Posted by Cassie <do...@apache.org>.
On Thu, Aug 28, 2008 at 10:22 AM, Adam Winer <aw...@google.com> wrote:

> On Thu, Aug 28, 2008 at 9:55 AM, Cassie <do...@apache.org> wrote:
> > On Thu, Aug 28, 2008 at 9:45 AM, Adam Winer <aw...@google.com> wrote:
> >
> >> Two quick questions:
> >>
> >> - Are there String "enums" anywhere that list possible values for sort
> >> by and filter?
> >
> >
> > it can be any field of the object being sorted. so for people, it can be
> > Person.Field.*, or topFriends, or some container specific js sort
> extension
>
> Person.Field.*, we've got constants for.  Container-specific is
> container-specific, of course.  Shouldn't we have a constant for
> sorting topFriends and for filters, topFriends and hasApp?


There are string constants in PersonService. Is that what you mean?


>
> >> - Is "topFriends" really both a filter *and* a sort order?  Shouldn't
> >> it only be a sort order?
> >
> >
> > yes. see the opensocial js spec.
>
> Weird (I'm hard-pressed to imagine a gadget developer actually wanting
> the filter except by confusion), but OK.
>

In some containers topFriends is like a group. As in Adam is one of my top
friends but Louis is not. (like the popular topfriends gadget) In other
containers topFriends is a sort as in Adam is a better friend than Louis he
comes above Louis as a top friend.

Opensocial and thus Shindig need to support both concepts.


>
> -- Adam
>
> >
> >
> >>
> >>
> >> -- Adam
> >>
> >
>

Re: New CollectionOptions API

Posted by Adam Winer <aw...@google.com>.
On Thu, Aug 28, 2008 at 9:55 AM, Cassie <do...@apache.org> wrote:
> On Thu, Aug 28, 2008 at 9:45 AM, Adam Winer <aw...@google.com> wrote:
>
>> Two quick questions:
>>
>> - Are there String "enums" anywhere that list possible values for sort
>> by and filter?
>
>
> it can be any field of the object being sorted. so for people, it can be
> Person.Field.*, or topFriends, or some container specific js sort extension

Person.Field.*, we've got constants for.  Container-specific is
container-specific, of course.  Shouldn't we have a constant for
sorting topFriends and for filters, topFriends and hasApp?

>> - Is "topFriends" really both a filter *and* a sort order?  Shouldn't
>> it only be a sort order?
>
>
> yes. see the opensocial js spec.

Weird (I'm hard-pressed to imagine a gadget developer actually wanting
the filter except by confusion), but OK.

-- Adam

>
>
>>
>>
>> -- Adam
>>
>

Re: New CollectionOptions API

Posted by Cassie <do...@apache.org>.
On Thu, Aug 28, 2008 at 9:45 AM, Adam Winer <aw...@google.com> wrote:

> Two quick questions:
>
> - Are there String "enums" anywhere that list possible values for sort
> by and filter?


it can be any field of the object being sorted. so for people, it can be
Person.Field.*, or topFriends, or some container specific js sort extension


>
> - Is "topFriends" really both a filter *and* a sort order?  Shouldn't
> it only be a sort order?


yes. see the opensocial js spec.


>
>
> -- Adam
>