Building the New York Times Bestsellers application

The last prototype application I built was the New York Times Bestseller application. This application is a riff on one of the potential Platform applications demonstrated at last year's ALA. The "Bestseller App 2.0" allows a library to select a given New York Times Bestseller list and see which items from that list the library doesn't currently own. Then a user can select which of these items should be purchased and how many copies should be purchased. An Amazon cart with these items is then created as is a WMS order.

The application starts by using the New York Times API to get a list of all the possible current New York Times Bestseller lists and present them to the user. The user has to choose a list and input the OCLC Symbol of their library then submit this to see which of the items on the list the library doesn't currently own.

The application then uses the NYT API to get the current bestseller list selected. It loops through the items on the list and uses the ISBN(s) for each item to look up using the WorldCat Search API to see if the library has holdings. The application then presents the user with a list of items which the library does not currently own.

The user then is able to check off which items they want to purchase and choose the number of copies to purchase.

Clicking the "Place Order" button creates the order in WMS and creates and Amazon cart all the items on the order. The user is presented with a screen that lists the order details from WMS and a link to the Amazon cart.


Ironically although this application is the most complicated of the three prototype applications built, it presented the fewest challenges. This is a result of the fact that many of the functions performed by this application mirror those performed in applications written earlier. For example the order creation code had already been written when the Alibris application was developed. This application expanded it slightly to allow the number of copies to be set. The Amazon cart creation code came directly from the Amazon application. As a result the only new code that this application required was code to interact with the New York Times Bestseller API. Luckily I've worked with this API in other projects and could easily crib code from existing demonstration code I had.

So perhaps the biggest challenge with this application was scope creep. It was so easy to write that I started to think about additional features I could add to it. Like the ability to allow users to select the branch and shelving location they want to assign a particular time to. Also, having finished this code I realized that I'd really like to take the reuseable code from all the applications and abstract it into a set of reusable functions of classes. Given my time constraints and the alpha nature of these I really didn't have time to do this. But that doesn't mean I couldn't do some or all of these things in the future. Like any coding project there is always room to improve and build more.

  • Karen Coombs

    Karen Coombs

    Senior Product Analyst