Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Services & Widgets for the WebOPAC IUG 2009 Annette Bailey Virginia Tech.

Similar presentations


Presentation on theme: "Web Services & Widgets for the WebOPAC IUG 2009 Annette Bailey Virginia Tech."— Presentation transcript:

1 Web Services & Widgets for the WebOPAC IUG 2009 Annette Bailey Virginia Tech

2 Motivation Enhancing the WebOPAC display with information from outside web services – Dynamic integration even without WebBridge Integrating real-time bibliographic and circulation information into web pages – Turning Millennium into a web service 2IUG 2009 - Annette Bailey

3 Overview 1.Google Book Classes – integrate data from Google Book Search Dynamic Links into web pages 2.tictoclookup – enhance web pages with links to journal RSS feeds 3.MAJAX 2 – use real-time information from the library’s catalog in web pages 3IUG 2009 - Annette Bailey

4 Challenges Ease of Integration – should require little or no programming Customizability – should allow for flexible layouts and styling Setup and Hosting – should require minimum effort, exploit either free or already available resources 4IUG 2009 - Annette Bailey

5 What’s a web service? Definitions: "a software system designed to support interoperable machine-to-machine interaction over a network." [1] "a computational resource that can be accessed via the world wide web" [2] [1] http://www.w3.org/TR/ws-gloss/ [2] http://primekinetics.org/glossary 5IUG 2009 - Annette Bailey

6 Web Service Request: http://some.domain/some/path?some=arg Response: Data encoded in XML or JSON JSON: JavaScript Object Notation Data interchange format that uses JavaScript syntax 6IUG 2009 - Annette Bailey

7 GOOGLE BOOK CLASSES Web Services & Widgets IUG 2009 - Annette Bailey7

8 Google Book Search Dynamic Links API Programmatic client-side access to small set of Google Book Search information – Provides thumbnails of book covers – Provides link to Google’s book information, preview, or full text pages – Provides information on whether Google has full text, partial preview, or no preview – Indexed by ISBN#, OCLC#, LCCN# Released March 2008 IUG 2009 - Annette Bailey8

9 Google Book Search Dynamic Links API Keypoints: – can access it by typing a URL in the browser and see what comes back – response uses JSON IUG 2009 - Annette Bailey9 http://books.google.com/books?bibkeys=ISBN:0451526538&jscmd=viewapi&callback=process process({ "ISBN:0451526538":{ "bib_key": "ISBN:0451526538", "info_url": "http://books.google.com/books?id=j391D4vlFfAC\x26source=gbs_ViewAPI", "preview_url": "http://books.google.com/books?id=j391D4vlFfAC\x26printsec=frontcover \x26source=gbs_ViewAPI", "thumbnail_url": "http://bks8.books.google.com/books?id=j391D4vlFfAC\x26printsec=frontcover \x26img=1\x26zoom=5\x26sig=ACfU3U33uGv6VuVsNAOfq-40BmmP64zdXQ", "preview": "partial", "embeddable": true } });

10 Widgets Data returned by web services can not be used directly in web pages – Need JavaScript to post-process it Enter Widgets – A snippet of HTML/CSS that controls the post- processing and display of data obtained from a web service – JavaScript remains “under the hood” 10IUG 2009 - Annette Bailey

11 Google Book Classes Widget A widget to access Google Book Search Dynamic Links API and integrate results into web pages. Demo 11IUG 2009 - Annette Bailey

12 http://laurel.lib.vt.edu/record=b2595018~S1 IUG 2009 - Annette Bailey12

13 Using Google Book Classes in bib_display.html IUG 2009 - Annette Bailey13 Preview with Google

14 Google Book Classes Use or Wrap span in a hyperlink – gbs-link-to-preview – gbs-link-to-info – gbs-link-to-thumbnail Conditionals: only keep span/div if … – gbs-if-noview – gbs-if-partial-or-full – gbs-if-partial – gbs-if-full Thumbnails Image – gbs-thumbnail Embedded viewer – gbs-embed-viewer Remove if Google does not index book – gbs-remove-on-failure Multiple classes can be combined IUG 2009 - Annette Bailey14 More info at: http://libx.lib.vt.edu/services/googlebooks/

15 Using Google Book Classes in WebBridge Create a new resource in WebBridge IUG 2009 - Annette Bailey15 <span style="display:none" title="OCLC:#@OCLC#" class="gbs-link-to-preview gbs-if-partial-or-full"> ISBN ISBN:006073132X OCLC OCLC:57207630 LCCN LCCN:2004022563

