0

How is small view supposed to be updated?

Hi!

I'm trying to understand how is small view supposed to work. In the absence of javascript support (and thus AJAX) I'm trying to work out the best way of handling the contents generation server-side. From what I understand small view has two modes:

- default view (same contents for all users) -- this is generally what I'd like BUT in the absence of OpenSocial XML application format support it seems like the only way to update default contents is to go to editor web page and copy/paste contents manually. This certainly cannot be the only way as it's unwise to expect that people would do that for frequently updated applications. This is question #1: is it the only way? Or can be small view contents hosted remotely / being automatically pushed to Yahoo! servers *once* for all users?

- personalized view (different for each user) -- while this view is supposedly designed to provide personalized contents I suspect it can be used to provide up-to-date, non-personalized content too; this is question #2: how do I make Yahoo! to automatically request a new contents... every hour? on each page reload? <yml:a replace=... tag is no good since it requires user to click. MyYahoo! applications like Company News do refresh their contents on each page reload and from time to time by themselves (I'm not sure about the latter but it seems to be the case).

Now putting all this into a bigger picture smile.gif Let's suppose I want to publish an OpenSocial news application -- simple thing; it should display top 3 news stories from my web page. Let's suppose it's somewhat popular application and we've got a lot of users. Now we want to publish a story. Obviously requiring user to click to reload contents is not an option (nobody can expect that in year 2009, right rolleyes.gif ). So the only other option I know of would be to loop through all the users (!!!) and call setSmallView("new contents") for each one of them? Surely it's not what people are doing, right? This would be question #3: what am I missing? cool.gif

Thanks for help,
Max

by
2 Replies
  • Max, yml:include was recently invented for this purpose (see Xav's post on the most recent YAP upgrade). Unfortunately, it appears that yml:include isn't documented on the YML reference page yet.

    Here's the relevant part of Xav's post:
    QUOTE
    There are a couple of key new features for developers, specifically:
    yml:include - this new yml tags will enable your small view to triger an xhr request to your server once the host page is loaded so you can present your users fresh content!
    0
  • yml:include is functional in the canvas view (which was in prod but not document so that it could be reviewed and tested) and should be available in the dev preview of the small view, but the last time I checked it wasn't synced up with the My Yahoo! drop zone for the small view yet. I'm trying to track down specifics on this. Jared's right though, yml:include will be the best method for updating the small view once it is available. Currently the methods generally used are:

    - Updating the small view using a setSmallView SDK call from the canvas view
    - Updating the small view on a timed basis by running a cron job

    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network
    Twitter: jcleblanc

    QUOTE (Jared @ Jun 10 2009, 01:05 AM) <{POST_SNAPBACK}>
    Max, yml:include was recently invented for this purpose (see Xav's post on the most recent YAP upgrade). Unfortunately, it appears that yml:include isn't documented on the YML reference page yet.

    Here's the relevant part of Xav's post:
    0
  • I've been trying to test yml:include, and you're right, it doesn't seem to work on production (though it works on the preview). Is there any timeframe for this being pushed live? I don't want to have to sink a ton of time into getting this application to update through pushes on the backend if yml:include is going to work soon (and I can't see why it wouldn't; it's working on the preview already).

    Maybe someone can explain the logic of pushing this to the testing sandbox but NOT live?
    0
  • Let me follow up with the My Yahoo! folks to see when this will be integrated, but for the time being I can provide you with the logic behind it from my understanding:

    The application platform is divorced from its actual drop zone (that is, http://developer.yahoo.com/dashboard is divorced from http://my.yahoo.com). This is done because the application platform has numerous dropzones that it can run through, currently my.yahoo and the front page. The release schedule for the dashboard (and preview) is on a different schedule then the dropzones - and they are different teams. Integration of the updated application platforms needs to run through QA on those dropzones as well, and since they are different teams they have different schedules for release.

    preview is a nice way of testing out features before they go live on the dropzones - allowing developers to test changes to the platform so that when the integration is complete they can just push the upgrades live to take advantage of the new features.

    - Jon

    QUOTE (Matthew @ Aug 6 2009, 10:05 AM) <{POST_SNAPBACK}>
    I've been trying to test yml:include, and you're right, it doesn't seem to work on production (though it works on the preview). Is there any timeframe for this being pushed live? I don't want to have to sink a ton of time into getting this application to update through pushes on the backend if yml:include is going to work soon (and I can't see why it wouldn't; it's working on the preview already).

    Maybe someone can explain the logic of pushing this to the testing sandbox but NOT live?
    0

Recent Posts

in YAP