Growing Venture Solutions - GVS - drupal themes http://growingventuresolutions.com/taxonomy/term/52/0 en The Drupal Themer's Book - Review of Front End Drupal http://growingventuresolutions.com/blog/drupal-themer-s-book-review-front-end-drupal <p>I just finished reading Front End Drupal (<a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2Fo%2FASIN%2F0137136692&amp;tag=drupal0a-20&amp;link">buy on Amazon</a>, <a href="http://www.frontenddrupal.com/">companion site</a>) 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 <a href="http://emmajane.net/">Emma Jane Hogbin</a> and <a href="http://kkaefer.com/">Konstantin Käfer</a> 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.</p> <p><a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2Fo%2FASIN%2F0137136692&amp;tag=drupal0a-20&amp;link"><img src="http://growingventuresolutions.com/gvsfiles/front_end_drupal_smaller.jpg" alt="Front End Drupal - Theming Book" /></a><br /> This photo shows a nice screenshot, some helper explanation text, and my next read in the background.</p> <h3>Favorite Parts of Front End Drupal</h3> <p>There are several general things and several specific things that I liked about this book:</p> <ul> <li>They cover not only "Front End Drupal" but also some best practices for Web design and information architecture in general.</li> <li>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.</li> <li>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!</li> <li>They provide guidance for converting Wordpress and Joomla! themes to Drupal, which is something I've never seen covered before (page 101).</li> <li>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).</li> <li>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).</li> </ul> <h3>Some Suggested Enhancements</h3> <p>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 <a href="http://crackingdrupal.com/">Cracking Drupal</a> the first book to tackle the subject of security in Drupal.</p> <ul> <li>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 - <a href="http://api.drupal.org/api/function/filter_xss_admin">filter_xss_admin()</a> - which should be used to filter text entered by the "admins" of a site and which should only be filtered mildly. </li> <li>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.</li> <li>The <a href="http://api.drupal.org/api/function/l">l()</a> 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 <code>&#039;html&#039; =&gt; TRUE</code> option and how to sanitize text if you use that optional argument.</li> </ul> <p>These are minor nits, though, and overall I think the book is great.</p> <h3>Room for expansion in Front End Drupal</h3> <p>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.</p> <p>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.</p> <p><em>The affiliate links in this article are from the <a href="http://association.drupal.org">Drupal Association</a></em></p> http://growingventuresolutions.com/blog/drupal-themer-s-book-review-front-end-drupal#comments Planet Drupal book review drupal themes Sun, 12 Jul 2009 17:52:52 +0000 Greg 546 at http://growingventuresolutions.com