Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using MAJAX and Google Book Classes in Mashups Annette Bailey University Libraries Virginia Tech April 29, 2008.

There are copies: 1
Using Google Book Classes in Mashups Excerpt from talk given at IUG 2008 in Washington, D.C Annette Bailey University Libraries Virginia Tech April 29,

Similar presentations


Presentation on theme: "Using MAJAX and Google Book Classes in Mashups Annette Bailey University Libraries Virginia Tech April 29, 2008."— Presentation transcript:

1 Using MAJAX and Google Book Classes in Mashups Annette Bailey University Libraries Virginia Tech April 29, 2008

2 Library 2.0 LibXTaggingBlogsWikisMashups RSS feeds Faceted browsing User reviews

3 Mashups Are hybrid web applications that combine information drawn from various web sources Simple example: A library web page that includes a news feed

4 Mashup Example Library Homepage Latest Library News Items

5 Mashup Sources RSS Feeds Web services, e.g. Google API, Amazon API StrikeIron is a market place that matches providers and users How can the III Millennium system become an information source for mashups? Thats where MAJAX comes in

6 MAJAX Overview Millennium AJAX is software that allows mixing catalog data into web pages Freely available from VT Simple to install & use No III support required No plug-in for users to install

7 New Books List Library publishes a list of newly acquired books every month We would like to include up-to-the-minute circulation information in this list

8 New Books List Demo

9 New Books List

10 MAJAX Millennium AJAX Asynchronous Query the catalog without the user having to wait JavaScript Run in clients browser to construct page content And XML (Really HTML) – comes from a web service: here, Millenniums MARC display

11 Screen Scraping MARC

12 Course Page Demo A professor wants to offer a list of books on his course page, along with full bibliographic and up-to- the-minute holdings information about each book

13 Course Page Demo Screen Shot

14 The Pyramid of Web Skills PhP, Ruby, … JavaScript HTML Librarians Programmers

15 Installing & Using MAJAX To install MAJAX at your institution, upload two files to your catalogs /screens directory: majax.js majax.html To use MAJAX in web pages include tag once include tags wherever library catalog information should be inserted

16 Course Page HTML <script type="text/javascript" src="http://yourlibrarycatalog/screens/majax.js"> <script type="text/javascript" src="http://yourlibrarycatalog/screens/majax.js"> <span title="i0596002556" class="majax-harvard-reference majax-newline majax-ebook"> <span title="i0596002556" class="majax-showholdings majax-linktocatalog"> <span title="i0596002556" class="majax-harvard-reference majax-newline majax-ebook"> <span title="i0596002556" class="majax-showholdings majax-linktocatalog">

17 MAJAX Identifiers IDENTIFIER can refer to ISBN, Bibrecord #, OCLC #, or Book Title ISBN i i006073132X Bibrecord.b.b2275560 OCLC # o o57207630 Title t tfreakonomics

18 MAJAX Alternative Syntax IDENTIFIER T can be i, o, t, or.b IDENTIFIER as defined on previous slide without leading character 0596002556 0596002556

19 MAJAX Classes Holdings Related majax-showholdings majax-showholdings-brief majax-showholdings-div majax-ebook majax-showholdings locations Bibliographic Information majax-marc-??? majax-marc-???-? majax-harvard-reference majax-endnote majax-endnote-switch majax-endnote-import Miscellaneous majax-syndetics-* majax-linktocatalog majax-reportfailure majax-newline majax-space

20 MAJAX Examples (1) MAJAX classMAJAX output majax-harvard-referenceLevitt, Steven D., Dubner, Stephen J., 2005, Freakonomics : a rogue economist explores the hidden side of everything / 1st ed., New York, William Morrow, xii, 242 p. ; majax-showholdings-divCopy 1: available Copy 2: due 05-10-07 Copy 3: due 07-22-07 majax-marc-050HB74.P8 L479 2005

21 MAJAX Examples (2) MAJAX classMAJAX output majax-ebook[Electronic Book] majax-marc-050 majax-linktocatalog HB74.P8 L479 2005 majax-syndetics-vtech

22 Create a new file: majaxcustomize.js Include the file using a tag on the page where you want to use MAJAX MAJAX Customization Define your customized variables <script type="text/javascript" src="http://yourlibrarycatalog/screens/majaxcustomize.js"> <script type="text/javascript" src="http://yourlibrarycatalog/screens/majaxcustomize.js"> var singleCopyStatus = Un exemplaire est %s;

