CIL2008 PostCon: Web Services for Librarians
Posted on April 10th, 2008 by ruth
Jason Clark, Digital Initiatives Librarian, Montana State University Libraries
Program description on the CIL2008 website.
Presentation handout at www.lib.montana.edu/~jason/talks.php1
- Jason Clark is on the Web at jasonclark.info
On the agenda:
- Overview of web services protocols
- Acronyms and major terms associated with web services
- Benefits of web services for libraries
- Intro to the code that makes it happen
API (application programming interface)
- A way for developers to access parts of a remote website and integrate it with their own site.
- can be queried, limited, and retrieve different forms of info
- MSU example (RSS feed format) and site map format
- Review the documentation and code to see what kind of info the APIs retrieve
- Advanced API services are designed to allow developers to build apps on their websites that are as functional as the original site
- example: YouTube API allows library to create its own YouTube page so that site visitors wouldn’t have to go to YouTube.com2
- saves time
Web Service
- a remote call that provides access to data between systems
- returns structured data to the server that made the request
Structured Data
- Extensible Mark-up Language (XML) and JavaScript Object Notation (JSON)
- Flexible mark-up languages
- Lightweight and easy to parse
- Allows communication between disparate systems
POST and GET
- POST action: entering data and pushing it to a different site
- Similar to an update function
- Adds new data to a remote location
- GET action: reading data from another location and bringing it back to the site
Why use Web Services?
- Access to content/data stores that libraries could not otherwise provide (zip codes, news, pictures, reviews, etc.)
- Enhance library website with a service that is not feasible for the library to provide (maps, search, products, etc.)
- Combines multiple services into one seamless library service (mash-ups)
- libraries can create a better product than they could without these resources
Why provide Web Services?
- A library service is of greater use to its users if they can get to the data from external applications
- The library wants others to use its data stores in their own applications
- from the floor: is the authoring library identified anywhere in the code of the service it develops/shares?
- header tags in the XML file are used identify library, copyright statement, etc.
- from the floor: is the authoring library identified anywhere in the code of the service it develops/shares?
Available Web Services
- Yahoo!
- Amazon
- eBay
- Flickr
- del.icio.us (see “Developers” section for RSS, API, JSON, HTML)
- Google App Engine
- Amazon s3
- …and many more!
Types of Web Services
- Three basic protocols
- SOAP (Google)
- Simple Object Access Protocol
- v1.2 of the W3C recommendation
- essentially, XML files talk to each other
- example: api.google.com/GoogleSearch.wsd
- XML-RPC
- XML Remote Procedure Call
- an updating protocol
- alerts to changes in content: think “ping”
- used by Technorati, Flickr, FeedBurner, and others
- early adoption, but little recent development
- REST (Flickr, Google)
- “the greatest thing since sliced… ”3
- Representational State Transfer
- unique data resources with addresses
- the theory of REST
- focuses on diversity of resources (nouns), not actions (verbs)
- every resource is uniquely addressable
- all resources share the same constrained interface for transfer of state (actios)
- must be stateless, cacheable, and layered
- REST is a Web protocol
- similar to the Web
- easy to understand
- URL is the method
- most popular type of service
- SOAP (Google)
Web Services in Libraries
- Plymouth State: Scriblio
- WPOPAC: catalog built from blog software
- uses Amazon or Google BookSearch API to retrieve cover images4
- images are stored on local server to avoid throttle limits
- Repository66: mash-up of OpenDOAR data with Google Maps and repository growth charts from ROAR.
- displays location and availability of research materials
- LibraryThing APIs
- LofiAPI: MSU Libraries (EDT, RMT)
- MSU Library Lifestream: RSS services (Twitter, del.icio.us, last.fm, MSU Library Blog)
- TERRApod YouTube admin
- Google Booksearch
Workshop Examples
- Google Ajax Search
- Amazon Reviews & Thumbnails
- Flickr API Display Photos
- dynamic display
Tips
- Play in the sandbox. Pick a service and study it.
- Consuming Web services
- Pick a language or parsing tool
- Find a few APIs worth learning about
- Make some requests and look at the code in a Web browser
- Think about added value and more efficient workflows
- Look around– many language libraries are already written
- Building Web services
- Use CRUD (Create, Read, Update, Delete) functions rather than HTTP (Get, Delete, Put, Post)
- Keep verbs in API intuitive and memorable
- Start small: simple, read-only requests
- Roll it out in beta version– once it’s public, there are restrictions
- Building blocks of Web services
- REQUEST: learn the protocol, ask for data
- RESPONSE: receive the data
- PARSE: pick the pieces you need
- DISPLAY: format those pieces for display
- what have I gotten myself into? [↩]
- not that we’d want to do this, but that’s the idea of advanced APIs [↩]
- J. Clark said that [↩]
- Jason couldn’t recall which was being used at the time of this writing [↩]
Filed under: CIL2008, conference notes

Read more…
One click more can\’t make your life worst, only better………..
It was simple helpfull express you so much in return sharing. I resolution allowance it with my friends. Thanks