Yahoo! Developer Network Updates (Third Podcast)


This is the third “State of the Yahoo! Developer Network” podcast with Gene Crawford of unmatchedstyle.com. In this episode we talk about the new Yahoo! Firehose for accessing 1 million + social updates per day, the sketch-a-search iPhone search app and Yahoo! Entertainment iPad app, as well as reviewing updates and plans for YQL.

 

 

- Jonathan LeBlanc

  • Share/Bookmark


Using yml:include to create an automatically updating YAP small view


One of the biggest issues that many people have with the small view of a YAP open application is that the view is cached on Yahoo! servers and can only be updated with manual intervention from either the application owner or the application user. In the past, application owners had a few options for updating this small view. The most common were:

  • When the user visited the canvas view of the application the owner would have a setSmallView call set up to refresh the small view of the user (process described here: http://www.nakedtechnologist.com/?p=181. The problem with this is that it requires the user to go to the canvas view. Many users would just view their small view on My Yahoo! so the content of the app was either generic or stale.
  • The owner would set up a cron job to update the small view of their app users on regular intervals (process described here: http://www.nakedtechnologist.com/?p=220). The issue with this one is that the content will only be updated at regular times and will be stale for a user in between those times.
  • The owner would implement a yml:a tag to call a server-side script to update the small view of the user when the user clicked on the link (process described here: http://www.nakedtechnologist.com/?p=204). This relied on user interaction to function and in many cases links on the small view would need to be added just for this requirement.

Many developers, myself included, opted for a mix of all of the options above. This worked fairly well to mimic a dynamic small view, but having three solutions for a single problem was unwieldy.

 

Enter the yml:include tag
The purpose of this tag is to dynamically load content onto a page. This tag can be used in both the canvas and small views, but the real benefit to its use is the small view.

I would recommend looking over the documentation for yml:include as there is quite a lot of detail that a developer would find useful: http://developer.yahoo.com/yap/guide/include.html

The features that are most important to note here are:

  • insert – if a node id is specified in the insert parameter, the content of the include request will load into that node.
  • delay – the amount of time to delay the loading of the content (in milliseconds)

These parameters will help in setting up a dynamic small view for the user. Using these, I’ll go through two examples on how to use yml:include. The first will cover a simple single load case and the second will display how to build a continually updating small view set to update on a specific delay.

 

Simple Use Case – Single Dynamic Load
This first example will display a simple use case for yml:include. We will use the setSmallView call to insert an include tag into the small view of the current user.

 

The PHP layer to this is just to insert that yml:include tag the first time, and is only needed once. This will replace the cached small view of the user with the include tag. For my applications, I ran this in a cron job to update the small view for all users at once. Doing so replaced my need to constantly update the small view of my users on a daily basis.

 

The full details for setting up this example can be found here: http://www.nakedtechnologist.com/?p=181. This piece is the PHP layer that just sets the small view of the user with a yml:include tag and the div node that the content will be inserted into.

$html = '<yml:include params="training_sdk.php" insert="loadHere"></yml:include><div id="loadHere">REPLACE</div>';
if (!$yahoo_user->setSmallView($html)){
	echo "NO SMALL VIEW";
}

When the dropzone (my.yahoo) and application load, an AJAX GET request will be made to training_sdk.php. This file will return the content of the small view and then be inserted into the div with the id of “loadHere” (as denoted by the insert parameter). This allows us to generate whatever content we want within training_sdk.php and the small view will reflect that change as soon as the user loads the application.

 

Extended Use Case – Updating the Small View Every x seconds on a delay
Now we’re going to look into an extended use case for yml:include. This version will extend upon the basic example to refresh the small view automatically every 5000 milliseconds (every 5 seconds). We will start off with the same code that we insert into the small view to include the yml:include tag. From that point we take a look at the file that we capture the content of the small view from, training_sdk.php.

<yml:include params="training_sdk.php" insert="loadHere" delay="5000"></yml:include>
<?= time(); ?>

What we’re doing here is inserting another yml:include tag onto the page. Just like the first tag we are calling the same file, training_sdk.php, and inserting it into the same DOM node. The difference here is that we are delaying the load of this request by 5 seconds with the delay parameter. Following that all we do is display the current UNIX timestamp. What’s going to happen when this content is inserted into the small view is that the new yml:include will count down 5 seconds and then make an AJAX call to the same file and insert another UNIX timestamp and yml:include tag (which is delayed 5 seconds). So there we have it, we now have a small view that will update itself automatically every 5 seconds.

 

There’s only one catch here. There is a limit on the number of times you can call yml:include within a span of time. If too many consecutive yml:include calls are made, you will see the following error message:

 

error-243: maxIncludes limit hit for appid XXX

 

If you see this message, you have made too many yml:include calls within the particular dropzone. Currently the front page will allow unlimited yml:include calls and http://my.yahoo.com will allow 10 calls per session. My Yahoo! is looking into this at the moment so keep checking back to see if there have been changes with this tag. If you see this error, increase the delay on your yml:includes and that should solve the issue.

 

- Jonathan LeBlanc

  • Share/Bookmark


Yahoo! Talks at ConvergeSC in Columbia, SC


At the end of June myself and Robyn Tippins, the community manager for YDN, were out at ConvergeSC in South Carolina. There were a lot of great talks during this time and all have just been published to http://vimeo.com/convergesc/videos. I would recommend going through the entire gambit because there were some very impressive speakers available.

 

My talk was an overview of YDN technologies when used in conjunction with YQL. There was a main focus on YQL within this talk.

 

Jonathan LeBlanc: YQL and other Yahoo Tech from Converge SC on Vimeo.

 

Robyn covered a very intriguing story about her career and life moving towards marketing herself in her life. She finished up the day with a strong, engaging presentation.

 

Marketing Socially: Robyn Tippins from Converge SC on Vimeo.

 

- Jonathan LeBlanc

  • Share/Bookmark


YUI 3 Overview podcast with the folks at unmatchedstyle.com


Further to my post about the YQL podcast with the folks at Unmatched Style, here is the first video in the series where we discuss YUI 3 and the new upgrades to the library.

 

YUI 3.0 with Jonathan LeBlanc / Yahoo Developer Network from Unmatched Style on Vimeo.

  • Share/Bookmark


YQL Overview podcast with the folks at unmatchedstyle.com


While I was in South Carolina at the end of June for ConvergeSC, I had the pleasure of working with the folks at Unmatched Style to output a few podcasts talking about some Yahoo! technologies. This is the second podcast of the two where I go over the core features of YQL, with examples.

 

YQL with Jonathan LeBlanc / Yahoo Developer Network from Unmatched Style on Vimeo.

 

- Jonathan LeBlanc

  • Share/Bookmark


Open Asia Week 2008 in Taiwan


From December 14th to the 21st I was in Taipei, Taiwan for Yahoo!’s Open Asia Week. This was really a two part event week with a lot going on. I was there as a representative evangelist for YDN to speak about the Yahoo! Open Strategy as well as to do some in-depth code dives and meet some of the other properties. When I first arrived at the Yahoo! offices I was loving the decoration that they had set up on the walls…and who doesn’t love some really great wall art?

 

First, during the week we had a Yahoo! internal application development event. This tied in offices from Taiwan, Korea, Hong Kong and Australia, which was quite amazing to see. We were running video conferences between all of the offices during the numerous presentations on Y!OS, YAP, YQL, Blueprint, Open Mail, etc. as well as during the award ceremony and judging.

..and, in traditional Yahoo! fashion, everything gets branded with the Y bang:

On that Saturday, I had a chance to meet many external developers who had hacked on the different platforms, and gave a few back to back presentations while I was at it (slide deck attached below). There were some great presentations focusing on the Yahoo! Application Platform, and we also had one of the Wretch (yes I know – the name is lost in translation) girls there – I believe she was miss July.

 

View the event photos on flickr at:
http://www.flickr.com/photos/jcleblanc/sets/72157611588610596/

 

View the slides from the presentation:

 

Y!OS Overview and Deep Code Dive

View SlideShare presentation or Upload your own. (tags: strategy yahoo)

 

– Jonathan LeBlanc

  • Share/Bookmark


Gnip Interview at DEFRAG 2008 – Denver, CO


The second video interview I had a chance to host at Defrag 2008 in Denver, CO was with Gnip’s CTO Jud Valeski. Gnip is an extensible messaging system that allowed companies to access, filter and integrate data more easily from web-based APIs and services.

 

Gnips core service architecture is one of the offerings within the new Yahoo! Application Platform, accessible through YQL (Yahoo! Query Language). This integration allows users to mashup the Gnip service with that of the Yahoo! social directory, YDN APIs and external data feeds.

 

 

– Jonathan LeBlanc

  • Share/Bookmark


Yahoo! is Open


I had the chance yesterday to be working at the SNAP summit conference for Yahoo! when they announced that the Yahoo! Open Strategy initiative was being launched for developers to start working with the platform. The Yahoo! Open Strategy contains numerous facets, but is put in place to rewire Yahoo! into a completely different business model. Last week Yahoo! launched a new version of their profile system, which turns out to be one of the cornerstones of the initiative. The new profile system will be a centralized location for user information for (eventually) all Yahoo! products. This system will eliminate the need for users to maintain numerous different profiles across numerous different products on Yahoo!. In addition, this system is beginning to tie in all other Yahoo! products across the board. Vitality updates will be shared across numerous programs.

 

So, what does the new Y!OS initiative mean for developers? Well, the new Yahoo! Application Platform (YAP) will allow developers to create function rich Open Social applications utilizing sources of data across numerous Yahoo! properties. Currently developers can begin building and testing application as a precursor to the launch of the gallery and application small view. These applications will be able to leverage around 10 billion social connections among millions of users. Not only does your application have the opportunity to reach this vast user base, but monetization of the applications has already been considered. Shortly there will be a launch of a new YML ad tag. This new tag will allow users to integrate certain popular ad networks within the canvas view of their applications. No longer will users have to find some way of hacking ads into their applications…they will be able to leverage off of some of the same standards that they have been using on any of their other web applications / sites.

 

What Yahoo! is offering is a series of social API’s which may be used within client or server side code to access user profile information, PHP and ActionScript SDK’s for server side data interaction, YML tags that allow the integration of secured widgets / functionality and a wonderfully rich Yahoo! Query Language (YQL) that will allow users to capture data from many Yahoo! properties and all over the web.

 

I look forward to seeing everything that comes from this platform.

 

– Jonathan LeBlanc

  • Share/Bookmark