Data Pipelining and Templates

2 views
Skip to first unread message

eduardorochabr

unread,
Mar 4, 2009, 3:40:59 PM3/4/09
to Orkut Developer Forum
After reading the announcement on OpenSocial blog (http://
opensocialapis.blogspot.com/2009/03/test-drive-data-pipelining-
and.html) and the new specs mentioned (http://wiki.opensocial.org/
index.php?title=Data_Pipelining and
http://wiki.opensocial.org/index.php?title=OpenSocial_Templates_Developer%27s_Guide):

1) What will be the process of whitelisting applications to be shown
in profiles? It will be a manual review, checking whether the
application is using the new specs? Or something else?

2) In examples, I could see that opensocial-0.8 or 0.9 was not
required:

<ModulePrefs title="Server-side Template">
<Require feature="opensocial-data" />
<Require feature="opensocial-templates">
<Param name="process-on-server">true</Param>
</Require>
</ModulePrefs>

Am I supposed to use one (opensocial-0.x) or the other (-data and -
templates)? In other words, are the new specs compatible with the
existing spec (0.8)? The current spec will be deprecated?

3) The examples illustrates the most basic scenario, showing some
data, period. It's not clear at all how I can click on a button, post
data to my server and showing the data I received back. In the Data
Pipeline spec, it's shown some Javascript snippets using the new API,
but I could not figure out on how to make a request to my server upon
a user input. The method
"opensocial.data.DataContext.registerListener" actually triggers the
request keyed by the parameter value?

4) From what I can see, the current profile view issue is related to
XSS attacks, which Templates alone addresses. Will the Data Pipeline
be mandatory too?

5) The blog says that "Using data pipelining and templates will reduce
the number of round trips between the container and your server...". I
just don't see this happening, my server will receive the exact same
number of calls. If the container will be able to better handle async
requests with the spec, this is another thing, as well as if it's
easier (by being declarative) or not. Also, if this particular spec
doesn't address the current problem with profile views, IMHO I should
not be forced to used it.

6) It's not clear what is a "os:DataRequest". First, is said to be
equivalent to makeRequest, but the example show it's the very same
thing as "os:PeopleRequest", while "os:HttpRequest" would be the new
makeRequest.

7) Where is Caja? I was told on Caja forum that the reason why Caja is
not being used yet is confidential, but if Orkut put this project to
work, only one point would have to be changed, the container, not all
of the hundreds of gadgets specs out there.

8) Will the current whilelisted application have a deadline to convert
to the new specs too?

Thanks.

Bruno Souza

unread,
Mar 5, 2009, 2:00:24 PM3/5/09
to Orkut Developer Forum
Good questions!
I´m curious to get that answers.