23 Load Considerations MAJAX uses caching and sends exactly 1 request per unique item per page to the server Regardless of the number of span tags referencing an item MAJAX imposes additional load on your III system Currently self-limiting to 100 requests per second per page, which can be changed. To turn MAJAX capabilities off, simply remove majax.html & majax.js from the /screens directory.

24 Limitations MAJAX works only on web pages from within the same domain as your Millennium system If Millennium runs on addison.vt.edu, MAJAX can be used on all pages in *.vt.edu www.lib.vt.edu Ok courses.cs.vt.edu Ok livejournal.com Not Ok (needs a proxy) MAJAX works in Internet Explorer 6.x and up, Firefox, and Safari browsers Will fail silently on other browsers

25 MAJAX Summary MAJAX provides the ability to include live catalog information in any webpage on your domain Without special server support, access or programming Without requiring end users to install any plug- ins It is easy to use, requiring only HTML skills Free! Has been adopted by a number of III libraries Users have contributed suggestions, bug fixes, and help test it

26 Part 2 Google Book Classes

27 Mashing a Service into the III Catalog Display MAJAX mashes catalog data into other web pages Now well mash data from another service into the library catalog

28 Google Book Search Book Viewability API Programmatic client-side access to small set of Google Book Search information Provides thumbnails of book covers Provides link to Googles 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

29 Goals We want to incorporate information from Google Book Search into our catalog E.g., allow users to see a preview of a book if one is available from Google Or use Googles book covers Without JavaScript coding (even though Googles API requires JavaScript coding as it is)

30 Google Book Classes Demo

31 Google Books Demo Buttons appear if Google Book Search has a partial preview of book

32 Google Books Demo (2) Buttons appears if Google has a partial preview of book

33 Google Book Classes A JavaScript library and set of classes that simplify using the Google Book Search Book Viewability API Can be used on any web page, including inside the Millennium system Usage is much like MAJAX Available from libx.org/gbs

34 Using Google Book Classes (on general web server) Upload a copy of gbsclasses.js to your server Include gbsclasses.js in a tag in the target page Include the class(es) in tags <script type="text/javascript" src="http://yourserver/yourpath/gbsclasses.js"> <script type="text/javascript" src="http://yourserver/yourpath/gbsclasses.js">

35 GBS Identifiers IDENTIFIER can refer to ISBN #, OCLC #, or LCCN# Alternate syntax: use * as IDENTIFIER ISBN ISBN:006073132X OCLC OCLC:57207630 LCCN LCCN:2004022563

36 Using Google Book Classes in Millennium 1.Include gbsclasses.js in HTML template file via tag E.g. toplogo.html 2.Use III fieldspec token to insert HTML that includes the Google Book Classes into the briefcit.html file

37 briefcit.html briefCitPub

38 A Google Preview Button Inside Publisher boxInsert 1x2 HTML table260 Field goes in left columnhide span initiallyLink to info page – but only if Google has a partial view Remove span if Google does not index this ISBN III will put first 020 Field here briefcit.html

39 Currently Supported Google Book Classes Thumbnails Image gbs-thumbnail Wrap span in a hyperlink gbs-link-to-preview gbs-link-to-info gbs-link-to-thumbnail Conditionals: only keep span if … gbs-if-noview gbs-if-partial-or-full gbs-if-partial gbs-if-full Remove if Google does not index book gbs-remove-on-failure Multiple classes can be combined

40 Google Book Classes: Summary Google Book Classes allows the use of the Google Book Viewability API in mashups Without requiring any JavaScript or AJAX knowledge Allows integration in places (such as III briefcit.html) where control of a page is limited

41 Acknowledgements Dr. Godmar Back Assistant Professor Computer Science

42 Questions? Thank you! http://libx.org/majax http://libx.org/gbs Contact us: libx.org@gmail.com

43 WebBridge Example (1) majax resource 1 majax resource 2 majax resource 3

44 WebBridge Example (2) majax resource 1 majax resource 2 majax resource 3

45 Setting Up MAJAX for WebBridge Add tag to resserv_panel.html WebBridge Management interface Create 1 or more resources Associate hasISBN or hasTitle data tests Embed tags in Link Display field


Download ppt "Using MAJAX and Google Book Classes in Mashups Annette Bailey University Libraries Virginia Tech April 29, 2008."

Similar presentations


Ads by Google