Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Image

Front End Drupal 68

Michael J. Ross writes "Content management systems (CMSs) are created largely by Web developers using back-end programming languages (such as PHP, by far the most common choice). The free CMSs are built as open source projects, by volunteers who have many demands on their time. As a result of both of these competing factors, far less time is devoted to the front-end aspects of these CMSs. In turn, the "themes" that define the appearance of a CMS-based website are typically substandard, in the eyes of many Web designers and, most likely, countless users of those sites. This criticism has been leveled even against Drupal, although the situation is improving. A new book, Front End Drupal: Designing, Theming, Scripting, is intended to help Drupal designers everywhere speed up that process of improvement." Read on for the rest of Michael's review.
Front End Drupal: Designing, Theming, Scripting
author Emma Jane Hogbin and Konstantin Kafer
pages 456
publisher Prentice Hall
rating 8/10
reviewer Michael J. Ross
ISBN 978-0137136698
summary A comprehensive guide to creating Drupal themes.
The book was written by Emma Jane Hogbin and Konstantin Käfer, and published by Prentice Hall on 15 April 2009, under the ISBN 978-0137136698. As suggested by its title, Front End Drupal "is designed to help both experienced designers and rank novices get an understanding of how Drupal theming works," to quote from the book's foreword, written by Dries Buytaert, Drupal's founder and project lead. He notes that creating a Drupal theme requires knowledge of "XHTML, CSS, JavaScript, and PHP, all within the context of Drupal." These are some of the key technologies addressed in the book's eleven chapters, and it assumes that the reader is at least familiar with all four of them. The first of the two appendices explains: how to install Drupal and contributed modules on the three different platforms supported (Windows, Linux, and Mac OS X); basic configuration and administration; and installation troubleshooting tips. The second appendix comprises some of the more important example code used in the book, and brief overviews thereof. At the end of the book's 456 pages, there is a coupon code for a 45-day free subscription to read the online edition in the Safari Books Online library

All of the sample source code and themes can be downloaded from the authors' book website. The site also has the author biographies, as well as reported errata, of which there are two, as of this writing. What is most striking about the site is its styling — or lack thereof. One would think that the authors of a book on Drupal theming would have put a commensurate amount of effort into crafting an attractive custom theme for their own website — one that demonstrates their own theming skills and, more importantly to the reader, what is possible using the principles taught in the book. Remarkably, the authors appear to have done nothing more than take the Drupal 6 default theme, Garland, and change the color scheme from shades of blue to shades of brown (matching the book cover); only the blue Drupal icon is unchanged, and its color clashes with the rest of the site.

Prentice Hall makes available their own Web page for the book, where visitors will find a description, two Amazon.com reviews, the table of contents, and a sample chapter ("The Drupal Page") as a PDF file. The entire book is also available in electronic form.

In the book's preface, the authors briefly summarize the chapters and appendices, and define the target audience and technologies with which the reader should be knowledgeable (noted above). Readers should also be familiar with how Drupal works, have some experience administering a Drupal site, and ideally possess some knowledge of website design and development; but that last one is not a hard requirement, since the authors promise to explain the basic concepts as needed.

Any reader who begins the book by skimming the table of contents or the preface's summary of Chapter 1, may be tempted to skip that chapter, especially since it discusses team workflow — something freelancers generally ignore, and employees leave to management. Yet the earlier material is worth reading, if only that it begins to establish a baseline of terminology used throughout the rest of the book. It also provides some basic information on content structure, layout, and naming on a Drupal page. For illustrating the ideas under discussion, the authors use a number of existing websites. In fact, too many different sites: Readers probably would have found it more useful for each idea to be presented in the context of a single neutral subject area, and without distractions such as toilet birthdays (no kidding). Even better, the ideas could have been illustrated through example pages — each page illustrating one or several ideas — built from the ground up. By focusing on pages that a reader could quickly create on his own, the authors could have eliminated the screenshots of those various websites. One example is Figure 1.1, which combines two images, with the topmost one largely obscuring the one below. Most of the topics are covered at a very high level — possibly higher in some cases than readers will find valuable. Nonetheless, there is much solid advice, including some recommended theme resources later in the chapter. In the earlier section on "Topical Organization," there is a brief but excellent discussion on the relative merits of limited versus unlimited tag vocabularies.

