I'd like to give proper credit and thanks to Cameron Childress of Sumo Consulting for the ColdFusion CFC that interfaces with Amazon's Web Service for Associate referals. Cameron has dubbed it the "BookKit CFC" and distributes it for free from his website. The books displayed in the Recommendations panel on this page are rendered using BookKit CFC.


The CFC is really a piece of art and I enjoyed reading the code and following the logic. The CFC queries Amazon's webservice, generates the HTML behind each book view rendered, and then caches the HTML result for some interval (controlled in a config.xml file). Each call to the method getRandomASID( ) pages through the cached result list, yielding a new for every page hit.


To enhance your experience here on TalkingTree.com, I've written a wrapper around the CFC that provides category-specific book recommendations based on which blog category you are viewing, although the main blog page displays a default set of recommendations, and categories such as ColdFusion, Flex, Linux, and Biology display a narrowed list of books. To implement this I use a csv text file to hold the list of book ids, then I filter on the blog category, and finally call the CFC while passing the filtered book list.


Thanks Cameron!