On 4 mar, 17:40, eduardorochabr <eduardoroch...@gmail.com> wrote:
> After reading the announcement on OpenSocial blog (http://
> opensocialapis.blogspot.com/2009/03/test-drive-data-pipelining-
> and.html) and the new specs mentioned (http://wiki.opensocial.org/
> index.php?title=Data_Pipelining andhttp://wiki.opensocial.org/index.php?title=OpenSocial_Templates_Devel...

Navaneeth Krishnan

unread,
Mar 6, 2009, 3:45:23 AM3/6/09
to opensoci...@googlegroups.com

I am looking for these answers as well.

Besides what eduardorochabr mentioned, this also breaks the promised portability of OpenSocial

Regards,
Navaneeth

apurv

unread,
Mar 6, 2009, 7:56:08 AM3/6/09
to Orkut Developer Forum
Hey Folks,

I hope http://orkutdeveloper.blogspot.com/ answers some of your
questions.
To be clear, we'll soon start allowing apps that conform to the
policy, to appear on profile pages. And yes, all apps would have to
migrate to using server-side OS templates [including currently
whitelisted ones].

Caja is great for security, but doesn't really help latency. Caja is
the perfect solution for canvas views, in that it requires minimal
[though not zero] changes to applications.

Thanks,
-apurv


On Mar 5, 1:40 am, eduardorochabr <eduardoroch...@gmail.com> wrote:
> After reading the announcement on OpenSocial blog (http://
> opensocialapis.blogspot.com/2009/03/test-drive-data-pipelining-
> and.html) and the new specs mentioned (http://wiki.opensocial.org/
> index.php?title=Data_Pipelining andhttp://wiki.opensocial.org/index.php?title=OpenSocial_Templates_Devel...

sharath

unread,
Mar 6, 2009, 9:17:55 AM3/6/09
to Orkut Developer Forum
Hi Apurv,

To reappear in profile page, is it enough to migrate only the profile
view or both canvas and profile views should be migrated to OS
Templates?
Also NavigateToView Function is required in OS templates asap since it
is very essential.

Thanks
Sharath

On Mar 6, 5:56 pm, apurv <apurv.gu...@gmail.com> wrote:
> Hey Folks,
>
> I hopehttp://orkutdeveloper.blogspot.com/answers some of your

Apurv Gupta

unread,
Mar 6, 2009, 12:11:18 PM3/6/09
to opensoci...@googlegroups.com
Hi Sharath,

OS templates are required only for profile view. Canvas view will continue to work as it is working [though we might switch to caja in future].

We are working on os:NavigateToView support and will get back to you as soon as it's available. I am also hoping that we'll soon start showing apps with os templates on profile view. We'll detect that from the xml and no separate submission/whitelisting would be required.

Thanks,
-apurv

barszcz

unread,
Mar 6, 2009, 1:29:42 PM3/6/09
to Orkut Developer Forum
i don't know if its a bug or not.. but when i tryied to use the repeat
template fetching data from my server it never worked (using the jsons
exactly the same way in the samples and even with the samples and it
only when i got 1 data and showed without the repeat)
here i found something stranged since the data was 'created' on the
osd.DataContext.putDataSet.

then i tryied the sample fetching data from the user (the friend list)
and it worked. so i looked the source and in the
osd.DataContext.putDataSet, was a list : [ users friends ]..

then i changed the json from:

{ songs : [
{
title: 'Love song #15',
url: 'http://allmusic.com/johndoe/greatesthits/
lovesong15.mp3',
artist: 'John Doe',
album: 'Greatest Hits',
albumThumbnail: 'http://allmusic.com/johndoe/greatesthits.jpg'
},
{
title: 'Love song #16',
url: 'http://allmusic.com/janedoe/greatesthits/
lovesong16.mp3',
artist: 'Jane Doe',
album: 'Best Of',
albumThumbnail: 'http://allmusic.com/janedoe/bestof.jpg'
},
{
title: 'Single #1',
url: 'http://allmusic.com/janedoe/greatesthits/single1.mp3',
artist: 'Jane Doe',
album: 'Greatest Hits',
albumThumbnail: 'http://allmusic.com/janedoe/greatesthits.jpg'
}
]}

to:

{ list : [
{
title: 'Love song #15',
url: 'http://allmusic.com/johndoe/greatesthits/
lovesong15.mp3',
artist: 'John Doe',
album: 'Greatest Hits',
albumThumbnail: 'http://allmusic.com/johndoe/greatesthits.jpg'
},
{
title: 'Love song #16',
url: 'http://allmusic.com/janedoe/greatesthits/
lovesong16.mp3',
artist: 'Jane Doe',
album: 'Best Of',
albumThumbnail: 'http://allmusic.com/janedoe/bestof.jpg'
},
{
title: 'Single #1',
url: 'http://allmusic.com/janedoe/greatesthits/single1.mp3',
artist: 'Jane Doe',
album: 'Greatest Hits',
albumThumbnail: 'http://allmusic.com/janedoe/greatesthits.jpg'
}
]}

and it magicly worked.. wierd..
also, the 3 'articles' above are a real mess.

On 6 mar, 14:11, Apurv Gupta <apurv.gu...@gmail.com> wrote:
> Hi Sharath,
> OS templates are required only for profile view. Canvas view will continue
> to work as it is working [though we might switch to caja in future].
>
> We are working on os:NavigateToView support and will get back to you as soon
> as it's available. I am also hoping that we'll soon start showing apps with
> os templates on profile view. We'll detect that from the xml and no separate
> submission/whitelisting would be required.
>
> Thanks,
> -apurv
>
> On Fri, Mar 6, 2009 at 7:47 PM, sharath <sharath2...@gmail.com> wrote:
>
> > Hi Apurv,
>
> > To reappear in profile page, is it enough to migrate only the profile
> > view or both canvas and profile views should be migrated to OS
> > Templates?
> > Also NavigateToView Function is required in OS templates asap since it
> > is very essential.
>
> > Thanks
> > Sharath
>
> > On Mar 6, 5:56 pm, apurv <apurv.gu...@gmail.com> wrote:
> > > Hey Folks,
>
> > > I hopehttp://orkutdeveloper.blogspot.com/answerssome of your

sharath

unread,
Mar 6, 2009, 10:08:54 PM3/6/09
to Orkut Developer Forum
Hi Apurv,

Is it allowed to use <a>, <img>, <div> and other html tags in OS
Templates ?

Thanks
Sharath

On Mar 6, 10:11 pm, Apurv Gupta <apurv.gu...@gmail.com> wrote:
> Hi Sharath,
> OS templates are required only for profile view. Canvas view will continue
> to work as it is working [though we might switch to caja in future].
>
> We are working on os:NavigateToView support and will get back to you as soon
> as it's available. I am also hoping that we'll soon start showing apps with
> os templates on profile view. We'll detect that from the xml and no separate
> submission/whitelisting would be required.
>
> Thanks,
> -apurv
>
> On Fri, Mar 6, 2009 at 7:47 PM, sharath <sharath2...@gmail.com> wrote:
>
> > Hi Apurv,
>
> > To reappear in profile page, is it enough to migrate only the profile
> > view or both canvas and profile views should be migrated to OS
> > Templates?
> > Also NavigateToView Function is required in OS templates asap since it
> > is very essential.
>
> > Thanks
> > Sharath
>
> > On Mar 6, 5:56 pm, apurv <apurv.gu...@gmail.com> wrote:
> > > Hey Folks,
>
> > > I hopehttp://orkutdeveloper.blogspot.com/answerssome of your

Prashant Patil

unread,
Mar 7, 2009, 12:53:01 AM3/7/09
to opensoci...@googlegroups.com
Hi Guide / google official's

As my most app's profile view is only with basic html tag. What chages
we have to do in profile view? or it will automatically going to pick
its for new templates. as i am not getting high tech discussions
regarding templats.

Regards
Prash!
--
With best Regards.
Prashant aka Orkuteer
http://en.blog.orkut.com/2007/11/thanks-from-orkuteer.html

Apurv Gupta

unread,
Mar 9, 2009, 1:41:34 AM3/9/09
to opensoci...@googlegroups.com
Hi Sharath,

Those are regular html tags and are allowed.

@prashant:

If you use only basic html, you should be fine and profile view will display when we enable all applications. I am curious though: is your profile view not at all dependent on viewer/owner? If yes, then remeber that JS won't execute on profile page - so you would have to use templates to customize the profile view per owner/viewer.

Thanks,
-apurv

anatoly

unread,
Mar 9, 2009, 5:54:20 AM3/9/09
to Orkut Developer Forum
Hi apurv


How can I make an equivalent to the following call in templates
gadgets.util.getUrlParameters()["gadgetId"]

to get the gadget id?
Did not find that in the docs


thanks

Apurv Gupta

unread,
Mar 9, 2009, 6:06:55 AM3/9/09
to opensoci...@googlegroups.com
Hi,

I am not sure you can get the gadget-id. To pass the id where required, you can use @app in the templates. Why do you need the gadget Id, incidentally?

-apurv

anatoly

unread,
Mar 9, 2009, 6:24:21 AM3/9/09
to Orkut Developer Forum
I need to pass it actually.
So I just add @app as id and that should work?

One of my apps has a very simple html profile view with app id is the
only thing I should get.


I updated this profile and I don't see anything in sandbox, how do I
know what is wrong?
> > > -apurv- Hide quoted text -
>
> - Show quoted text -

Apurv Gupta

unread,
Mar 9, 2009, 6:33:03 AM3/9/09
to opensoci...@googlegroups.com
You can use HttpRequest and pass @app in a parameter to generate the right view. You can test if things are working by using the canvas view.
Profile views for compliant apps will be enabled in a few weeks.

anatoly

unread,
Mar 9, 2009, 6:39:57 AM3/9/09
to Orkut Developer Forum
I don't pass @app to my server in this app.


Here is my xml with 5 lines of code for profile view:
http://www.vandalismpro.com/opensocial/orkut.xml


I don't see any profile box in sandbox. It was announced that profile
templates should work @ sandbox.

Any idea why it's not working?
> > > - Show quoted text -- Hide quoted text -

Vijaya

unread,
Mar 9, 2009, 9:15:31 AM3/9/09
to Orkut Developer Forum
Currently you can test your template code in the canvas view. We
haven't enabled the profile view (even with templates) yet but will be
doing so in a day or two and then you can test them on the profile
view also.

Apurv Gupta

unread,
Mar 9, 2009, 11:59:13 AM3/9/09
to opensoci...@googlegroups.com
Anatoly,

The usage of @app that you have won't work. What you are really trying to do is to navigate to profile view. We'll be implementing os:NavigateToView to take of these issues. Please refer to the blog post and the section on missing features.

Thanks,
-apurv

sunnydiv

unread,
Mar 9, 2009, 1:50:32 PM3/9/09
to Orkut Developer Forum
in the Data Pipelining wiki
http://wiki.opensocial.org/index.php?title=Data_Pipelining#Tag:_.3Cos:PeopleRequest.3E

i see
' # <os:PersonAppDataRequest> - not needed due to Radically simplify
the Persistence/AppData API '

and the page after the jump says
" Summary
Simplify the API used to get/set appdata. "


.... umm WHAT ?
are we still using JS to get app data ?

i dont understand this one,
can anyone post an example ?

On Mar 9, 8:59 pm, Apurv Gupta <apurv.gu...@gmail.com> wrote:
> Anatoly,
> The usage of @app that you have won't work. What you are really trying to do
> is to navigate to profile view. We'll be implementing os:NavigateToView to
> take of these issues. Please refer to the blog post and the section on
> missing features.
>
> Thanks,
> -apurv
>

sunnydiv

unread,
Mar 9, 2009, 1:54:45 PM3/9/09
to Orkut Developer Forum
the previous version @ http://docs.google.com/View?docid=dc5qrdst_19fbb8fpd3

says :
<os:PersonAppDataRequest> - request to get app data
* @key {string}
* @userid {list<string>} Comma delimited IDs of the users to use
with "@groupid". Each item can be one of "@me", "@viewer", "@owner",
or a user ID. Defaults to "@viewer'. Optional.
* @groupid {string} The group of users to get app data for.
Defaults to "@self", which returns the actual users listed in @userid.
Other values are "@friends" to get friends, or any other string to get
an arbitrary group. Optional.
* @dataKeys {list<String>} List of keys for which to get data.
* returns an array of OpenSocial app data objects, keyed by userid
Example:
<os:PersonAppDataRequest key="MyFriendsPets" userid="@viewer"
groupid="@friends" dataKeys="pets,petNames"/>


which makes sense,
so what would we use in lieu of it



On Mar 9, 10:50 pm, sunnydiv <sunny...@gmail.com> wrote:
> in the Data Pipelining wikihttp://wiki.opensocial.org/index.php?title=Data_Pipelining#Tag:_.3Cos...

sunnydiv

unread,
Mar 11, 2009, 10:40:37 AM3/11/09
to Orkut Developer Forum
requesting a reply/answer
in data pipelining

how do we get app data / presistant data

On Mar 9, 10:54 pm, sunnydiv <sunny...@gmail.com> wrote:
> the previous version @http://docs.google.com/View?docid=dc5qrdst_19fbb8fpd3

barszcz

unread,
Mar 11, 2009, 10:53:51 AM3/11/09
to Orkut Developer Forum
+1

Apurv Gupta

unread,
Mar 11, 2009, 12:27:50 PM3/11/09
to opensoci...@googlegroups.com
Please use os:PersonAppDataRequest

barszcz

unread,
Mar 11, 2009, 1:34:56 PM3/11/09
to Orkut Developer Forum
actually i want to save data.. when this commands will be avaliable?

opensocial.data.getDataContext()
opensocial.data.DataContext.getDataSet(String key)
opensocial.data.DataContext.putDataSet(String key, JSON value)
opensocial.data.DataContext.registerListener (Array<String>|String
keys, Function(Array<String> keys) callback)


On 11 mar, 13:27, Apurv Gupta <apurv.gu...@gmail.com> wrote:
> Please use os:PersonAppDataRequest
>

Vijaya

unread,
Mar 11, 2009, 1:55:10 PM3/11/09
to Orkut Developer Forum
Currently we are not supporting updateAppData feature in the template
spec. Could you please give your usecase for using this feature in the
profile view?

As for fetching app data, please use the following:

<os:PersonAppDataRequest> - request to get app data

* @key {string}
* @userId {list<string>} Comma delimited IDs of the users to use
with "@groupid". Each item can be one of "@me", "@viewer", "@owner",
or a user ID.
* @groupId {string} The group of users to get app data for.
Defaults to "@self", which returns the actual users listed in @userid.
Other values are "@friends" to get friends, or any other string to get
an arbitrary group. Optional.
* @fields {list<String>} List of fields for which to get data.

returns a map of OpenSocial app data objects, keyed by useId

Example:
<os:PersonAppDataRequest key="MyFriendsPets" userId="@viewer"
groupId="@friends" fields="pets,petNames"/>

The information about app data in the DataPipelining spec is still not
implemented on orkut, hence this is the tag you can now use to access
the app data in templates.

barszcz

unread,
Mar 11, 2009, 2:18:18 PM3/11/09
to Orkut Developer Forum
well, if you can have a look at the app 850136261702
its the configuration 'screen' i want to save the data (username and
chart).
like when you click ok it sends:
req.add(req.newUpdatePersonAppDataRequest
(opensocial.DataRequest.PersonId.VIEWER, '..', ..));
req.send(..);

i want to convert this to be used with the templates.. will i have to
use the rest/rpc calls?

Apurv Gupta

unread,
Mar 12, 2009, 1:00:18 PM3/12/09
to opensoci...@googlegroups.com
Barszcz,

I am somewhat confused. This configuaration screen comes on the canvas view. You *don't need* to use templates to do this.
You can continue to use the javascript API to do this.

Thanks,
-apurv

P.S. When a user installs an application, in orkut, they are taken to the canvas view by default.

barszcz

unread,
Mar 12, 2009, 2:18:46 PM3/12/09
to Orkut Developer Forum
i see, but after he install he will be able to change it, and in the
past it was able in profile (there was a icon after the username that
when clicked i showed the hided config div.. but thats ok

thanks

On 12 mar, 14:00, Apurv Gupta <apurv.gu...@gmail.com> wrote:
> Barszcz,
> I am somewhat confused. This configuaration screen comes on the canvas view.
> You *don't need* to use templates to do this.
> You can continue to use the javascript API to do this.
>
> Thanks,
> -apurv
>
> P.S. When a user installs an application, in orkut, they are taken to the
> canvas view by default.
>

Apurv Gupta

unread,
Mar 12, 2009, 4:01:25 PM3/12/09
to opensoci...@googlegroups.com
I recommend that a click on that icon should take the user to the canvas page, with a appropriate parameter so you know what do do. [Show the box].

This would be a good model for all apps to follow. Action on profile page is a NavigateToView with right params for next action.

RAJA SEKHAR

unread,
Mar 13, 2009, 3:40:06 AM3/13/09
to opensoci...@googlegroups.com
Hi all,
 
I am trying to implement templates for my application in profile .If i want to get  data from my server for that how can i call servlet with dynami parameters? and my servlet returns json data .
 
Now i am using
 
 <os:HttpRequest key="userProfile" href="http://myserver.com/appname/ProfileView.do" authz="signed" params="param1=all&param2=&param1=1XXXX&rc=X&container=sandbox.orkut"/> 
 
is it correct ?any body help me regarding this.
 
 
Thanks
Raj
Message has been deleted

barszcz

unread,
Mar 13, 2009, 9:59:37 AM3/13/09
to Orkut Developer Forum
Ok, this may sound like a stupid question:

<os:PersonAppDataRequest key="appData" userId="@owner" grouIp="@self"
appId="@app" fields="lfm"/>
this is working and returning: {"14035060268780004552":
{"lfm":"rudibarszcz"}}

now, how can i handle this since i only want the "rudibarszcz" value?
<h1> ${appData.[heretheproblem].lfm} </h1>
'working':
<h1> ${appData.['14035060268780004552']['lfm']} </h1>

so here comes the question, how i make something like that work: $
{appData.${owner.id}.lfm or ${appData['${owner.id}']['lfm']?

On 12 mar, 17:01, Apurv Gupta <apurv.gu...@gmail.com> wrote:
> I recommend that a click on that icon should take the user to the canvas
> page, with a appropriate parameter so you know what do do. [Show the box].
> This would be a good model for all apps to follow. Action on profile page is
> a NavigateToView with right params for next action.
>

Apurv Gupta

unread,
Mar 13, 2009, 10:02:24 AM3/13/09
to opensoci...@googlegroups.com
Hi Barszcz,

That's a good question and the answer is that we will need to support JSON eval of appdata.

It should be available soon.

Thanks,
-apurv

barszcz

unread,
Mar 13, 2009, 10:09:35 AM3/13/09
to Orkut Developer Forum
thanks for the fast reply Gupta, but i was being reallyy stupid and
didn't try a simple thing:

${appData[owner.id]['lfm']} where owner is the object from
os:OwnerRequest

On 13 mar, 11:02, Apurv Gupta <apurv.gu...@gmail.com> wrote:
> Hi Barszcz,
> That's a good question and the answer is that we will need to support JSON
> eval of appdata.
> I know of the issue fromhttp://www.geocities.com/apurv_gupta_2000/test.xml
>
> It should be available soon.
>
> Thanks,
> -apurv
>
Reply all
Reply to author
Forward
0 new messages