Praveen

I would suggest you propose a change to the RESTful spec to allow for exact
control over the returned fields.

-Louis

On Mon, Nov 10, 2008 at 4:02 PM, praveen n.n. <[EMAIL PROTECTED]>wrote:

> Hi Chris,
>         I don't think the restful request respects the spec regarding the
> default fields as in java side the default fields are added to the set only
> if the fields requested by the developer is empty. So if the developer
> requests only ID, it is passed as is. The javascript side does exactly what
> the spec says by adding Id, name and thumbnailUrl no matter what.
> I understand deviating from spec is bad practice but with current settings
> there is noway to just get ID's of thousand or so friends for a person.
>
> Thanks for your quick response.
>
> Praveen Neppalli Naga
>
>
> --- On Mon, 11/10/08, Chris Chabot <[EMAIL PROTECTED]> wrote:
>
> > From: Chris Chabot <[EMAIL PROTECTED]>
> > Subject: Re: Opensocial Person PROFILE_DETAILS:- Shindig implementation
> of  default person fields.
> > To: [email protected], [EMAIL PROTECTED]
> > Date: Monday, November 10, 2008, 1:28 PM
> > the javascript configuration is also injected almost as-is
> > into the gadget
> > document, and serves as the basis for the supportedFields
> > and alike calls,
> > so this has a different function as the
> > 'configuration' in the code.
> >
> > Also this javascript configuration defines which fields are
> > available (from
> > the gadget js api point of view) and doesn't define the
> > 'default set of
> > fields' (as far as i'm aware)
> >
> > Normally a container would list the fields that are
> > supported in the
> > container.js file, implement those fields in his data
> > adapters, and it's
> > done.
> >
> > The demand for being able to change the default fields is
> > quite low as you
> > could expect, since this makes it deviate from the spec :)
> >
> > Since deviating from the spec is something I don't feel
> > should be
> > encouraged, I don't think we need any configuration for
> > this since this
> > would only encourage very 'bad' behavior (from a
> > spec compliance point of
> > view).
> >
> >
> > On Mon, Nov 10, 2008 at 12:04 PM, praveen n.n.
> > <[EMAIL PROTECTED]>wrote:
> >
> > > When fetching a person or friends, there is an option
> > to specify the person
> > > fields that the app developer can request. The spec
> > mentions that the server
> > > will always include ID, NAME, and THUMBNAIL_URL.
> > >
> > > But in case I want to change this default list to
> > something else(which
> > > makes me deviate form spec, but there are few reason I
> > want to), shindig
> > > implementation doesn't allow me to change this
> > gracefully.
> > >
> > > Now the question,
> > >
> > > There are two places the default fields are injected,
> > one is in java script
> > > side and another is in java side in PersonHandler.java
> > and both of them are
> > > hard coded. I understand the reason for injecting
> > default fields in java
> > > side and it is to support Restful request that
> > apparently also supports Json
> > > requests. Is there any reason its also injected in
> > javascript side? to
> > > support PHP?
> > > Also the implementation in javascript side is
> > different from java side. In
> > > javascript the default fields are injected no matter
> > what the developer
> > > specifies in the fields in the person request but in
> > java side the default
> > > fields are injected only if the developer doesn't
> > specify anything in the
> > > fields. So for a same kind of request json request
> > will behave differently
> > > compared to restful request. Any thoughts on this?
> > >
> > > And any plan to make this configurable? If yes I have
> > a patch for java
> > > side. will it be better to do this in Java side and
> > PHP side alone and
> > > remove it from javascript?
> > >
> > > Let me know if this needs more explanation and
> > specific details.
> > >
> > > Thanks
> > > Praveen Neppalli Naga
> > >
> > >
> > >
> > >
> > >
> > >
>
>
>
>

Reply via email to