I recently finished reading the book “Drupal 5 Views Recipies”, the first book about one of Drupal’s most relevant modules: Views. Here’s my summary.
At first glance, Views’ module page looks like any other page on Drupal.org. Only the high number of commits and comments reveal that this is the module that enables site administrators to use Drupal as a Swiss army knife for content display. In a nutshell: Views is a query-builder with an administrative interface that gives site admins the ability to create almost any possible list of content without having to write the SQL query themselves. From my own experience working with Views, I remember the early challenges I had with this module. The user interface is a monster, not because it is poorly designed, but simply because of the large amounts of settings necessary to give an admin the flexibility she needs. Almost any setting produces some result, but it takes a lot of knowledge to configure a view correctly.
One of the main reasons I was pleasantly surprised about Drupal 5 Views Recipes was the fact that the book doesn’t just give a laundry list of views (or recipes), but instead helps the reader understand Views from a conceptual perspective. Personally, I much prefer a book that explains a concept as it allows me to not just execute an example that’s mentioned, but transfer my knowledge to my individual requirements.
This book delivers a great overview about Views without being overwhelming and starts out with a very simple view that gets fully dissected and explained. It then moves on to explaining working with default views (which come shipped with the Views module) as a basis for a site’s custom views. Views learning curve is especially steep when trying to use taxonomy terms. Drupal 5 Views Recipies describes all the GOTCHA’s and ways to get around them, such as an excellent description on displaying all terms from a specific taxonomy and using Drupal’s “l” function to create the related links.
Views’ right hand (well, they’re pretty much equal partners) is the Content Construction Kit, or CCK, which allows the definition of custom fields for content types. Drupal 5 Views Recipes explains very well how to combine the two modules effortlessly and create views such as a blogroll, using the CCK link field. Another rather complex module is CCK’s Node Reference field, which requires the usage of arguments in Views. Again, the best way to conceptually understand the interaction between the two is a simple example, exactly as the one used by the author. Furhermore, the book explains how to use dates in Views. Both the Date module itself as well as large number of other module gems are explained in the book, such as setting up a calendar block, visually showing aggregated data using the Timeline module and the setup of a summary view, which can be used for things like “blog posts per month”, aggregating the number of posts in a given month.
Since working with the Views module requires dealing with a lot of different aspects of Drupal (content types, users, taxonomy, many different types of CCK fields), I was excited to get much more than just information about Views out of this book. Drupal 5 Views Recipes contains a lot of the “bread & butter” developer knowledge required for every Drupal admin, ranging from dealing with Firebug, how to work with cron and some basic understanding of the UNIX command line. Theming of views results is also mentioned in the book, although it only touches the surface. Also, this are of the book is not applicable to Drupal 6 / Views 2, as theming is the one area that radically changed in Views 2.
Overall, I can highly recommend this book to any Drupal administrator looking to begin working with Views or trying to become a Views expert. I was somewhat sceptical about the fact that this book focuses on Views 1 / Drupal 5 only. Conceptually however, there are no big differences between Views 1 and 2, so I would also recommend this book for Views 2 beginners using Drupal 6. I my view, the documentation that comes with Views is very brief and technical, and I am excited that the author succeeded in explaining the concept of Views in a structured and easy-to-comprehend way. I’ll be the first to buy the second edition with an update to Views 2.