The second chapter continues to lay the groundwork, by introducing basic Drupal theme strategies and terminology, three major modules that veteran Drupal developers use frequently (CCK, Views, and Devel), and some valuable browser-based development tools. The definitions of Drupal terms are useful — especially for newbies confused by the Drupal handbooks. One exception is the authors' alternative metaphor for "weight," which proves more confusing than the original. Readers then begin learning how to use the aforesaid modules and tools. However, several of the authors' statements are misleading: On page 43, they are instructed to install the CCK module, and then given a list of additional modules needed; the first one on the list is... CCK. On the next page, the authors state that the FileField module requires the Token module, but it apparently does not. On the page after that, the "manage fields" link is given as the "add field" link. Those last two discrepancies suggest that the book is based on outdated versions of Drupal and/or the contributed modules under discussion, even though its publication date is just a few weeks prior to this writing. Any version differences are likely impossible to confirm, since the authors fail to mention which versions they are using, or provide any guidance to the reader as to which versions to use — unusual for a programming book. At the beginning of the chapter, the reader is told he "will learn step-by-step how to create a mini portfolio Web site," but the process peters out not long after a new content type is created, and the reader finishes the chapter with no such portfolio site.

Chapters 3 and 4 move the reader one step closer toward the ultimate goal of being able to create a new theme with confidence. The first one explains how to find, install, and configure prebuilt themes — also, how to create a very basic theme from scratch, and a subtheme using the Zen starter theme. This material comprises a generally thorough introduction to the topics, compared to most documentation, with plenty of step-by-step explanation. An exception is the Zen section, in which the reader is instructed to place the directory into the themes folder; but it is not made clear whether this is the primary Drupal themes folder, or sites/all/themes (as advised several pages earlier). Secondly, in step 3, readers can only guess as to what is meant by "the main CSS file," as there are several. On the next page, the authors mention "configure" links next to the Zen and Zen Classic themes, but no such links exist for those starter themes. The fourth chapter discusses page template files, site-wide variables, menus and navigation, regions and blocks, search results, templating different sections of a site, aliased URLs, taxonomy templates, and styling for output to printers, PDF files, and mobile devices.

The fifth chapter explores the details of how to modify existing node templates, or create new ones, for all content types. This is what makes it possible to develop highly customized page content, including summaries, embedded images, image galleries, and content based upon output from the Views module. The subsequent chapter focuses on one of the most problematic types of content — forms — and how they can be created using the CCK. The authors recommend TinyMCE as one's WYSIWYG editor module, but that has apparently been replaced by the Wysiwyg API. User editing of content is a key element in building an online community using a Drupal-based site, and it is the topic of Chapter 7, which discusses user profiles, permissions, access, comments, blogs, forums, wikis, spam, CAPTCHAs, and how to make content private for members only. The next chapter addresses the theming of the administrative interface, which the typical site user will never see, but can have a significant impact upon the productivity of the developers and maintainers of a site. Readers learn about RootCandy (a refreshingly different admin theme), and how to theme error pages.

The final three chapters focus on JavaScript and jQuery. Consequently, they compose a stand-alone resource of their own, and could even have been used as the basis for a separate book. Chapter 9 provides an overview of the language, while the other two chapters cover jQuery and how it can be used as part of a Drupal-based site.

Scattered throughout the manuscript are tips, each indicated with a pencil tip icon. These help to break up the text visually, and provide valuable guidance. The contrast between the black text and the dark gray background could certainly be improved; but most of the tips are fairly short, so this does not pose a major problem.

Every chapter ends with a summary, and not a single one of them is useful or needed. Any unique information conveyed in them should have been merged with the introductory paragraphs for the respective chapters, which is where readers would be looking anyway to see what each chapter addresses.

