
« June 2008 | Main | August 2008 »
This is a cross-posting from the Yahoo! Search Blog.
Last month we opened up the Yahoo! Search Gallery to showcase all of the useful SearchMonkey applications that have been built by developers, site owners and Yahoo!. Today, we’re turning on a few of those applications for all users. Now, the Yelp, Yahoo! Local and LinkedIn Enhanced Results will automatically appear in the search results, eliminating the need for users to go into the Search Gallery to add them.
Why did we start with these applications? Before making an application “default on” we require a few things: access to the site’s structured data through semantic markup or a data feed, a well-designed and broadly useful application, and positive user metrics. To understand how a SearchMonkey app affects user metrics, we generally expose a small percentage of our users to a default-on experience and measure if and how it changes their usage. We started with Yelp, LinkedIn, and Yahoo! Local because they were among our first partners to share structured data. Our tests uncovered that users found these apps useful; in fact, in some cases, we saw a lift in click-through rate of as high as 15 percent.
In addition to testing a "default on" treatment, we also tested giving users the ability to add the LinkedIn Enhanced Result directly from the search results page. We'll continue to use this treatment as another way to promote high quality SearchMonkey apps to users.
While these are the first apps to be automatically included in the search results, they will certainly not be the last. We'll continue to work with our SearchMonkey developers to increase the exposure of other high-quality applications to the search results page in the months to come (so, make sure to submit your applications to the Gallery). Making it easier to find and add SearchMonkey apps is an important step in improving and enriching the search experience for our users.
In addition to turning these Enhanced Results on by default, we've also added "share-with-a-friend" functionality. By clicking the envelope icon on any Enhanced Result, users can now quickly send an email to their friends to share the app.
Let us know how these Enhanced Results are working and others you’d like to see in the comments below!
Amit Kumar
Director, Product Management
Yahoo! Search
Posted at 2:13 PM | Comments (0)
Speculative tech journalism is wrought with some pretty bone-headed predictions.
I’m fully aware of that.
Every time you toss your hat in the ring to offer your opinion, you’re opening yourself up to the possibility of being as wrong as the guy who said, “No one will need more than 637 kb of memory for a personal computer. 640K ought to be enough for anybody.”
Despite all of that, I’d like to tell you about what the future of the Web will be. What Web 3.0 might look like.
But first, some context:
Web 2.0, for all of the nebulously related concepts it represents, was ultimately made possible by Ajax. Asynchronous communication between the browser and servers (a la Ajax) provided the latency needed to recreate the look and feel of a regular desktop application. Not to argue the finer points in this minefield of buzzwords and strong opinions, but the emergence of rich user interaction changed everything. It got people to rethink what a website could be. It was a newer, shinier series of tubes.
Seriously, think back to the first time you saw Google Maps and your jaw dropped, or how Flickr’s Photo Organizer blew your mind. Can you imagine Digg being anything more than yet another Fark without that “digg it” button? And how about all of the little transparent things, like sorting a list by drag and drop, accordion lists, live previews, or page animations?
So much of the internet’s look and feel is powered by Ajax. Go back to a time before Ajax, and the internet was something completely different; it’s not implausible to think that another substantial technology could make Web 2.0 no more than a distant memory.
Right now, two technologies in particular, Gears (formerly Google Gears) and Yahoo! BrowserPlus, have amazing potential to completely reshape the future of internet.
If you’ve heard of Gears or BrowserPlus, chances are you've heard them positioned as competitors in one way or another. Another Google vs. Yahoo! showdown. Truth is, that’s not the case at all, or at least doesn’t have to be. After taking a look at what these technologies actually offer, we can see that they’re actually two distinct approaches to an exciting new direction for the web.
Gears recently celebrated its first birthday in style, by being released as open-source and dropping the Google brand. In Gears’ anniversary blog post, software engineer Chris Prince explained it this way:
"We want to make it clear that Gears isn’t just a Google thing. We see Gears as a way for everyone to get involved with upgrading the web platform.”
In fact, perhaps the best way to think about what Gears is, to borrow a phrase from a blog post from Dion Almaer, as “a bleeding edge implementation of HTML5”, as many of the core functionalities of Gears have been inspired by the HTML5 draft spec (and the reverse is true as well).
Gears provides several major components, including Database, which can read and write to a local SQLite3 database; WorkerPool, which parallelizes processing tasks; and LocalServer, which allows websites to cache resources like HTML, images, or video, and serve them from the local machine.
So what can you do with that? If you just went on what Google had to say about it from their examples, well…you might miss the point completely. That is to say, the demos aren’t exactly flashy. To be fair, it’s difficult to come up with trivial examples that encapsulate such a nontrivial range of functionality.
To show what’s possible with Gears, let’s imagine what your favorite sites would look like enhanced by Gears:
As I said before, if you think back to how Ajax changed the way people could interact with websites, much of it is completely transparent. For instance, deleting items in a list with real-time feedback is so pervasive that it became an expected behavior. Just as that doesn’t lend itself to an impressive demo, I can see a lot of Gears’ functionality becoming equally pervasive, yet remaining invisible to the normal user. But as you know, Ajax has a flashier side too, which is where Yahoo! comes in.
Back in May, Yahoo! announced BrowserPlus, a technology poised to blur the lines between the browser and the desktop. Unlike Gears, which provides a single underlying framework, BrowserPlus is made up of individual modules, called services, which can be installed and updated on the fly.
If you haven’t done so already, you should check out some of the BrowserPlus demos firsthand to get the full effect of what’s possible.
PhotoDrop is a good example of how BrowserPlus services interact. Using the DragAndDrop service, users are able to drag photos from their desktop directly into the browser window. The ImageAlter service hooks in with ImageMagick to resize, crop, and apply filters to your photos instantly. When you’re done editing your photos, the FlickrUploader tool will take care of adding them to your photostream. Putting all of these services together creates a new, rich user interface that just isn’t possible with Ajax alone.
BrowserPlus comes with an assortment of built-in services you can build on, including one for text-to-speech, one that provides secure cross-domain JSON requests, and one that ties into local notifications like Growl for the Mac, or its Windows counterpart, Snarl. But what’s really exciting is that BrowserPlus provides its own Ruby interpreter, which gives developers the power to build their own Ruby-based services.
For now, BrowserPlus is only available to Yahoo! properties, but developers are able to test out the APIs locally. The reason for this limited release is explained in the FAQ:
"Once we’re confident that the system is safe for users when hosted on any site (even potentially malicious sites), and that users have all the proper controls over use of BrowserPlus on their computer – we’ll open it up. The “sneak peek” is a way to balance the desire for openness and the risk of exposing users to a new dynamic web-enabled software model."
BrowserPlus has been criticized by some for its lack of openness, but there are good reasons for Yahoo! to play it safe. Yahoo! is known and trusted for its commitment to providing a secure online experience to its users. With BrowserPlus, Yahoo! has the ability to immediately restrict services if they’re found to pose a security risk. Pragmatically speaking, if a technology is going to provide such powerful capabilities to developers, a trusted gatekeeper like Yahoo! is ultimately what it takes to ensure that your machine is safe.
With their respective design goals in mind, it doesn’t make sense to look at Gears and BrowserPlus as competitors. Sure, both have an intersecting feature set, including desktop integration, and automatic software updates, but that’s where the similarities end.
Gears is built for the back-end, providing a solid foundation of core technologies to the browser. Being open-source software suits it well too, just as the W3C itself was started as a way to open the process of web standard adoption.
BrowserPlus, on the other hand, has amazing potential for the front-end in a way that’s only possible because of its modular architecture. It’s based upon Yahoo!’s strong reputation for privacy and security, which will ensure that users can feel safe trying out new things online.
Put the two together (BrowserPlus + Gears), and there’s a chance you’ll rip a hole in the space-time continuum, or something-- they’re just that awesome. Seriously though, check out what the fuss is about now, and get a leg up on this Web 3.0 thing.
Mattt Thompson
Technical Evangelist
Yahoo! Developer Network
Posted at 12:00 PM | Comments (9)
Barcamp Malaysia was a couple of wonderful days of geek-tech experience, the sort of which never really experienced in the capital city, Kuala Lumpur. An estimated 200 people were crowded into relatively small training facilities near the iconic Petronas Twin Towers from 26th to 27th July 2008, many of which was their first experience of a Barcamp. Despite being the first Barcamp held in Malaysia, the organizers were spot on in coming up with the right mix of technical, entrepreneur and irreverent sessions, with lightning talks, werewolf games and seriously tech talks like multilingual web sites with Drupal and wireless network hacking.

