yahoo is open to developers

89
Yahoo’s open! Offers for developers. Chris Heilmann, Open Source Event , Ankara, Turkey, June 2008

Upload: christian-heilmann

Post on 20-Jan-2015

8.380 views

Category:

Technology


1 download

DESCRIPTION

My presentation at the Open Source Event in the University of Economics and Technology in Ankara, Turkey

TRANSCRIPT

Page 1: Yahoo is open to developers

Yahoo’s open!

Offers for developers.

Chris Heilmann, Open Source Event , Ankara, Turkey, June 2008

Page 2: Yahoo is open to developers

Hi, I am Chris.

Page 3: Yahoo is open to developers

I’ll be here for a few more hours, then I am back to

London, England.

Page 4: Yahoo is open to developers

I will *so* miss the weather and the coffee.

Page 5: Yahoo is open to developers

You lucky, lucky people.

Page 6: Yahoo is open to developers

When I am gone, go and speak to Volkan – out there.

Page 7: Yahoo is open to developers

3x

Page 8: Yahoo is open to developers

Anyways...

Page 9: Yahoo is open to developers

Being a web developer is not easy.

Page 10: Yahoo is open to developers

We spend most of our time not developing but fixing

bugs.

Page 11: Yahoo is open to developers

If the bugs are straight forward, then that is not an

issue.

Page 12: Yahoo is open to developers

Most of the time, we fix issues though that are hard to track

down, impossible to reproduce or just plain weird.

Page 13: Yahoo is open to developers

The problem is that the web and browsers are not a mature development

environment.

Page 14: Yahoo is open to developers

Bug fixing is not an effective use of our time.

Page 15: Yahoo is open to developers

Which is why we do something to make our

environment less random.

Page 16: Yahoo is open to developers

I will show you a lot of resources now.

Page 17: Yahoo is open to developers

However, the good news is that they all are available from one starting point:

Page 18: Yahoo is open to developers

http://developer.yahoo.com

Page 19: Yahoo is open to developers

Let’s start with the APIs

Page 20: Yahoo is open to developers
Page 21: Yahoo is open to developers

The coolest thing about our APIs?

Page 22: Yahoo is open to developers

Output formats that make sense:

JSON, serialized PHP, XML

Page 23: Yahoo is open to developers

Everybody Duck!

Page 24: Yahoo is open to developers

There will be code

Page 25: Yahoo is open to developers

Retrieving and displaying photos from Flickr.

Page 26: Yahoo is open to developers
Page 31: Yahoo is open to developers

<div id="flickr"></div><script type="text/javascript"> function myflickr(data){ var f = document.getElementById('flickr'); out = '<ul>'; for(var i=0;data.items[i];i++){ var now = data.items[i]; var item = '<li><a href="' + now.link + '">'; item += '<img src="'+now.media.m+'" alt="'+now.title+'">'; item += '</a></li>'; out += item; } out += '</ul>'; f.innerHTML = out; };</script><script type="text/javascript" src="http://api.flickr.com/services/feeds/photos_public.gne?id=11414938@N00&lang=en-us&format=json&jsoncallback=myflickr"></script>

Page 32: Yahoo is open to developers
Page 33: Yahoo is open to developers

What about server side?

Page 34: Yahoo is open to developers

<?php $url = 'http://api.flickr.com/services/feeds/photos_public.gne?tags='.$tag.'&format=php_serial'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $feed = curl_exec($ch); curl_close($ch); $data = unserialize($feed); if(isset($data['items'])){ $items = $data['items']; } ?>

Page 35: Yahoo is open to developers

<?php $url = 'http://api.flickr.com/services/feeds/photos_public.gne?tags='.$tag.'&format=php_serial'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $feed = curl_exec($ch); curl_close($ch); $data = unserialize($feed); if(isset($data['items'])){ $items = $data['items']; } ?>

Page 37: Yahoo is open to developers

These rules apply to almost every API we offer.

Page 38: Yahoo is open to developers

You can cut down the information to the bare

minimum you need.

Page 39: Yahoo is open to developers

But what if the APIs don’t offer the right format or you

need to mix the data with other services?

Page 40: Yahoo is open to developers

★ Any input, any processing, any output

