Building AJAX Applications Using Yahoo! Web Services

Post on 08-May-2015

1,320 views 2 download

description

Yahoo! is opening up to developers using Web services. Today our services enable developers to access Yahoo! properties as diverse as Web search, maps, Flickr, comparison shopping, and many more -- and we're making more available all the time. In this session you'll learn how you can incorporate Yahoo! Web services in your application or Web site, and see a demonstration of integration between Yahoo! Web Services, the new Yahoo! Presentation Library, and ASP.NET "Atlas".

transcript

Building Web Applications Using Yahoo! Web Services

Jeffrey McManus

Director, Yahoo! Developer Network

March, 2006

2

About this talk

About Yahoo! Web services- How to build a .NET application using Y! Web

services- Using ASP.NET Atlas with Y! Web services

About the Yahoo! User Interface Libraries and Ajax technologies

A look ahead

3

Our Goals: Building a Developer Ecosystem on the Yahoo! Platform Provide as many compelling products for

developers as possible- Web service APIs, tools, libraries, etc.- Create and grow a developer community

Disseminate information about our developer offerings

Provide exceptional support for developers

4

Developer Momentum

We entered 2005 with a smattering of third-party developers (mostly private partnerships, negotiated on a one-off basis)

We exited 2005 with a community of tens of thousands of developers

We will continue to make integrating with Yahoo! easier and easier on both a technical and a business level

5

Maps Developer Community Growth 2005

Jun Jul Aug Sep Oct Nov Dec Jan

June 2005Simple Maps API

Launched

November 2005Flash Maps, AJAX Maps,

Geocoding, and Traffic APIs Launched

6

WEB SERVICES

7

Search Web Services

Audio Search- Album Search- Artist Search- Podcast Search- Download Location- Song Search

Autos Custom Content Analysis Image Search Local Search

MyWeb Search News Search Site Explorer Video Search Web Search

- Context Search- Related Queries- Spelling Suggestion

8

Web Search API: Inputs

query region type (all, any, phrase) # of results start position format (html, msword, pdf, ppt, etc.) language country site subscription license (creative commons) output (xml, json, php) callback (json)

9

Web Search API: Outputs

totalResultsAvailable, totalResultsReturned Title Summary Url ClickUrl MimeType ModificationDate Cache (Url + size)

10

Use Martin Brown’s .NET Wrapper Classes to Call Search Web Services Downloads and parses search results from

