Case Study: mod_Book

My wife and I recently moved from London, England, to Florence, Italy, via Sweden. In the first edition of this book, we were just about to leave, and to that effect, much of the contents of our home was already in storage: most of it being books. In the end, it turned out we sent 86 tea chests full of books across Europe.

So now we’re unpacking. Many people really like our books and would like to borrow them, and so, for many reasons, it would be quite cool to list details of our books into a feed. As we unpack the books, we will most likely try to scan their barcodes and arrange our library (we’re geeky like that), so we will have all sorts of data available.

The challenge is then to design a module for both 1.0 and 2.0 (and Atom, eventually) that can deal with books.

What Do We Know?

The first thing to think about is precisely what knowledge you already have about what you’re trying to describe. With books, you know a great deal:

  • The title

  • The author

  • The publisher

  • The ISBN

  • The subject

  • The date of publication

  • The content itself

There are also, alas, things that you might think you know, but which, in fact, you don’t. In the case of books, unless you are dealing with a specific edition in a specific place at a specific time, you don’t know the number of pages, the price, the printer, the paper quality, or how critics received it. For the sake of sharable data, these aren’t universally useful values. They will change with time and aren’t internationally sharable. Remember ...

Get Developing Feeds with RSS and Atom now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.