The book has numerous minor problems, including grammatical and stylistic errors, such as dashes incorrectly performing the duty of semicolons, some URLs missing the root directory slash, and excessive use of exclamation marks (more than a dozen before even reaching the second chapter). When stating the sequence of menu items to choose in order to reach a particular admin page, the authors should use ">" or ">>" to separate the menu choices, as is done in most computer books. Instead, the authors opted to use commas, which of course turns every sequential menu path into a list of menu items, which is nonstandard and disconcerting. As is typical in a first edition, the book contains several errata: "Partnership" in Figure 1.7 (page 10), "the GiMP" (page 14; should simply read "GIMP"; after all, this isn't Pulp Fiction), "only focus only" (page 26), "Modification / Date" in Figure 2.1 (page 37; should read "Modification date"), "Content Creation Kit" (throughout the book; should read "Content Construction Kit"), "of [the] view" (page 56), "http:jigsaw" (page 66), "INSTALL [is] present" (page 79), "of [a] page" (page 100), and "to to" (page 125) — in the first quarter of the book alone.

A lingering disappointment is that some of the promised examples are not finished in the narrative, such as the portfolio site mentioned earlier. Secondly, the downloadable source code is incomplete, apparently missing the example code in the first few chapters, such as the Bolg theme files. Furthermore, the downloadable code is not organized by chapter, making it difficult to even determine what example code is missing.

On the other hand, the book has much to offer. For the most part, the explanations and step-by-step instructions are clear, and the diagrams and screenshots are all neatly presented and helpful — though some sections of the book could have benefited from more such figures. With its extensive coverage of all the key technologies, and its wealth of valuable tips, Front End Drupal is an essential resource for learning how to create Drupal themes, and fills a long-standing gap in the Drupal literature, better than any other book currently available.

Michael J. Ross is a freelance Web developer and writer.

You can purchase Front End Drupal: Designing, Theming, Scripting from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

*

This discussion has been archived. No new comments can be posted.

Front End Drupal

Comments Filter:
  • by diskofish ( 1037768 ) on Monday May 18, 2009 @02:28PM (#28000731)
    and I said "Good Riddance". Drupal is powerful, but not really that fun to develop with.
  • by revjtanton ( 1179893 ) on Monday May 18, 2009 @03:15PM (#28001481) Homepage Journal

    I installed a Joomla site for a latino non-profit in Baltimore who's previous site was a mess. It was a mess because my "predecessor" threw a bunch of random things together (directory using a database and articles in plain html only) and those who run the charity don't know anything about web design at all. I came in and installed Joomla and designed a few things to work in that installation because it is easy for someone to use AFTER I step away.

    If your argument is that Joomla and Drupal have no place because web apps will outpace their development then why is the Joomla extension repository so extensive and growing? For every new app or site that comes along someone will develop a module or plugin for the CMS's because a CMS is easier to handle for a business that doesn't conduct even 50% of it's business online and so there will be a market for easy to use plugins.

    If your main argument is your other one: freelancers who install a CMS and call themselves programmers are frauds then I can't really argue with you. For someone to call themselves a developer or programmer simply because they've installed a CMS is silly, but there are plenty of us who are programmers of one type or another that still use a CMS because there is no need to completely redesign the wheel every year. I'm all for people learning to write code, but if everyone wrote code then my abilities would be worthless...

    All I'm saying is that the capability threshold of any CMS is irrelevant in terms of web applications because anything can be branded obsolete by anything else at any time (see Wolfram|Alpha [wolframalpha.com] vs. Google [google.com]); and while installing or administrating a CMS doesn't make you a developer on its own, plenty of us developers give a CMS it's value and that's what this book is pointing out!

  • by hobo sapiens ( 893427 ) <[ ] ['' in gap]> on Monday May 18, 2009 @04:46PM (#28002789) Journal

    Ah the ever popular Request for Citation, the easy but ultimately ineffective method of deflecting anecdote.

    What, do you expect someone to have some case study that considers which percentage of all websites ever created outgrow their CMS? Argh, as if! Anecdote is the best you'll get in this type of discussion. Guess what? IT pros get paid based on their knowledge of anecdote; it's called experience.

    I agree with OP. Many of these CMS have fairly limited use cases. As soon as you outgrow that you have to hack its core, which often produces less-then-stellar results. Then you have to learn the (in the case of Drupal) byzantine and poorly documented API.

    Use Drupal if you want a blog or some kind of a news site where content is published for people to read and comment on. If you want something more, then creating software to fit your need IS NOT reinventing the wheel. It's building for your particular use case. Don't use a hammer when you need a sawzall.

    If you want a skyscraper you wouldn't make the mistake of piling prefab houses on top of one another to reach the desired height (after all, the walls are built! Why, it'd be reinventing the wheel to build walls!) If you want an eCommerce site or some other relatively complex or specialized app, then don't make the mistake using an overgrown blog site. The time you save doing things that *are* wheel reinvention (authentication, user profile, other plumbing functions) will be lost when you need to kludge something together to stay withing the framework and still fit your needs, and then have to support said kludge.

  • by Anonymous Brave Guy ( 457657 ) on Monday May 18, 2009 @05:34PM (#28003497)

    Would you be willing to elaborate a little on your concerns, please?

    Some colleagues and I are about to start a major overhaul of a moderately large site (a few dozen pages, a few thousand users, a few hundred visitors per day). It seems like the first choice is basically between "standard framework with some plug-in custom features" (CMSes like Drupal) and "custom architecture with some standard plug-in features" (using things like Django and some common libraries).

    So far, we've been forming the opposite view to you: a lot of the site we'll be producing is static content, but a few parts will require moderately structured data (the equivalent of a few tables and some simple SQL queries), and for that balance Drupal seems like the best tool we've considered so far. We don't have much experience with these particular tools, but the guys building the system will be proper designers/developers, while the guys maintaining some of the content will be entirely non-technical. Is our situation just different to what you're describing, or are there really a bunch of problems waiting for us a little way down the line?

  • by room34 ( 1557423 ) on Monday May 18, 2009 @07:33PM (#28004805)
    As someone who has been developing custom CMSes at various jobs for over a decade, I've gotten to know what makes a CMS work (or not) quite well, and I've given most of the popular PHP-based open source CMSes (especially Drupal, Joomla, and MODx) more than a fair chance to impress me.

    So far, I always eventually get frustrated with their arcane and idiosyncratic ways of doing things, which often require as much new specialized knowledge as learning a programming language in itself, and in the end they're never quite the right tool for the job anyway.

    Now that I've been freelancing full-time for a year, I've come to a decision I'm satisfied with: as far as I'm concerned, there's only one pre-built CMS I've never been disappointed by, and believe it or not it's WordPress. But WordPress of course is not ideal for every site (it IS, however, ideal for lots of small- to medium-sized sites, not just blogs). Concurrently I've been developing my own custom CMS on CakePHP, tailored to the specific needs of my clients, and expanded as necessary as I've been adding more clients who are using it.

    So, what it boils down to for me is this: assess the client's requirements, determine whether or not WordPress fits the bill, and either go with WP or use my own proprietary CakePHP-based CMS, expanding it as needed.

    Maybe if one of the "big" open source CMSes were built on one of the equally "big" open source MVC frameworks, it would be worth investing the effort into getting to know inside and out, but just as I've made the decision to focus on PHP as my development language of choice, I've also had to decide to focus on one framework (CakePHP) and one CMS (my own) to know intimately and be able to build upon as needed.

    It's not so much a matter of "staking my career" on it as it is of focusing on my strengths and building upon them. The whole point of freelancing is to get more bang for my buck in terms of productivity (and income) per hour worked. And so far, Drupal, Joomla, MODx, whatever... they just don't fit into that model for me.

8 Catfish = 1 Octo-puss

Working...