most of our search APIs- No HTTP-handling or XML-parsing necessary- Generated from schema using xsd.exe- Full source code (C# and VB.NET) included

http://www.mgbrown.com/downloads.aspx

11

Example: Performing a Web Search Using the Brown Wrapper This is a “traditional” request/response

example (no Ajax stuff...yet)

12

Simple Maps API

Plot up to 100 points on a Yahoo! map without programming and without limits

Add geoRSS tags to an existing RSS feed to plot RSS data points on a map

13

Demo: Simple Maps

14

Ajax Maps API

http://developer.yahoo.net/maps/ajax/

15

Flash Maps API

http://developer.yahoo.net/maps/flash/ Example: runningmaps.com

16

Maps “Building Block” APIs

Geocoding API Map Image API Traffic API Local Search API- Returns long/lat for plotting on maps

17

Music Engine Plug-Ins

Yahoo! Music Engine provides personalized streaming radio, music purchase, and unlimited subscription music

The music client application is pluggable- Create plug-ins written in C++ or JavaScript- Applications run in embedded IE within the Music

Engine client

http://music.yahoo.com/musicengine/ http://developer.yahoo.net/music/

18

Trip Planner API

Return information on where to go and what to do from Yahoo! Trip Planner (travel.yahoo.com/trip)

Retrieve trips planned from a specific Yahoo! user

Example: http://api.travel.yahoo.com/TripService/V1/tripSearch?appid=YahooDemo&query=las+vegas

19

Shopping API

Retrieve product and pricing information from our database of products

http://developer.yahoo.net/shopping/ Example:

http://api.shopping.yahoo.com/ShoppingService/V2/productSearch?appid=YahooDemo&query=creative+zen

20

Shopping API 2.0

New features for the Yahoo! comparison shopping API- Search-narrowing options

• Shoes >> Men’s Shoes >> Size 9

- Build a product hierarchy based on that of shopping.yahoo.com

- Variable product image sizes to fit your layout

21

Shopping Paid Syndication Beta

Make money by referring traffic to Yahoo! Shopping advertising partners

Now accepting beta applications: http://shopping.yahoo.com/syndication/

22

Flickr API

Flickr is a photo-sharing community that makes it easy to upload, organize/tag, and share photos

Flickr API makes it easy to build applications that incorporate Flickr

http://developer.yahoo.net/flickr/

23

Upcoming.org

Event-sharing community- Joined Yahoo! in 2005

http://upcoming.org/services/api/

24

MyWeb and del.icio.us

Save your bookmarks to the Web Tag, label, share URLs with your friends del.icio.us has an API today, MyWeb has

search today with read/write coming soon

25

New: JavaScript Developer Center

Provides assistance with scripting and AJAX development

JSON Web services support give JavaScript developers the ability to easily handle data without parsing XML- Facilitates rapid development and creation of

AJAX applications

http://developer.yahoo.net/javascript/

26

Design Pattern Library

Solutions and guidance to common Web user interface problems

Techniques reflect years of experience and user testing- Includes solutions for such issues as accessibility

Provided under a Creative Commons license http://developer.yahoo.net/ypatterns/

27

New: Javascript User Interface Library

A collection of JavaScript libraries you can use in your Web development- Complex user interface controls- A cross-browser Ajax library- Drag-drop and event libraries

To be updated frequently Free and open-source (BSD license) http://developer.yahoo.net/yui/

28

Yahoo! JavaScript UI Components

Animation Connection Manager DOM Drag and Drop Event

Calendar Slider TreeView

CORE UTILITIESCORE UTILITIES UI CONTROLSUI CONTROLS

29

JSON Serialization

Provides a way to retrieve Web- Excellent way to write Ajax applications because

the data is in native JavaScript format- This happens to be the same way that Atlas

communicates between client and server

Referencing a JSON-emitting service in a <script> tag enables you to consume data without parsing or proxying- Be careful that the source of the JSON is

trustworthy

30

PARTICIPATE

31

Yahoo’s Mission

To help users:- Find- Use- Share- Expand

...all human knowledge

32

Building a Participation Platform

Today we provide a number of “find” services that are usable on and off Yahoo!- Now we must address “use,” “share” and “expand”- This will enable a new wave of user participation

based on the Yahoo! platform

Services we provide to facilitate this must be:- Bidirectional- Personalized- Secure

33

Authentication and personal information One of the strengths of Yahoo! is

personalization- Enabling users to create, store and share

information, and to personalize their experience We are now extending this to third-party

applications and Web sites Through secure authentication, we will enable

Yahoo! users to get access to Yahoo! data in a way that is ubiquitous, easy, open, and secure

34

Yahoo! Search

Your application or Web site

Retrieve Web search results

35

Yahoo! Photos

Your application or Web site

Retrieve photos

Upload, organize, tag and share photos

36

Browser-Based Authentication for Yahoo! Web Services Provides access to Yahoo! Web services through

third-party Web sites How it works:

- User discovers a third-party Web site- User authenticates with Yahoo! (not the third-party

developer)- Yahoo! sends a token to the developer that enables her to

make API calls on the user’s behalf- Yahoo! never shares the user name and password with the

third-party developer- User can revoke permission from the third-party developer

at any time

37

How Browser-Based Authentication Works

38

SHARE

39

Yahoo! Application Gallery

The Yahoo! Developer Network’s first consumer-oriented site

Showcases applications built using Yahoo! technology- Widgets, Web sites, plug-ins, etc.

Unifies the (many) disparate collections of applications that have been maintained here and there throughout Yahoo!- Flickr, Search, Widgets, Maps, etc., etc.

40

Application Gallery Features

Developers can submit links and descriptions of their applications

Add tags to assist with discovery of applications, sites and widgets

Users can rate and review applications- We’ll feature the highest-rated apps and

developers Search for applications powered by the

greatest search engine in the world, Yahoo! Search

41

42

What’s Next?

Many of the simple, obvious, read-only integration points with Yahoo! are completed and available today

However: What we’ve done to date is only the tip of the iceberg

43

Coming Soon: Calendar API

Yahoo! Calendar enables users to store calendar events, scheduled recurring appointments, share calendars across multiple users, and set alerts

The Yahoo! Calendar API enables Calendar integration with your Web site- Will utilize Browser-Based Authentication- JSON and iCal support coming soon- Other formats will appear later in the year

44

Coming Soon: Yahoo! Photos API

A read/write API for the most popular photo-sharing site in the world, Yahoo! Photos

Will utilize Browser-Based Authentication

45

Questions? Comments?

Yahoo! Developer Network: http://developer.yahoo.net/

My blog: http://mcmanus.typepad.com/ These slides: http://redblazer.com/talks/ Contact me: jeffreymcmanus@yahoo.com