While many of the sessions and attendees were from Malaysia, there was a sizable contingent from neighbouring Singapore, giving it more South-East Asian feel. Yahoo! was represented by Henry and myself from Engineering and Jeremy from the Communications team. I did a session on SearchMonkey, adapted from slides provided by the SearchMonkey team (thanks Paul Tarjan!) and we had pretty good response from the crowd, some of whom even blogged about it (http://amanz.my/2008/229/barcampmalaysia-yahoo-search-monkey/ and (http://www.rickysoo.com/index.php/2008/07/27/first-experience-in-barcamp-malaysia/). We also did a raffle for 2 iPods, for developers who submitted their details to us for future outreach activities.
All in all Barcamp Malaysia was a roaring success and I'm proud that Yahoo! is a part of that success.

Sau Sheong Chang
Engineering Director for Yahoo! South-East Asia
Posted at 4:21 AM | Comments (1)
We are excited to announce the new Zimbra Desktop Beta 3. This is a cross posting from the Zimbra Blog
- Tom Hughes-Croucher, Yahoo! Developer Network
We’ve aimed to blur the line between a Ajax web-client and a conventional desktop application, and this release is a leap towards reaching that goal. If you’re just joining us here’s the best part: It’s an offline capable client so you can take your data with you whenever you don’t have internet access - then sync any type of interaction that you can do in normal webmail access when you get connected again. So many cool new things I don’t know where to begin - the Zimbra Desktop team has been very busy since Beta 2.

They’re here, and your tasks, documents, & briefcase items can now follow you wherever you may roam. If you’re already using Zimbra Desktop against a Zimbra Collaboration Suite server these will show up on next edit or item move via delta sync - while a full account sync or reset will pull in prior items. Personally, having briefcase items available offline is a major plus - as offline calendaring using the same AJAX web-client interface has already long since won me over.
Yahoo! Mail users rejoice - There’s now IMAP access through Zimbra Desktop to all free, plus, and business accounts. You didn’t read that wrong. Normally only Plus accounts have POP access, but as a perk when using Zimbra Desktop the mail is synced via IMAP; which is a much better protocol for keeping your mail organized - and yes it’s available to free accounts as well. Hook-up your @yahoo.com account or go grab one of the new @ymail.com and @rocketmail.com addresses. (Note that some apps don’t sync to Yahoo! servers yet so the data is local.)
Mailto: link handler - For Mac and Windows protocol handlers allow you to click on a mailto: link in any browser, and it will bring-up Zimbra Desktop’s composer with a javascript call. If Prism is not already running, it will start the web-app as well with a url call, then pop up compose. We don’t want to be accidentally invasive, so to turn this feature on you’ll have to check the box in global preferences to make it the default mail client on your computer.
Icon badging - To keep you informed, we now display the total number of unread messages across all-inboxes; in the dock icon for Mac and on Windows there’s now a tray icon, which changes to a new mail image if there are unread messages.
Mac & Windows users may just decide to toss out their toasters, because we now have mail & appointment notifications built-in. (Zimbra Toaster still serves as a lightweight new-mail checker with quick flag and delete features. There’s also some community contributed Linux solutions like Zimbra Notify.)
Zimbra Desktop on Windows now takes advantage of the native tray icon bubbles and on Mac of course we use Growl. (You need to install Growl separately which is quite straightforward.) You’ll also need to enable “show pop-up notification” under both Mail and Calendar tabs in preferences, since by default notifications are turned off.
The latest versions of Zimbra Collaboration Suite have also introduced browser title & favicon flashing, mail & account tab highlighting, as well as sound notifications - which have been ported to Beta 3 as well. So there’s no excuse for not noticing a new mail if you’re at your computer. Ok, we can still think of a few excuses - but note that the pop-up notifications are per account settings; so you can have some accounts on and some accounts off if you should need to ‘forget about’ that important meeting
In-case you’ve never tried Zimbra Desktop, or are still using an Alpha, and never tried it out during Beta 1 or when we served-up Beta 2: There’s also easy setup menus for setting up Zimbra Server, Yahoo! Mail, GMail, AOL, or any other IMAP/POP accounts you want to use. For Beta 3 we’ve thrown out JavaMail and wrote a brand-new robust IMAP/POP client-engine from scratch.
Icon menus - On the Mac dock icon and Windows tray icon, we now have right-click menu items to check for updates and shutdown the background service.
Windows minimize to tray - Clicking on the “X” now only minimizes prism window to tray. To quit prism, right click the tray icon and choose “Quit”.

This release makes Zimbra Desktop available to a quarter-billion Yahoo! users with support for 20+ languages. The default theme is a revamped Yahoo! skin to help keep the interface familiar as it spreads to those millions of users. Hope you enjoy, and as we advance upon a GA release: Thanks to the Zimbra Community for all your bug corrections and feature requests so far. The Mozilla team developed a few of these new Prism features from scratch just for us, you can read more about some of them here. But stay tuned, we’re gonna have a closer look under the hood to see how we implemented these features and the inner workings of Prism + Zimbra Desktop in a future blog post.
If it’s not available to you via auto-update yet, you haven’t been building from source, or are even just discovering it for the first time, you can download it here for Mac, Windows, & Linux.
Posted at 12:47 PM | Comments (0)
While Tom and a bunch of other Yahoos are down in Portland for OSCON, I'm in Ottawa this week for Linux Symposium. We're almost done with day two of the conference, and it's been excellent so far.
While most talks delve into the kernel, or system level features of linux, there's also decent coverage of Performance, Security, Mobile, UI, Web Applications, and Green Computing. I'll be doing a tutorial on CVS and Bugzilla this Friday, and another on Yahoo! Pipes on Saturday.
If you're at the conference and you spot a guy wearing Yahoo! gear, come say hi. I might even have some swag if my luggage gets here in time.
Philip Tellis
Yahoo! Exceptional Performance
Posted at 2:33 PM | Comments (0) | TrackBack
This week we're at O'Reilly's Open Source Convention (OSCON) in Portland, OR. There are lots of great talks -- from how Google does code reviews to XMPP with Flickr and FireEagle to the state of OpenID.
We're really excited about all the cool stuff that's going on. If you're at OSCON, we really hope you'll come and hang out at our booth to see the latest from Zimbra, Hadoop, YUI, etc.
Tom Hughes-Croucher
Yahoo! Developer Network
Posted at 9:27 AM | Comments (1)
Yahoo! Small Business is focused on making Small Businesses successful by providing them with top web hosting and e-commerce hosting solutions.
We are seeking out interested web site designers and application developers to help us evaluate new features and set the direction for future development. If you are an experienced web site designer and would like to get in on the ground floor of new and exciting developments on our hosting platform, please send an email to the following address:
Participants will spend approximately 1 to 1.5 hours in an individual feedback session that can take place via a conference call or in-person meeting in Sunnyvale. Compensation will be provided.
Please include the following contact information:
1. First Name, Last Name
2. Email Address
3. Phone (optional)
4. Preferred contact method, time.
5. Skills: Website Designer (tools?), Application Developer (tools?), Links to previous work.
Posted at 4:52 PM | Comments (0)
I just arrived in the Silicon Valley to work here for a month and synced up with the local colleagues to compare our notes on how we organize developer days, unconferences and our general outreach to universities and partner companies. One of the things I had already expected but didn't get confirmed is that there is a mashup fatigue.
I've felt that, too, and wondered what to do about it. In a blog post I wrote some time ago I was asking if it is time to use mashups to solve real life issues and the feedback was amazing!
I worked with some charities that deal with inclusive design and learned from them which kind of barriers keep people from using things we take for granted on the web: Facebook, Flickr, YouTube and so on. In a lot of cases there are only a few small details that keep out blind, mobility impaired or sensory impaired users.
Asking the maintainers of web sites to change these is quite an uphill battle - everybody is busy - it is a rule in our job. However, a lot of companies offer APIs, data feeds and other means of accessing and remixing their data.
Taking some of the information gathered in user testing by the partner charities I took the YouTube API to build an easy interface to YouTube and the Flickr data feeds to build an easy interface to Flickr (complete with step-by-step instructions).
I've shown these on several developer evenings and also at Mashed08 - an open hack day in London, England. There I created a similar hack to access presentation transcripts of SlideShare and asked the audience if a hack day for good - removing accessibility barriers with mashups - would be of interest.
I had several people show interest and actually impressed the Judges enough that Channel4 - a UK TV Channel - sponsored me to start an event like that.
And now it is on - Scripting Enabled is a free two day event in London, England in September where we'll have one day of learning about inclusion barriers and a second day of mashing up data and build alternative interfaces. If you are in the area and want to come, make sure to book your tickets.
I am planning to take this show on the road and include hacks created outside the event. All the presentations will be available as Creative Commons licensed information and the hacks as Open Source. So far I got several sponsors, but I am still looking for support.
Over here, I might have one Bay Area University tempted to host something similar and some people in Seattle to follow-up a Scripting Enabled session there later in the year.
What do you think? Mashups and hacking are an amazing positive force, and with the right information we can use them to make the web more inviting to everybody, regardless of physical ability. Good plan?
Christian Heilmann
Yahoo Developer Network
Posted at 4:44 PM | Comments (0)
We are testing a new template design for Enhanced Result applications. This new template contains two key design improvements that stem directly from recent Yahoo! user research. If our tests are successful (we're exposing 5% of our traffic to this new template), we'll roll it out to all users in the coming months. Developers do not have to perform any actions to take advantage of this new redesign; all Enhanced Result applications will upgrade automatically. Infobar applications will be unaffected.




Key differences include:
Images appear to the right of the abstract, rather than the left. Our latest eye-tracking studies indicate that moving the image helps users selectively discover it — without disrupting their ability to scan the search result page. While we know that users do like relevant images, we also know that images can increase the risk that the result resembles an advertisement. Shifting the image to the right reduces the perception of the result as an advertisement, and caused users to report noticing the images more. The new design also helps users engage the image only when they feel it is relevant.
Links appear in a horizontal row, rather than as a vertical column next to the image. Research indicates that deep links are more discoverable when presented separately from the image. Additionally, moving the links into a horizontal row provides more real estate for the summary and key/value pairs.
In a subsequent post, one of our researchers will dive into the data behind this redesign in much more detail. Meanwhile, stay tuned — we'll let you know when the new designs are about to go live!
Evan Goer
Yahoo! SearchMonkey Team
Posted at 10:49 AM | Comments (0)
Yesterday I went to AbilityNet, a charity dealing with web accessibility and publishers of the "State of the E-Nation report", which tested several social networks in terms of accessibility for users of assistive technology. My talk covered Ajax and Accessibility and was part of their "Rich media and latest trends in accessibility" workshop.
Topics covered in the talk where an explanation of Ajax and the accessibility issues with it, solutions for these problems like refreshing the cache of screen readers and ARIA and an explanation how to use the web2.0 mindset and crowdsourcing to remove barriers to consumption of web content.
I also talked about the accessibility hacking event Scripting Enabled in September, the Easy YouTube hack and best practice ideas on how to make online video more accessible.
The slides are available on SlideShare:
Read "Again with the Ajax accessibility" with Easy SlideShare
You can also listen to the audio recording of the talk (GarageBand and built-in microphone, so there might be glitches) and please bear in mind that I had 4 hours sleep the night before as we had an international YDN meeting at the same time.
Christian Heilmann
Yahoo Developer Network
Posted at 2:09 AM | Comments (0)
Last week we launched our new search web services platform, Yahoo! Search BOSS, and pointed to a few folks that already started using BOSS. We mentioned that Daylife is integrating the BOSS API as part of the Daylife To-Go customization wizard. They're also encouraging participants in their DayPI Developer Challenge to integrate the BOSS API in their mashups.
The challenge awards developers who build the most interesting, original and innovative applications using the Daylife API. As part of the challenge, Daylife will be also be awarding a bonus prize of $2,000 for the best BOSS/Daylife Mashup.
If you have an idea to share, sign up for a Daylife account, build an app and submit your mashup. Make sure you tag your entry with 'boss' and 'contest08' to be eligible for both the Yahoo! BOSS-DayPI mashup prize and the Developer Challenge.
The challenge ends on July 25th, so get your entries in quick!
The BOSS Team
Posted at 10:17 AM | Comments (0)
We're working hard to increase the value (ie cowbell) that YDN can offer; our beautiful redesign is part of that effort. Along those lines, I want to introduce you to our latest offering, message boards. (struggling here not to include the obnoxious blink tag)
If you haven't been online since 1995, message boards are tools that people use to connect with each other. They differ from social networks in that they are useful. ;) We like them because they allow us to brag about how hip, retro and old skool we are here at YDN. Yo!
Anyhoo, we're super excited about our new message boards and we really hope you like them. Also, as a heads up, we're not removing our existing Yahoo! Groups anytime soon, and possibly not ever, because we understand that some people like email better and some would rather have the organization and structure that a board offers.
So, if you don't mind, we'd like you to come in, introduce yourself, and talk amongst yourselves. We covet your feedback!
Robyn Tippins
Community Manager, YDN
Posted at 5:02 AM | Comments (1)
Romania just had its first Yahoo! developer invited to speak at an event, at WebCamp: Connected Life's Ricardo Varela went to Bucharest last week, on Wednesday, to tell Romanian developers what Yahoo! does related to Mobile products.

Photo credit Bobby Voicu
Though we thought it might be a little bit early, since Romania's Internet mobile market is not that developed, the interest was quite high, Ricardo getting lots of questions after the event, talking to people interested (including Mihai Dragan, the manager of mobione, the company that created Yahoo! Maps for iPhone and iPod Touch). Maybe the best feedback I had was from a developer that said to me: "You know, I am not interested in mobile, but after Ricardo presentation, I will go and take a look, because it looks really interesting now".
The venue was also interesting, since the event took place in a night club, we also had some foosball tables (Ricardo is a good player, btw) and had free pizzas :D Everything was great, including the nice people we met there.
Photo credit Bobby Voicu
Among the presentations there, I really enjoyed the presentation Vladimir Oane did about the semantic web (see it here) and Victor Kapra's presentation about online communities (not available, yet).
Below you can find Ricardo's presentation (download here) and you can go here to see/listen an interview he gave to an online radio/tv station and some more photos here.
Bobby Voicu
Community Manager for Yahoo! in Romania
Posted at 4:40 PM | Comments (0)

Search Monkey arrived in Paris with the sound of flying toy monkeys screeching as they flew through the La Cantine café. The festive, attentive group gathered to hear about the new Yahoo! Search feature and to fling the little guys across the room.
La Cantine is a cross between an Internet Café and a co-op workspace. Its central Paris location provides space to collaborate, learn, share, and explore the future of technology.

The Yahoo! Developer Network and local Yahoos joined forces to explain Search Monkey; an open interface for providing enhanced search result presentations. Participants were able to start building Search Monkey applications in small groups as well as learn about Microformats.
Search Monkey Applications
Search Monkey allows any developer to create enhanced presentations for a web site when it appears in Yahoo! Search. The standard result displays the page title, description, and web site address. A Search Monkey powered result could contain photographs, address, contact information, deep links to particular pages, and additional information from related pages. This makes search result pages more engaging for users.
Search Monkey applications do this by defining small bits of data that should fill the space. Search Monkey automatically grabs microformatted data on the page, as well as providing the standard Yahoo! Search indexed information. The programmer can also define custom data by scraping the desired page or using web services.
Search Monkey opportunities in France
Museums - Provide images, titles, artist, date, and other information for their objects when they appear in search results.
Traffic - Provide traffic conditions, rates, times, and tourist information when a city or train or metro route appears in the search result pages.
Restaurants - Directories could provide ratings, addresses, phone numbers, and summaries.
Theater - Cinema, Theater, Opera results include times, synopsis, rating, and location information.
Sports - Tour de France and other sports include player information, team scores, upcoming events, and standings.
Ted Drake
Web Developer - Global Finance
Posted at 10:50 AM | Comments (1)
Today we are releasing a new version of the Yahoo! Local API (V3), that gives developers a key new feature – the ability to search for convenient points of interest for a given user defined route. For example, as you are driving from San Francisco to Sacramento, you could search for a Starbucks or for a hardware store. This new API functionality is already in use by our partner, Dash Navigation, who announced its availability for their Internet-connected GPS navigation system on June 30.
To make this new feature possible, we have added a new API parameter, “route”, that is a series of latitude/longitude coordinates. The first pair of coordinates is the starting point, and the final pair of coordinates is the ending point. The value of the route parameter is defined as follows:
lat1 long1,lat2 long2,...,latn longn
Here is an example of a simple route from San Francisco’s Fisherman’s Wharf to the Ferry Building. Note that latitudes and longitudes are separated by spaces.
37.80971 -122.41025,37.80831 -122.41018,37.79456 -122.39320
A route is limited to 100 coordinates or 100 miles. Routes having more than 100 coordinates or longer than 100 miles will return an error status.
Selection of coordinates for the route will affect results. Pick ones that both define the path of travel and where you want to find points of interest. For example, you could include freeway off-ramps or major intersections. To cause a location on or near a route to get preference, you can specify a location in addition to the route.
This feature was a hack that Ron Gutman, Marvin Lam, and I first conceived of during our Q1 Local Hack Event, which is an extension of the broader Yahoo! Hack Program. Since then, we've been able to put the finishing touches on it and hope you can put it to good use!
George Perry
Yahoo! Local
Posted at 10:27 AM | Comments (3)
Intrepid coder Bart Teeuwisse has written up an excellent technical account of creating "Tweet", a beautifully designed SearchMonkey app for Twitter. From a performance standpoint, writing a Twitter SearchMonkey app is particularly challenging, as Bart explains:
It turns out that execution speed of a SearchMonkey is key. To make the SearchMonkey Gallery a presentation monkey such as Tweet has to complete within a fraction of a second. Any call to fetch 3rd party takes too long to satisfy this requirement. Certainly calling Twitter's API whose fluctuating response times are all over the map.
Secondly, Twitter's profile API call takes a user ID, which first has to be extracted from Yahoo!'s indexed data. An additional data SearchMonkey can do that and whose output is the input to Tweet's profile feching data monkey. However, this chaining of data monkeys makes Tweet only slower.
Fortunately, Bart hit on a really clever solution: a mashup with Google App Engine, which acts as a simple proxy cache for Twitter data, which SearchMonkey can then consume. The result (after also adding Bart's own FriendNet infobar app):

Not only is the caching a nifty way to smooth out the API response times, but it also helps reduce the number of (rate-limited) API calls required. Read more about it at Bart's place.
Posted at 11:17 AM | Comments (0)
Whether you’re an experienced mobile developer or a newbie in the space, your number one headache is the diversity of mobile platforms and devices -- thousands of devices with different screen sizes and resolutions. Different mobile web browsers require different techniques for rendering and supporting CSS and JavaScript. Did you know that including too many images could cause the mobile OS to crash if it runs out of memory to handle them?
If decide to develop for a mobile platform (non-web) instead of a mobile browser you are still faced with the same problem of choice: Should you develop for the iPhone, Nokia 60 Series, Blackberry, or just write a J2ME application?
Now things have changed. The release of Blueprint 1.0 technology offers an alternative solution.
Blueprint is the name of Yahoo! Mobile’s new platform and the new descriptive mark-up language created to make your mobile development experience as easy as possible. Blueprint has been released alongside the beta launch of Yahoo! Go 3 (beta), the latest version of Yahoo!’s popular mobile software.
The apps you create with this new framework are called widgets. Blueprint makes it easy to create consistently great-looking, well-behaved widgets, so you can concentrate on the content and features of your app.
Within the Blueprint framework, you can also write smaller applications called snippets. Think of snippets as very simple widgets with specific functionality. The differences between widgets and snippets are explained in the specifications available as a PDF here.
Blueprint is a declarative mark-up language: think of it as XHTML. In this 1.0 release, you cannot program loops or conditional statements (this functionality is planned for later), but you can use your preferred server-side programming language (php, python, j2ee, .net, …) and your output will be in Blueprint. Blueprint lets you specify the elements you want rendered on the mobile screen and how they will interact with the user. Because Blueprint is based on the XForms standard, you can easily work with forms, and include a great number of predefined elements with complex user interfaces. If you want to render a map or add some pagination to your application, it’s as easy as saying “add map here.”
You can write Blueprint code once and run it in any device - it’s that simple. The Yahoo! Go 3 (beta) client is a J2ME application supported by almost every device. In fact, some native versions actually improve performance in popular operating systems. Your application will work everywhere the Go 3 client works on. As you create your application, the platform automatically creates a web version, so you can point any mobile browser to your app, and it will work. The platform is intelligent enough to know your device and browser and will optimize the appearance of your app for the handset.
A widget consists of two parts. The first is a compressed zip file that includes the following elements:
This first part is hosted on Yahoo! servers and is uploaded using an simple web form.
The second and most important part is the widget code. You can host your widget anywhere,, as long as it’s publicly accessible. You can use whatever technology you want to write it. Your output will be the Blueprint language. One condition: You must be able to generate a specific content-type via some HTTP header. We'll get back to this a little later.
You can download the SDK (Software Development Kit) at http://mobile.yahoo.com/developers/download. Here’s what you’ll find:
Let’s take a simple example--displaying the content from the RSS feed for the YDN blog. Note: There’s an RSS snippet that already does this, but since most widgets need to parse some kind of XML, , this is a good example to start with.
First,create the XML file that describes your application, config.xml, and pack the images that we are using as icons. Instead of starting from scratch, go to the Blueprint 1.0 SDK you downloaded and copy the whole folder under Samples/Hello World/submission. Edit the config.xml and make the obvious changes to the name of the application and the author. Now, focusing on the important stuff, make the widget element look like this:
<widget base="http://_YOUR_SERVER_/_YOUR_PATH">
<preview>
<icon>ybang</icon>
<label>YDN blog</label>
</preview>
<shortcuts>
<item default="true">
<label>YDN blog</label>
<href>index.php</href>
</item>
</shortcuts>
</widget>
One of the challenges of developing mobile applications is to have them look good on any device. Image size is always a challenge. See that <icon> element in the code above? Now take a look at the resources/images folder. See the naming convention on the icons? Those icons are named after the identifier used in the <icon> element, as well as their width and height. Based on screen size, the platform will try to get the size that is the best match. You can include up to five different sizes. The optimal relationship between image size and screen type is detailed in the Blueprint specification manual included in the SDK.
If you want custom images for your widget, add them to the resources/images folder following this naming convention and change the value of the <icon> element in the config.xml file.
We are going to develop our example application on PHP. Well, actually, we are going to use XSLT. I’ve developed about ten widgets so far, all with XSLT. When it comes to XML transformations, XSLT is your friend. With a simple XSL template, it’s a piece of cake to get an RSS or API response, (usually XML), and transform it to Blueprint. PHP helps us set the HTTP headers and put together the XML files with the XSLT sheets.
The two first lines in our code set the content-type of our output and the cache control. This last is very important for the Java client to work properly.
The rest is pretty obvious. We take the feed, the XSLT, and we put them together:
<?php
header( "Content-Type: application/x-ywidget+xml" );
header( "Cache-Control: no-cache" );
$xsl = "ydn.xsl";
$xml = "http://developer.yahoo.com/blog/index.xml";
$xslt = new XSLTProcessor();
$xslt->importStyleSheet(DOMDocument::load($xsl));
echo($xslt->transformToXML(DOMDocument::load($xml)));
?>
And this is how the XSLT looks:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="XML" encoding="utf-8"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system=http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
indent="yes"/>
<xsl:template match='//channel'>
<page>
<content>
<module>
<header layout="simple">
<layout-items>
<block class="title">YDN Widget</block>
</layout-items>
</header>
</module>
<xsl:apply-templates select="item" />
</content>
</page>
</xsl:template>
<xsl:template match="item">
<placard layout="card" class="link">
<layout-items>
<image resource="ybang"/>
<block class="title"><xsl:value-of select="title"/></block>
<block class="description"><xsl:value-of select="pubDate"/></block>
<block class="subtext"><xsl:value-of select="category"/></block>
</layout-items>
<load resource="{link}" event="activate"/>
</placard>
</xsl:template>
</xsl:stylesheet>;
As you can see, there is no rocket science here. Take a look at the Blueprint spec to understand each element and its variations. Looking at the code above you can see some nested containers (page, content, section, placard…), some automatic layout managers, blocks of text, images, and actions (load).
Go to http://mobile.yahoo.com/developers/test and click the yellow “Test Widget” button in the upper right. You’ll be presented with a form to upload a file. Put your config.xml file, your resources directory and, optionally, your gallery.xml into a folder and compress that folder in a zip file. Upload this zip file.
You will need a valid Yahoo! ID. Only this Yahoo ID will have access to the widget until you publish it on the gallery.
Now, go to http://beta.m.yahoo.com. At the top right corner, you’ll find three icons. The one in the middle, with the gears, takes you to the widget zone. Scroll down to the bottom to find your brand new widget.
From your mobile device, you can do the same using your browser. If you downloaded the Yahoo! Go v3 client, you will see your recently created widget in the carousel.
Well, that’s pretty much it. Take another look at the spec, learn some more about the possibilities Blueprints offers, and play around.
Oh, I almost forgot - you probably want people to use your application, right? Here’s the deal: make sure you created your gallery.xml file when you packaged your application. Go to http://mobile.yahoo.com/developers/submit, follow the “Submit Widget” button, accept the terms of service, and upload your zip file again, this time to the public gallery. Once it’s approved, your widget will be listed on our public gallery, where it can be reached by millions of Yahoo! users.
Jose Palazon , Mobile Software Engineer Yahoo! London
Posted at 8:38 AM | Comments (1)
iPhone is creating a craze in Romania, as it's done all over the world. Since Yahoo is very popular in Romania and, moreover, Yahoo! Maps is considered the API to choose for the detailed view of Bucharest, Mobi One and MB Dragan thought of creating the Yahoo! Maps application for iPhone and iPod Touch.
Here is what they have to say about it:
We've created Mobi One Maps because Google Maps (the application available for iPhone) did not have a detailed, street-level map of Bucharest. To do this we used Yahoo! Maps and Mootools.One of the issues we encountered was trying to modify the navigation buttons, since the existent documentation did not mention anything about this situation. So as a solution we used map.panTOXY() as follows:
window.addEvent('domready', function() { var container = map.getContainerSize(); var delta = Math.max(container.width,container.height) / 2; var move_up = new YCoordPoint(container.width / 2, container.height / 2 + delta); var move_down = new YCoordPoint(container.width / 2, container.height / 2 - delta) var move_left = new YCoordPoint(container.width / 2 + delta, container.height / 2); var move_right = new YCoordPoint(container.width / 2 - delta, container.height / 2); $('move_up').addEvent('click', function(event) { event = new Event(event).stop(); map.panToXY(move_up); }); $('move_down').addEvent('click', function(event) { event = new Event(event).stop(); map.panToXY(move_down); }); $('move_left').addEvent('click', function(event) { event = new Event(event).stop(); map.panToXY(move_left); }); $('move_right').addEvent('click', function(event) { event = new Event(event).stop(); map.panToXY(move_right); }); });In a previous version we've tried to navigate using the iPhone events (tap, drag and pinch), but through GPRS the map was moving very slow so we had to rule out this solution.
For all the visual effects we've used MootoolsFX.
The application had been accepted by the apple.com editors and posted as "featured web app" in the Travel category for 5 days, now being one of the most popular application from this category.
Bobby Voicu (Yahoo! Romania) and Mihai Dragan (MB Dragan)
Posted at 6:00 AM | Comments (1)
[This post originally appeared on the Yahoo! Search Blog]
Today, Yahoo! Search is taking another step in extending the Yahoo! Open Strategy with the launch of Yahoo! Search BOSS, a web services platform that allows developers and companies to create and launch web-scale search products by utilizing the same infrastructure and technology that powers Yahoo! Search.
Our goal with BOSS (Build your Own Search Service) is simple – foster innovation in the search landscape. As anyone who follows the search industry knows, the barriers to successfully building a high quality, web-scale search engine are incredibly high. Doing so requires hundreds of millions of dollars of investment in engineering, sciences and core infrastructure – from crawling and indexing technology to relevancy and machine learning algorithms, to stuff as mundane as data centers, servers and power. Because competing successfully in web search requires an investment of this scale, new players have effectively been prohibited from delivering credible alternatives to Yahoo! and Google. We believe the BOSS platform will begin to change that.
So what is BOSS?
BOSS is a new, open platform that offers programmatic access to the entire Yahoo! Search index via an API. BOSS allows developers to take advantage of Yahoo!’s production search infrastructure and technology, combine that with their own unique assets, and create their own search experiences. While search APIs have been available for some time, BOSS removes many of the usage restrictions that have prevented other companies from using them to build innovative new search engines.
Here’s a quick summary of what’s available today:
• Ability to re-rank and blend results – BOSS partners can re-rank search results as they see fit and blend Yahoo!’s results with proprietary and other web content in a single search experience
• Total flexibility on presentation – Freedom to present search results using any user interface paradigm, without Yahoo! branding or attribution requirements
• BOSS Mashup Framework – We’re releasing a Python library and UI templates that allow developers to easily mashup BOSS search results with other public data sources
• Web, news and image search – At launch, developers will have access to web, news and image search and we’ll be adding more verticals soon
• Unlimited queries – There are no rate limits on the number of queries per day
These capabilities are really just a first step – we’re already working on expanding the API functionality and providing more access to Yahoo! Search Technology.
In addition to a self-serve API, we’re also partnering with a handful of Internet companies with large user bases or unique assets to collaboratively develop next gen search products using Yahoo!’s full suite of search technology. To learn more about BOSS Custom, click here.
What’s in it for Yahoo! and partners?
Why would Yahoo! open up its search infrastructure and technology to developers, entrepreneurs and companies who could use it to compete with us? It’s really quite simple. First, we believe that being open is core to Yahoo!’s future success – opening our network, opening our own search experience via SearchMonkey, and now opening our search infrastructure via BOSS – will lead to innovation both on Yahoo! and powered by Yahoo!. For BOSS, we see a virtuous circle in which partners deliver innovative search experiences, and as they grow their audiences and usage we have more data that can be used to improve our own Yahoo! Search experience and as a result, improve the quality of results our BOSS partners and their users get. Second, we do see new revenue streams from BOSS. In the coming months, we’ll be launching a monetization platform for BOSS that will enable Yahoo! to expand its ad network and enable BOSS partners to jointly participate in the compelling economics of search.
What’s in it for users?
More choice. BOSS will enable a range of fundamentally different search experiences. These new search products will provide value to users along multiple dimensions, such as vertical specialization, new relevance indicators and ranking models, and innovative UI implementations. Our hope is that the resulting expansion in user choice will have the effect of fragmenting the increasingly consolidated search market in much the same way that cable TV dramatically increased programming choices for television viewers.
Kick the tires and get started
Want to kick the tires on what BOSS-powered search could look like? As part of an alpha program, we’ve been working with a handful of start-ups and developers who have already begun using BOSS. Here are a few early examples of what’s possible with BOSS:
• Me.dium, a start-up that’s built an innovative collaborative browsing product used BOSS to build a web-scale search engine that leverages its real-time surfing data. By combining the depth of the Yahoo! Search index with its insight into where users are browsing, Me.dium can provide its users with a unique buzz-based search experience.
• Hakia, a semantic search start-up, is using BOSS to access the Yahoo! Search index and dramatically increase the speed with which it can semantically analyze the web. With BOSS providing this important infrastructure, Hakia is able to deliver a language search experience that isn’t available from any of the “big three” search providers or other semantic search engines.
• Daylife To-Go is a new self-service, hosted publishing platform from Daylife. Anyone can use this platform to generate customizable pages and widgets. Daylife To-Go uses the BOSS API platform to power its web search module.
• Cluuz, a next-generation search engine prototype, generates easier-to-understand search results through semantic cluster graphs, image extraction and tag clouds. The Cluuz analysis is performed in real-time on results returned from the BOSS API.
To learn more about BOSS and get started using the API, visit the YDN. BOSS is open to all – so check out the documentation, get a BOSS app ID, and start building the next generation of search.
The BOSS Team
Yahoo! Search
Posted at 2:28 PM | Comments (0)
In our continued effort to search for the right balance between simplicity and expressiveness, we are revising some aspects of the DataRSS format used by SearchMonkey applications. As a first step, we have made it possible to provide a space-separated list of compact URIs as part of the rel and property attributes instead of providing a single value. This is to support situations where there are multiple properties (possibly from different vocabularies) expressing the proper relationship or there are multiple relationships to begin with. For example, mixing the FOAF and VCard vocabularies you may write
<item rel="dc:subject rel:Card">
<meta property="vcard:fn foaf:name">Peter Mika</meta>
<item rel="foaf:knows xfn:co-worker">
<meta property="vcard:fn foaf:name">Amit Kumar</meta>
</item>
</item>
By providing support for a space-separated lists of compact URIs (CURIEs), we are bringing dataRSS closer to RDFa, which also allows multiple values for the property and rel attributes.
The microformat data we generate now also features space separated lists of CURIEs as in the above example. Note that presentation applications using Data::xpath and checking for the presence of a certain CURIE using equivalence ('=' in XPath) instead of containment (contains function in XPath) may fail. If your application used Data::xpath and uses microformat data from the index, you may need to update your application.
As a next step, we will introduce support for the 'typeof' attribute of RDFa. For the moment, typing is explicit in DataRSS: in the above example, rel:Card is a property that expresses that the type of the item is a VCard. Based on the analysis of current usage it seems that this is confusing for many SearchMonkey developers and we need a clearer separation between types and properties. We will report on this improvement when it becomes available.
As always, your feedback is welcome. Please consider providing comments on existing features using our mailing list or proposing new features using the suggestions board.
Peter Mika
Data Architect for SearchMonkey
Posted at 12:04 PM | Comments (1)
The folks at Opera have just released their Web Standards Curriculum, an online course on building web products using web standards. The curriculums covers a range of topics: from explaining what the web is to building state-of-the-art applications.
Education is an important part of the process with any technology. The Web Standards Curriculum serves as a course to teach people how to create web sites that adhere to the standards that exist for the Web and following best practices like unobtrusive scripting and progressive enhancement. Written by some of the leading experts in the field it covers all of the subjects you need to get a head start in web development.
Many of my colleagues at Yahoo such as Christian Heilmann, Mark Norman Francis and Ben Hawkes-Lewis have been involved in writing this curriculum. At Yahoo we believe that web standards are vital to a vibrant developer community. We want to provide the most accessible, cross-browser compatible sites possible and web standards gives us the tools to do that.
Whether you are an educator or simply a developer looking to learn a little more the Web Standards Curriculum comes highly recommended. The curriculum is licensed with Creative Commons, so there is no problem with using it in your company.
Tom Hughes-Croucher
Yahoo! Developer Network
Posted at 4:41 AM | Comments (3)
Yahoo's new Address Book APIs is a welcome addition to the arsenal of APIs that Yahoo already has and provides very interesting possibilities to developers who would like to include their users' list of contacts in their application. One very obvious and straightforward example is the ability to virally invite the user's contacts to experience the new application that the user might find interesting, ala Facebook and the myriad of social networking applications out there.
In the following tutorial we'll show in an easy step-by-step format how to use the API with Ruby on Rails. You can download all the code examples in the article so you don't have to type them in.
One of the more interesting features of the API is that besides querying the user's contact, Yahoo allows external applications to create, delete and modify the address book contents. However that requires an explicit request for permission from the Address Book API team. Also, Yahoo recognizes that one of the main and frequent features in address books will be synchronization between mobile devices or multiple address books and provide capabilities to find out if contact information has changed since last access for a specific user. These 2 more advanced capabilities of the APIs provides additional weight behind the address book APIs which is considerably more than other APIs available currently provide.
This blog post focuses on the most basic of the 3 capabilities of the APIs, that is to query and retrieve information on the contacts in the user's address book. I will be using Ruby on Rails to flesh out the examples but since the APIs are REST-based and returns XML or JSON formatted data, you can use almost any technology you wish to access the address book.
Regardless of the capabilities, the Yahoo Address Book APIs require you as the application developer to register your application and authenticate the user through a browser-based authentication (BBAuth) method. This means that to get to the Address Book APIs we first need to understand and authenticate with BBAuth.
The BBAuth mechanism is simple. Assume that you want to develop a web application that needs to interact with Yahoo. First, you need to register for an application ID with Yahoo. Once you're registered, you'll be given an application ID and a shared secret. You will then use the application ID and shared secret to generate a URL and you will redirect your user to that URL. Once your user is at that URL he will be asked to give permission to your application to access Yahoo's services (in our case, the Address Book APIs). When your user does that, your application will be called once again and a token is passed to it. Finally you will use the token to get a WSSID and a cookie, which you can use to call the Yahoo service you want.
With that brief overview out of the way, let's step through creating a simple Rails application that allows the user to search for contacts in his address book. The first thing you need to do is to register for an application ID. Remember to register this as a BBAuth application. When you do this you will need to enter a BBAuth Success URL. This URL is the one that BBAuth calls once the user grants permission to your application. Take note that this URL cannot have a port number other than the default port 80, for security reasons. Also, the success URL needs to be accessible over the Internet. If you don't have access to port or a public IP, don't despair yet, there are other ways of going around it, which I will go into in a short while. If you do have access, set the URL to http://
If you're testing the Address Book APIs on your own, you're unlikely to have a publicly accessible web server or access to port 80 or both.
If you don't have a web server that's publicly available, an alternative is to use a dynamic DNS service to redirect the URL to your PC or laptop. The only problem here is that this only works if your connection has a real public IP address (and if you have to do port forwarding, that you are able to control the forwarding). If you're behind a firewall in your company, you're out of luck but if you're connected from home through your ISP, this should work.
If you don't have access to port 80 of a publicly available web server (at least to host the Rails app), that is a bit trickier. In my case I use another public server which I have access to and place this simple PHP script to redirect the success URL to my application, then indicate the URL to this script as the BBAuth success URL:
<?php
$success_url = "http://<my_private_rails_app_server>:<portnumber>/addr/success";
$query = "";
foreach ($_REQUEST as $key => $val) {
$query .= "$key=$val&";
}
$full_url = "$success_url?$query";
header ("Location: $full_url");
?>
What this code does is to grab all the parameters sent by BBAuth and forward it to your Rails application that you host somewhere else, with a different port number.
Now that you have an application ID and a shared secret, let's create the Rails application. Create a Rails application with this command:
$ rails addr
We're going to create a library that can be used by any controller to log into BBAuth, so add a file named ybbauth.rb in the lib folder.
require 'digest/md5'
require 'xmlsimple'
module Net
class HTTPS < HTTP
def initialize(address, port = nil, verify = :no_verify)
super(address, port)
self.use_ssl = true
self.verify_mode = OpenSSL::SSL::VERIFY_NONE if verify == :no_verify
end
end
end
module Ybbauth
# this is the action that is called upon successful authentication in Yahoo
def success
if auth?(params['token'], params['ts']) then
session['wssid'] = @wssid
session['ycookie'] = @ycookie
render :action => params[:appdata]
end
end
private
# call this to start authenticating through BBAuth
def login_yahoo(appdata=nil)
redirect_to url appdata
end
# check if the authorization is given
def auth?(token,ts)
sigstr = "/WSLogin/V1/wspwtoken_login?appid=#{YAHOO_CFG['appid']}&token=#{token}&ts=#{ts}#{YAHOO_CFG['secret']}"
sig = Digest::MD5.hexdigest sigstr
req_url = "https://api.login.yahoo.com/WSLogin/V1/wspwtoken_login?appid=#{YAHOO_CFG['appid']}&token=#{token}&ts=#{ts}&sig=#{sig}"
res = Net::HTTPS.get_response(URI.parse(req_url))
results = XmlSimple::xml_in(res.body, 'force_array' => false) ['Success']
@wssid = results['YahooSOAPAuthHeader']['Security']['YahooAuthToken']['WSSID']
@ycookie = results['YahooSOAPAuthHeader']['Security']['YahooAuthToken']['Cookies']
results['YahooSOAPAuthHeader']['Security']['YahooAuthToken']['AppID'] == YAHOO_CFG['appid']
end
# get the url to redirect to for logging in the user
def url(appdata=nil)
ts = Time.now.to_i
"https://api.login.yahoo.com/WSLogin/V1/wslogin?appid=#{YAHOO_CFG['appid']}&appdata=#{appdata}&ts=#{ts}&sig=#{signature(appdata, ts)}"
end
# sign the url
def signature(appdata, ts)
sig = "/WSLogin/V1/wslogin?appid=#{YAHOO_CFG['appid']}&appdata=#{appdata}&ts=#{ts}#{YAHOO_CFG['secret']}"
Digest::MD5.hexdigest sig
end
end
I'll explain the library in several parts.
The first is the HTTPS class, which is just a convenient class that extends the default Net::HTTP class to allow HTTPS connections.
The second is a module that we will be extending in our controller later on. There is only one public method, success, which is the action that BBAuth will call after it authenticates the user successfully. The rest are private methods to hide the implementation of the authentication mechanism.
The first private method is login_yahoo, and it is used by a public login action in our controller later on, to initiate the login process. It does this by forming the correct Yahoo URL to redirect the user to. Forming the URL requires us to attach the application ID, a piece of user application data, the timestamp and a signature that is in turn generated by hashing the path portion of the URL with the shared secret appended to it.
You will notice that we used an array YAHOO_CFG['appid'] and YAHOO_CFG['secret']. This nicely formatted configuration is courtesy of the initializer mechanism. Add a line like this:
YAHOO_CFG = YAML.load_file("#{RAILS_ROOT}/config/yahoo.yml")[RAILS_ENV]
in config/initializers/load_config.rb and then create the yahoo.yml file in the config folder containing the application ID and shared secret you have created:
development:
appid: YOUR_DEV_YAHOO_APP_ID
secret: YOUR_DEV_YAHOO_SHARED_SECRET
test:
appid: YOUR_TEST_YAHOO_APP_ID
secret: YOUR_TEST_YAHOO_SHARED_SECRET
production:
appid: YOUR_PRODUCTION_YAHOO_APP_ID
secret: YOUR_PRODUCTION_YAHOO_SHARED_SECRET
This will give you a nice configuration array anywhere in your entire Rails application.
Now that we have the BBAuth authentication request URL, just redirect the user to it. Note that we're passing a piece of application data to this URL. This piece of data is optional in the BBAuth documentation but I use it to generalize this Rails BBAuth library, and you will see how in a short while.
Once the user authorizes our user, the success action will be called. This action basically calls the auth? method and if the token and timestamp are valid, then it will store the WSSID and cookie into the session for future use.
The auth? method again is quite straightforward and follows almost the same steps as before. However, instead of redirecting the user to the URL, we use NET/HTTP to get the response, then use XML Simple to parse it into arrays and extract the WSSID and cookie. Finally as a security measure we test the received Application ID with our Application ID to make sure things are ok. Take care that this simple piece of code does absolutely nothing to catch any exceptions so if you want to use it in any serious work you need to put those in yourself.
Now that we have the library, let's head on to the controller. Create a addr_controller.rb file in the app/controllers folder.
class AddrController < ApplicationController
include Ybbauth
def index
end
def login
login_yahoo "search"
end
def search
end
end
Make sure that this controller includes the Ybbauth module in our library. We have a index action with a simple template that will just allow the user to click on a link that calls the login action. The login action in turn calls the private login_yahoo method with the parameter "search". This parameter tells the Ybbauth module to call the search action after successfully logging in through BBAuth.
With this we have successfully logged in and can start to use the Address Book API proper. Create a corresponding search view template named search.html.erb in the app/views/addr folder:
<h1>Search for contacts</h1>
<% form_tag :action => :find do %>
<%= text_field_tag :name %>
<%= submit_tag %>
<% end %>
This simple template creates a form that sends a single parameter called name to the find action. The find action is the one that users the real Address Book API. Add a find method in the addr_controller.rb:
def find
hash = {:appid => YAHOO_CFG['appid'],
:WSSID => session['wssid'],
:format => 'xml',
:fields => 'name',
'name.first.contains' => params['name'] }
parameters = URI.escape(hash.to_a.collect {|pair| pair.join('=')}.join('&'))
req_url = "http://address.yahooapis.com/v1/searchContacts?#{parameters}"
headers = {'Cookie' => session['ycookie']}
url = URI.parse(req_url)
res = Net::HTTP.start(url.host, url.port) {|http|
http.get(req_url, headers)
}
@results = XmlSimple::xml_in(res.body, 'force_array' => false)
end
This method first creates the parameters list, indicating that we want to search for the first name that contains the value that comes from the name parameter from the search form, and also format (XML) and the information we want (just the name). We append these parameters to the Address Book API searchContacts URL endpoint, and create a header hash to pass on the cookie. Then we use Net/HTTP and send a GET request to the URL, also providing the cookie in the header and parse the reponse through XML Simple. You should remember to send the cookie in, otherwise you get a blank response page. The results are then passed to the find view, find.html.erb, to display:
<h1>Results</h1>
<ol>
<% @results['contact'].each { |contact| %>
<li><%= contact['name']['first']%> <%= contact['name']['last']%></li>
<% } %>
</ol>
<%= link_to 'search again', :action => :search%>
The short step-by-step tutorial above ran through how you can use the most basic method in the Address Book API. However there is a lot of further depth in the APIs which you can use creatively to add to your existing application or simply to enhance the display of the address book as you like it. For further details read the documentation to the Address Book APIs or subscribe to the Address Book API tech group.
Sau Sheong Chang
Yahoo Developer Network
Posted at 2:50 AM | Comments (3)
As trailblazers in the world of ethical hacking, hackdays and providing free APIs and data for mashups It is pretty amazing to see exactly the same ideas being taken on by sources you wouldn't have expected.
Show us a better way is a web site and competition by the UK government that asks ethical hackers to come up with ideas to use a wide range of public data for the good of the public. Straight from the horse's mouth this sounds like this:
The UK Government wants to hear your ideas for new products that could improve the way public information is communicated. The Power of Information Taskforce is running a competition on the Government's behalf, and we have a 20,000 pound prize fund to develop the best ideas to the next level. You can see the type of thing we are are looking for here.
To show they are serious, the Government is making available gigabytes of new or previously invisible public information especially for people to use in this competition. Rest assured, this competition does not include personal information about people.
We're confident that you'll have more and better ideas than we ever will. You don't have to have any technical knowledge, nor any money, just a good idea, and 5 minutes spare to enter the competition.
There is a vast amount of APIs available to play with so what stops you from giving it a go?
Chris Heilmann
Yahoo Developer Network
Posted at 2:31 PM | Comments (0)
The last two days an old and historic school in London, England hosted 2gether08, a "festival of ideas, popular technologies and progress". Predictably during Wimbledon season, the weather was a glorious English summer as the photo of Steve Moore's final "thank you" talk shows:
The event had an immense amount of illustruous sponsors, with Channel4 being the leader and also covering the whole event and happenings around it.
The short tagline of the event was "solving bigger problems", the larger vision is much more wordy and available at the 2gether08 site.
The main mantra is the following:
The first 2gether Festival will bring together over 300 innovators from a wide range of fields to focus on how using digital technologies we can generate real social benefits. 2gether08 is not just about wise words and rousing presentations. A defining hallmark of the Festival will be how we frame problems and work towards solutions. This is happening now in advance of the Festival and will continue during and after the event. Imagine what we might be able to achieve…
This is all part of a larger movement right now called social entrepreneurship, especially in the world of media and IT. A lot of successful specialists in these markets feel that they are not having much impact in the world with what they do and want to concentrate on solving real human issues and save the environment instead. There are a lot of government and otherwise funded awards and competitions going on in this sector in the UK at the moment with the UK catalyst awards and Channel Four's 4IP - Innovation for the public fund being the leading lights and smaller funds like Show us a better way asking for more concrete hacks.
As a geek and developer evangelist I was a bit out of depth at the event. Yes, as lot of the talks and discussions revolved around using internet technology to change real social issues and environmental problems but not much was hands-on. The Social Innovation Camp, who were one of the co-sponsors did a better job at that, but the main idea of 2gether08 was to allow people to meet, collaborate and inspire another to do their share to spark social change by using technology.
That said, what I found was that there is a massive gap between all these great ideas and funds and IT and web experts available to deliver web solutions. I spent most of my time explaining mashup opportunities, already existing systems to host and remix videos online, create your own social networks or just host photos and make it easy for people to comment and tag them (yes, Flickr).
Case in point was that the organizers tried hard to make the participants network before the event via Crowdvine and Twitter, but it just did not catch on. I went home with around 50 business cards, about 20 of them from people that already connected with me on both of these systems.
As expected, the media coverage was great. Channel4 filmed the events, numerous film crews and reporters walked around and interviewed people and in general we'll find a lot of the things that happened and were said in the media soon.
The main social issue I subscribed to solving at the event and the nearer future is try to make the gap between the geeks and the people with great ideas a little smaller. Geekyoto earlier this year had a similar agenda as 2gether08 - on a more technical level. The 2gether08 people went to this event, too and started merging the groups of skilled and concerned geeks and more "wider picture" thinkers. There is much power in this merger, so let's make that happen.
Christian Heilmann
Yahoo Developer Network
Posted at 6:41 AM | Comments (3)
Editor's note: This post was originally published on hueniverse: thoughts on technology & open standards.
The first OAuth Summit hosted by Yahoo! last week was a huge success.
Fifty (!) OAuth community members attended, representing 20 companies, large and small, as well as a couple dedicated individuals. The list of companies represented is extremely gratifying to see
considering that OAuth remains a community-driven
effort: Agree2, AOL, BroadOn, Bubble Labs, Eye-Fi, Facebook, Garmin,
Google, LinkedIn, Ma.gnolia, Microsoft, MySpace, Plaxo, Pownce,
SafeMashups, Salesforce, Songbird, Veodia, Vidoop, and Yahoo!.
The summit would not have been half as good without the help of a few individuals. Stacy Milman from Yahoo! Developer Network did an outstanding job organizing the event on behalf of our host, setting the location, helping with registration, and making sure everything was just right. Cindy Li designed our super cool schwag: the OAuth T-shirt and stickers – look out for the OAuth cat on a laptop or co-worker near you.
Eric Sachs helped create the agenda for the event and organized the demo session that kicked off the rest of the day. Chris Messina set up the wiki and registration page.
The summit started with an update on the OAuth IPR (intellectual property rights) agreement, which is in its final approval stages (more news on OAuth licensing to follow); the current proposal for revising the Core specification; and the list of proposed extensions for the community to consider. The update was followed by a demo session which included:
It was great to see real products coming out with OAuth support as well as existing players transitioning to use the protocol. After the demos, we dived into a four-hour technical roundtable session about the future of the protocol. The discussion covered a wide range of topics and included:
The day concluded with dinner and drinks and some interesting casual conversations about where the community is headed and projects people are interested in working on. The summit provided much needed energy and got the community excited about the work ahead, which is already taking shape on the OAuth list. If you are new to OAuth or just could not make it to the summit, please join us and participate.
Eran Hammer-Lahav
Open Standards Evangelist
Posted at 9:23 AM | Comments (0)
Copyright © 2008 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings