Internet Archive News

updates about archive.org

Creating a better OPDS Catalog Root

With more and more tablets available, OPDS clients and catalogs need to evolve and provide a better looking presentation of their catalogs that can fill a 7″ to 10″ screen.

The current crop of OPDS clients on smartphones rely entirely on a navigation based on a series of links (Navigation Feeds) and publications  (Acquisition Feeds).

On a larger device, there’s room for a little more creativity though and using link relations from the OPDS specification along with feed-level links, it is already possible to create an experience as rich as any other tablet application.

Let’s take an example: the Android Market application on Android 3.x.

Catalog Root / Navigation Feed

A basic OPDS catalog or an OPDS client for smartphones would only display the menu for categories:

This is the absolute minimum required of an OPDS Navigation Feed:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>urn:uuid:2853dacf-ed79-42f5-8e8a-a7bb3d1ae6a2</id>
  <link rel="self"
        href="/opds-catalogs/root.xml"
        type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
  <link rel="start"
        href="/opds-catalogs/root.xml"
        type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
  <title>OPDS Catalog Root Example</title>
  <updated>2010-01-10T10:03:10Z</updated>
  <author>
    <name>Spec Writer</name>
    <uri>http://opds-spec.org</uri>
  </author>

  <entry>
    <title>Games</title>
    <link rel="subsection"
          href="/opds-catalogs/games.xml"
          type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
    <updated>2010-01-10T10:01:01Z</updated>
    <id>urn:uuid:d49e8018-a0e0-499e-9423-7c175fa0c56e</id>
    <content type="text">View all games.</content>
  </entry>
  <entry>
    <title>Books & Reference</title>
    <link rel="subsection"
          href="/opds-catalogs/books.xml"
          type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
    <updated>2010-01-10T10:02:00Z</updated>
    <id>urn:uuid:d49e8018-a0e0-499e-9423-7c175fa0c56c</id>
    <content type="text">View all books & reference applications.</content>
  </entry>

  [...]

</feed>

Featured items

The Android Market application dedicates a lot of space on the screen to featured applications. On the homepage, two elements display featured applications: a carousel and a “Featured apps” block.

Using the exact same navigation feed that we provided in the previous section, it is very easy to add the kind of information required for an OPDS client to also display featured publications in a more attractive way.

The OPDS specification defines a dedicated relationship value for such elements: http://opds-spec.org/featured

To replicate the example we could add two links to our catalog root:

<link rel="http://opds-spec.org/featured"
  href="/opds-catalogs/featured_games.xml"
  title="Featured Games"
  type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
<link rel="http://opds-spec.org/featured"
  href="/opds-catalogs/featured_apps.xml"
  title="Featured Apps"
  type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>

With this syntax, any OPDS client can now be aware that the catalog would like to feature a selection of games and a selection of applications.

Even on smartphones, some OPDS 1.0 compatible clients already support this syntax.

For example, Aldiko can display a carousel on top of the other navigation elements, and Bluefire Reader has a block dedicated to such items.

Popular Items

In a similar way, the Android Market also display a selection of popular apps in a second block under the featured items.

In OPDS, we also have a relationship for popular items: http://opds-spec.org/sort/popular

<link rel="http://opds-spec.org/sort/popular"
  href="/opds-catalogs/top.xml"
  title="Top Free Apps"
  type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>

Other rel values

Aside from relationships for featured items (http://opds-spec.org/featured) and popular items (http://opds-spec.org/sort/popular), the OPDS specification also defines rel values for new items (http://opds-spec.org/sort/new), customized recommendations (http://opds-spec.org/recommended),  items that you’ve already acquired (http://opds-spec.org/shelf) and your subscriptions (http://opds-spec.org/subscriptions).

It is very easy for a catalog to add a few links with the proper relationships and enable clients to create a great looking experience. One benefit of this approach is the ability to fallback to something basic on smaller screens, and expand the experience on tablets/laptops/desktops without relying on a different catalog.

Clients can also entirely design how they’d like to handle these elements: how to place them, how many items should be displayed etc.

Originally posted on The OPDS blog by Hadrien Gardeur.
Advertisements

Written by internetarchive

June 15, 2011 at 2:32 pm

Posted in OPDS

%d bloggers like this: