web services for libraries - montana state university...

31
Web Services for Libraries Jason A. Clark Head of Digital Access and Web Services Montana State University Libraries

Upload: others

Post on 11-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Web Services for Libraries

Jason A. ClarkHead of Digital Access and Web ServicesMontana State University Libraries

Page 2: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

A quick look ahead…An overview of the different web services protocols Wading through the acronym soup and major terms associated with web servicesA discussion of the benefits of web services for librariesWalkthrough of the code that makes it happen

Page 3: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Questions?Ask anytime during the presentationThis can be heady stuff

Page 4: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Getting to know youAbout meAbout you

Introductions – name, institution, goalWho knows XML?Who knows javascript and DOM?Who knows PHP?Goals for workshop?Examples?

Page 5: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Terms: APIWhat is an API?

An application programming interface (or API) is a way for developers to access parts of a remote web site and integrate it with their own site.

MSU Libraries Resources Examplehttp://www.lib.montana.edu/resources/read.php?form=json&limit=25

Page 6: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Terms: Web ServiceWhat is a Web Service?

Broader termPublic interface (API)Provides access to data and/or proceduresOn a remote/external system (usually)Use structured data for data exchange (often XML)

Page 7: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Terms: Structured DataStructured data = XML and JSON

Extensible Mark-up Language and Javascript Object NotationFlexible mark-up languagesLightweight and easy to parseAllow communication between disparate systems

Page 8: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Terms: POST and GETTwo primary verbs for web services actions

POST data to a web serviceGET data from a web serviceRead and Write actions

Page 9: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Why use Web Services?Access to content/data stores you couldnot otherwise provide (zip codes, news,pictures, reviews, etc.)Enhance site with a service that is notfeasible for you to provide (maps, search,products, etc.)Combine these services into a seamlessservice you provide (mash-ups)

Page 10: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Provide Web Services?You have a service that benefits your usersbest if they can get to their data fromoutside the applicationYou want others to use your data store intheir applications

Page 11: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Available Web ServicesGoogleYahoo!AmazoneBayFlickrdel.icio.usGoogle App Engine http://code.google.com/appengine/Amazon s3Many more...

Page 12: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

You'd be surprised...AllCDCovers.com http://www.allcdcovers.com/apiISBNdb.com http://isbndb.com/docs/api/index.htmlOpenDOAR http://www.opendoar.org/tools/api.htmlarXiv.org http://export.arxiv.org/api_help/

* See ProgrammableWeb http://www.programmableweb.com/apis/directory

Page 13: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Types of Web ServicesSOAPXML-RPCREST

Page 14: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

What is SOAP?An acronym for Simple Object Access ProtocolVersion 1.2 of the W3C recommendationdropped the acronymSpecification maintained at w3.orgThere's nothing simple about SOAP!

Page 15: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Using SOAPSend a message specifying an action to take, including data for the actionReceive a return value from the actionMost SOAP services provide a WSDL file to describe the actions provided by the service

Page 16: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

What's WSDL?Web Services Description LanguageXML mark-up for describing the functionality provided by a SOAP service

Page 17: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

SOAP ExampleEBAY wsdlhttp://api.google.com/GoogleSearch.wsdl<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:ns1="urn:ebay:apis:eBLBaseComponents"><SOAP-ENV:Header>...</SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetSearchResultsRequest><ns1:Version>425</ns1:Version><ns1:Query>*</ns1:Query><ns1:TotalOnly>true</ns1:TotalOnly></ns1:GetSearchResultsRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>

Page 18: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

SOAP: Final ThoughtsComplexMessaging and Data mingledUsually seen in software APIs, but many scripting languages have librariesGoogle API has moved away from it

Page 19: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

What is XML-RPCXML Remote Procedure CallSpecification maintained at xmlrpc.comProvides a means to call methods/procedures on a remote server and make changes and/or retrieve dataAn early specification

Page 20: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Using XML-RPCMost common implementation of XML-RPC used today is that of blog ping servicesTechnorati, Flickr, FeedBurner, others?

Page 21: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

XML-RPC: Final ThoughtsAn updating protocolEarly adoption, but little recent development

Page 22: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

What is REST?The greatest thing since sliced...Representational State TransferUnique data resources with addresses

Page 23: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Theory of RESTFocus on diversity of resources (nouns), not actions (verbs)Every resource is uniquely addressableAll resources share the same constrained interface for transfer of state (actions)Must be stateless, cacheable, and layered

Page 24: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

REST = Web ProtocolWeb As Prime Example

URLs uniquely address resourcesHTTP methods (GET, POST, HEAD, etc.) and content types provide a constrained interfaceAll transactions are atomicHTTP provides cache control

Page 25: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

REST: Final ThoughtsSimilarity to web - easy to understandURL is the methodMost popular type of web service

Page 26: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Web Services in LibrariesPlymouth State: ScriblioRepository66: mash-up of OpenDOAR data with Google Maps and repository growth charts from ROAR, developed by Stuart Lewis of the University of Aberystwyth, Waleshttp://maps.repository66.org/LibraryThinglofiAPI: MSU Libraries (ETD, RMT)MSU Library Lifestream: RSS services (Twitter, del.icio.us, last.fm, MSU Library Blog)TERRApod Youtube adminGoogle BooksearchSamples from the crowd...

Page 27: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Workshop ExamplesWeb Services - Google Ajax Search API

Web Services - Amazon Reviews & Thumbnails (PHP)

Web Services - Flickr API - Display Photos (JSON)

Page 28: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Under the hood...Making the examples work... a closer look at the web services handout.

Page 29: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

What I've LearnedWeb services are closed source softwareDocumentation and online support is vitalDebugging can be hardSimilarities to common protocols are importantPractice and finding your development kit is essential

Page 30: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Last thoughts...This stuff is just beginning…Worldcat APIDigital Library Federation API recommendationLibrary mashups are coming - there's just too much good data out there

Page 31: Web Services for Libraries - Montana State University Libraryjason/talks/cil2008-workshop-webservices.pdfWeb Services for Libraries Jason A. Clark Head of Digital Access and Web Services

Contact Information

Jason A. ClarkHead of Digital Access and Web ServicesMontana State University [email protected]