★ Infinite ways to combine and recombine data feeds

★ Output RSS, JSON, Serialized PHP or XML

★ Clone and edit★ Visual Pipes Editor

Page 41: Yahoo is open to developers

So much for the data...

Page 42: Yahoo is open to developers

... the display is the real challenge though.

Page 43: Yahoo is open to developers
Page 44: Yahoo is open to developers

The Yahoo User Interface library is what we use to

build.

Page 45: Yahoo is open to developers

It is there to fix issues we know and encountered in a

central location.

Page 46: Yahoo is open to developers

Find issue

Fix issue

Tell YUI about it

Fix goes in YUI

No an issue any more.

Page 47: Yahoo is open to developers

We have a lot of users, a lot of sites and an amazing amount

of issues come out of that.

Page 48: Yahoo is open to developers

We already fixed a lot.

Page 49: Yahoo is open to developers

A pattern library (what solution is there to

solve a user need)

YUI is...

Page 50: Yahoo is open to developers

A JavaScript library(Make all browsers work like

the good ones)

YUI is...

Page 51: Yahoo is open to developers

A CSS framework(Create layouts that work

across browsers)

YUI is...

Page 52: Yahoo is open to developers

A development methodology.(Unobtrusive Scripting,

Progressive Enhancement)

YUI is...

Page 53: Yahoo is open to developers

A development tools suite: Logger, Profiler, Packer

YUI is...

Page 54: Yahoo is open to developers

Fully documented (JavaDoc) and with lots and lots of

examples.

YUI is...

Page 55: Yahoo is open to developers

Free and open source (forkable, no open repository

- yet)

YUI is...

Page 56: Yahoo is open to developers

Hosted by us and delivered as close to your users as possible

(if you want to)

YUI is...

Page 57: Yahoo is open to developers

Making your life a *lot* easier.

YUI is...

Page 58: Yahoo is open to developers
Page 59: Yahoo is open to developers
Page 60: Yahoo is open to developers
Page 61: Yahoo is open to developers
Page 62: Yahoo is open to developers
Page 63: Yahoo is open to developers
Page 64: Yahoo is open to developers
Page 65: Yahoo is open to developers

Tell us about your use of YUI!

Page 66: Yahoo is open to developers
Page 67: Yahoo is open to developers
Page 68: Yahoo is open to developers
Page 69: Yahoo is open to developers

So we offer our code and content to you.

Page 70: Yahoo is open to developers

In English, for the moment.

Page 71: Yahoo is open to developers

we tried translating...

Page 72: Yahoo is open to developers

content = content.replace(/u/g,’ü’);

Page 73: Yahoo is open to developers

...but then we realized it makes more sense to get folks like Volkan on the

ground.

Page 74: Yahoo is open to developers

... so yeah, talk to him.

Page 75: Yahoo is open to developers

What about our systems?

Page 76: Yahoo is open to developers

Are they open?

Page 77: Yahoo is open to developers
Page 78: Yahoo is open to developers

SearchMonkey opens Yahoo search result pages for

developers.

Page 79: Yahoo is open to developers
Page 80: Yahoo is open to developers

There are two types of enhancements.

Page 81: Yahoo is open to developers

Enhanced results override the original display.

Page 82: Yahoo is open to developers

Infobars add drop-down menus:

Page 83: Yahoo is open to developers

You write your monkeys in secure PHP

(no file or cookie nasties allowed)

Page 84: Yahoo is open to developers

And you can use any information we know about

this URL.

Page 85: Yahoo is open to developers

And if there is not enough information...

Page 86: Yahoo is open to developers

Use XML-Based Atom Feeds, RDF markups, Microformats, OpenSearch data or build a

Custom Data Service.

Page 87: Yahoo is open to developers

For example:

Page 88: Yahoo is open to developers

Using microformats in the BBC site, we can display showtimes of programs

already in the result page:http://www.digital-web.com/articles/embedded_data_with_searchmonkey/

Page 89: Yahoo is open to developers

Questions?Christian Heilmann | http://wait-till-i.com | twitter: codepo8

Thanks to: Apelad (http://www.flickr.com/photos/apelad/2048858745/), Terence Yim and Digital Web