GVS is now part of Acquia.
The Drupal Themer's Book - Review of Front End Drupal
I just finished reading Front End Drupal (buy on Amazon, companion site) and wanted to share some of my favorite points, some parts that could be enhanced, and some ideas I have for ways to expand it in a future edition. I've known Emma Jane Hogbin and Konstantin Käfer for some time now through the Drupal community and respected their work. So, I was quite interested to see how they would do in book medium: it's some impressive work. In my experience training and writing books, one of the hardest things is picking the right audience for the book and then making sure that your book has support for people above and below the level of your ideal audience. You need sidebars to help explain details on advanced topics and good section titles so that advanced people know when to stop skimming over the things they know and start reading again.
This photo shows a nice screenshot, some helper explanation text, and my next read in the background.
Favorite Parts of Front End Drupal
There are several general things and several specific things that I liked about this book:
- They cover not only "Front End Drupal" but also some best practices for Web design and information architecture in general.
- Mixed among the details of template files and overrides is solid advice about how to configure Drupal's core and several contributed modules so that a reader who is new to Drupal will learn much more than just theming.
- They cover advanced Javascript and jQuery concepts in a way that made it accessible to me, even though I've struggled to fully embrace the language for about 10 years now!
- They provide guidance for converting Wordpress and Joomla! themes to Drupal, which is something I've never seen covered before (page 101).
- They give a nice example of using the preprocess hook to suggest template names based on the page alias - something which could come in quite handy on many sites (page 134).
- Chapter 5 talks about Views almost too briefly - but then the topic is covered in more detail in chapter 8. This book is not, though, a sufficient guide to the topic of Views (and that probably makes sense).
Some Suggested Enhancements
One area where I was a little disappointed was some security related topics. In general the book stays at the theme layer which forces some compromises. There is also some advice on security functions that incomplete. Of course, I'm a little more picky about this topic as the author of Cracking Drupal the first book to tackle the subject of security in Drupal.
- The book covers check_plain and check_markup as the two text filtering functions in Drupal. In fact there is at least one other common one - filter_xss_admin() - which should be used to filter text entered by the "admins" of a site and which should only be filtered mildly.
- On page 206, among other places, they cover ways to hide fields in a form. It's important to note that this is only cosmetic and not a "security" measure because it is quite common for admins or end users to switch the theme in which case the form theming to hide fields would be completely lost. In my opinion this task is best left to a module and the theme_form_id_form function should only be used to re-order form elements or add some extra HTML.
- The l() function, discussed on 226, is shown with a check_plain around the text. This is unnecessary because the l() function performs that filter itself by default. Better would have been to explain the use of the
'html' => TRUE
option and how to sanitize text if you use that optional argument.
These are minor nits, though, and overall I think the book is great.
Room for expansion in Front End Drupal
Aside from being updated to cover newer versions of Drupal, I think it would be great to cover a few more contributed themes and discuss the best strategies for "sustainable theming" that has been a hot topic in Drupal recently. I also would have appreciated more examples of writing jQuery components in chapter 11. The one example - a slideshow component - was hard for me to really get excited about so I had a hard time following the explanation. One idea: I would love to see an example of modifying the DOM by adding content into a page based on a user clicking on a link or form element.
As Dries said, "For Drupal to succeed, we need books like this." With so many Drupal focused books available these days it's hard to find genres that still need to be covered, but this book really filled an important gap.
The affiliate links in this article are from the Drupal Association
- Login to post comments
GVS projects
GVS is now part of Acquia.
Contact Acquia if you are interested in a Drupal Support or help with any products GVS offered such as the Conference Organizing Distribution (COD).