16 GBS Identifiers Alternate syntax: use * as IDENTIFIER ISBN:006073132X IDENTIFIER can refer to ISBN #, OCLC #, or LCCN# IUG 2009 - Annette Bailey16

17 Google Book Classes Summary IUG 2009 - Annette Bailey17 Google Book Classes Web ServiceGoogle Book Search Dynamic Link API books.google.com Hosted ByGoogle, Inc. Data ProvenanceGoogle Additional CostFree, but subject to Google Terms of Service Same Domain RestrictionNo Widgetizationgbsclasses.js: class-based: gbs- Requires JavaScript programmingNo Requires Additional ServerNo Suitable for inclusion on III Bibrecord Display Yes Suitable for WebBridge IntegrationYes

18 TICTOCLOOKUP SERVICE Web Services & Widgets IUG 2009 - Annette Bailey18

19 JISC’s Journal Table of Contents Service JISC released data set for Table of Contents for journals – (ISSN, Journal Title) → RSS Feed URL ticTOC lookup service – Based on JISC data set Lives in Google App Engine (“cloud”) – http://tictoclookup.appspot.com IUG 2009 - Annette Bailey19

20 tictoclookup Service Keypoints: – supports ISSN and optional title – runs on Google servers – stand-alone version available IUG 2009 - Annette Bailey20 http://tictoclookup.appspot.com/0028-0836 {"lastmod": "Wed Apr 29 05:42:36 2009", "records": [ {"title": "Nature AOP", "rssfeed": "http://www.nature.com/nature/journal/vaop/ncurrent/rss.rdf"}, {"title": "Nature", "rssfeed": "http://www.nature.com/nature/current_issue/rss"} ], "issn": "00280836"}

21 Tictoclookup Widget A widget to access the tictoclookup service and integrate those results into web pages. Demo 21IUG 2009 - Annette Bailey

22 http://laurel.lib.vt.edu/record=b1251610~S1 IUG 2009 - Annette Bailey22

23 Using tictoclookup in bib_display.html IUG 2009 - Annette Bailey23 ticTOC Click to subscribe to the Table of Contents for this journal.

24 tictoclookup Classes Use Wrap span in link to RSS Feed – tictoc-link Show tooltip with Table of Contents – tictoc-preview – Uses Google Feeds API – Cluetip JQuery plugin Implemented using JQuery Multiple classes can be combined Append journal title to end of span – tictoc-append-title IUG 2009 - Annette Bailey24 More info at: http://libx.lib.vt.edu/services/tictoclookup/

25 Using tictoclookup Classes in WebBridge Create a new resource in WebBridge IUG 2009 - Annette Bailey25 <span style="display:none“ class="tictoc-link tictoc-preview tictoc-append-title" title="ISSN:#@ISSN#:#@TITLE#"> Subscribe to Table of Contents for

26 Summary IUG 2009 - Annette Bailey26 ticTOC Web ServiceticTOC Cloud Application tictoclookup.appspot.com Hosted ByGoogle, Inc. via Google App Engine Data ProvenanceJISC (www.tictocs.ac.uk) Additional CostGenerous free quota, pay per use beyond that Same Domain RestrictionNo Widgetizationtictoc.js:class-based: tictoc- Requires JavaScript programmingNo Requires Additional ServerNo (if using GAE), else need Apache+mod_wsgi Suitable for inclusion on III Bibrecord DisplayYes Suitable for WebBridge IntegrationYes

27 MAJAX 2 Web Services & Widgets IUG 2009 - Annette Bailey27

28 MAJAX 2 Web Service Millennium Server Request: http://libx.lib.vt.edu/services/majax2 /isbn/1412936381 Response: MARC record in JSON 28IUG 2009 - Annette Bailey MAJAX Web Service Response: MARC record in HTML Request: http://addison.vt.edu/search/i1412936381 /i1412936381/1,1,1,E/marc&FF=i1412936381

29 MAJAX 2 Web Service MAJAX 2 is a proxy that connects to the Millennium server – retrieves MARC and up-to-the-minute circulation information and converts it to JSON – written in Python – requires Apache/mod_wsgi – Source code available at: http://code.google.com/p/majax2/ IUG 2009 - Annette Bailey29

30 MAJAX 2 Service IUG 2009 - Annette Bailey30 http://libx.lib.vt.edu/services/majax2/isbn/1412936381 {"searchterm": "i1412936381", "recordurl": "http://addison.vt.edu/search/i1412936381/i1412936381/1,1,1,E/marc&FF=i1412936381", "results": [ {"holdings": ["DUE 05-22-09"], "locations": ["Newman 2nd Floor"], "marc": … "650": [{"i1": " ", "i2": "0", "sf": {"a": ["African American families."]}}, {"i1": " ", "i2": "0“, "sf": {"a": ["African Americans"], "x": ["Social conditions."]}}, {"i1": " ", "i2": "0", "sf": {"a“: ["Family"], "z": ["United States."]}}] … "245": [{"i1": "0", "i2": "0", "sf": {"a": ["Black families /"], "c": ["Harriette Pipes McAdoo [editor].“]}}] }

31 MAJAX 2 Widget A widget to access the MAJAX 2 web service and integrate results into web pages. Demo 31IUG 2009 - Annette Bailey

32 http://www.lib.vt.edu/services/newbooks/new- materials.php?subject=lnl_englit IUG 2009 - Annette Bailey32

33 Using MAJAX 2 IUG 2009 - Annette Bailey33 /* adjust these variables */ var majax2ServiceUrl = "http://libx.lib.vt.edu/services/majax2/"; var majax2OpacBase = "http://yourcatalog/search"; ISBN:

34 MAJAX 2 Classes Use Holdings-related – majax-showholdings – majax-showholdings-brief – majax-showholdings-div – majax-ebook – majax-showholdingslocations Bibliographic Information – majax-marc-???-? – majax-harvard-reference – majax-endnote – majax-endnote-switch – majax-endnote-import Miscellaneous – majax-linktocatalog – majax-space – majax-newline – majax-reportfailure – majax-syndetics-yourclientid Multiple classes can be combined IUG 2009 - Annette Bailey34 More info at: http://libx.lib.vt.edu/services/majax2/

35 MAJAX 1 vs. MAJAX 2 Majax 1Majax 2 Web ServiceScreen Scraping III Record DisplayJSON Proxy for III Record Display Hosted ByExisting Millennium Installation /screens WSGI/Python Script on libx.lib.vt.edu Data ProvenanceYour OPAC Additional CostN/ACan use libx.lib.vt.edu for testing, must run WSGI-enabled web server in production Same Domain RestrictionYesNo Widgetizationmajax.js:class-based: majax- classes Requires JavaScript programming No Requires Additional ServerNoYes (Apache+mod_wsgi) Suitable for inclusion on III Bibrecord Display N/A Suitable for WebBridge Integration Yes IUG 2009 - Annette Bailey35

36 Conclusion Presented 3 Web Services and 3 Widgets – Easy to integrate Include tags Place tags where you want the data to display – Customizable Control over where and how data displays through classes – Require minimal resources to setup and host Can use /screens directory, Google or own server IUG 2009 - Annette Bailey36

37 Acknowledgments Assistant Professor, Dr. Godmar Back ticTOC is a service from JISC MAJAX user community for inspiration! IUG 2009 - Annette Bailey37

38 IUG 2009 - Annette Bailey38 Majax 1Majax 2Google Book ClassesticTOC Web ServiceScreen Scraping III Record Display JSON Proxy for III Record Display Google Book Search Dynamic Link API books.google.com ticTOC Cloud Application tictoclookup.appspot.c om Hosted ByExisting Millennium Installation /screens WSGI/Python Script on libx.lib.vt.edu Google, Inc.Google, Inc. via Google App Engine Data ProvenanceYour OPAC GoogleJISC (www.tictocs.ac.uk) Additional CostN/ACan use libx.lib.vt.edu for testing, must run WSGI-enabled web server in production Free, but subject to Google Terms of Service Generous free quota, pay per use beyond that Same Domain Restriction YesNo Widgetizationmajax.js: class-based: majax- classesgbsclasses.js:class-based: gbs- tictoc.js:class-based: tictoc- Requires JavaScript programming No Requires Additional Server NoYes (Apache+mod_wsgi) NoNo (if using GAE), else need Apache+mod_wsgi III Bibrecord DisplayN/A Yes WebBridge Integration Yes


Download ppt "Web Services & Widgets for the WebOPAC IUG 2009 Annette Bailey Virginia Tech."

Similar presentations


Ads by Google