Review: Drupal 7 First Look

Date: Mon Dec 13 2010 Drupal Planet »»»» Drupal 7
Drupal 7 is in the RC phase, so it's time to begin thinking about your upgrade from 6 to 7. (My condolences if you're having to think about a 5 to 7 upgrade) I wish to present to you my thoughts on a new book which will prove rather helpful in upgrading your thinking to the new hotness of Drupal 7.

Drupal 7 is as different from Drupal 6 as that one was from Drupal 5. Making the upgrade seems to involve not just the technical stuff of the upgrade process, but also understanding what's new and how things are different. This book will give you a very good grounding in that newness.

The book is very clearly written, and seems to assume a basic understanding of Drupal already. For example Chapter 1 is not a basic introduction to Drupal, but a "What's New in Drupal 7". Obviously to start with "what's new" the reader must already understand Drupal.

That first chapter gives an excellent overview of the new things, and even the "unmet goals" and what's been removed.

Chapter 2 moves on to installing or upgrading to Drupal 7. Both are well explained with the upgrade process being well thought out. For some reason this chapter includes a section on writing installation profiles. While interesting and useful, that's not an activity one typically does during typical installation or upgrade, and instead is something a Drupal Developer does. This section feels out of place.

The next chapter covers "Site Building with Drupal 7", which is about creating content. The focus however is on what's changed between 6 and 7 in creating content. The add/edit node form has changed quite a bit, especially with these newfangled vertical tab thingies. This chapter includes a discussion of taxonomies, and especially that taxonomies can now have fields making taxonomy terms a much more interesting sort of object.

The next chapter covers the administration section of Drupal. For Drupal 7 they rethought the organization and operation of this area quite a bit, and this chapter goes through each major area discussing navigation and configuration. It doesn't have a comprehensive listing of each screen and setting, which would make the book way too long, and in any case the Drupal 7 redesign would have been a failure if the author of this book felt it necessary to document every screen. What's here is enough to get a good feel for the layout and content, but of course to properly grok the admin area one must spend some time there.

Starting with chapter 5 the book is definitely for those who are writing code of one sort or another. Chapter 5 dives into the theming layer, showing what's new in Drupal 7 theming.

A most interesting change is that page.tpl.php has been split into html.tpl.php and page.tpl.php. Hurm. I'm sure there's a good reason for that. In any case the book does a good job of stepping through the default .tpl.php files, and explaining the purpose and how to copy and modify them. It's possible to use the information in this book to build an entire theme, though it's helpful to already be familiar with Drupal theming.

One of the biggest changes for Drupal 7 was DBTNG which changed things around to use PHP PDO for database portability rather than the homegrown portability layer. Chapter 6 goes over DBTNG. The discussion is very developer-centric and useful if you're upgrading a module to use the new database code. There is a big gap in this chapter in something that I understand is possible, that I want to know how to do, and which isn't explained. Namely, I've heard it's possible to split the database among several databases and to for example store all your fields in a MongoDB instance. The chapter discusses setting up multiple database definitions, writing code to make queries against one database or another, but it doesn't describe this administrator-centric task of causing Drupal to store all the fields in one database, and everything else in another. The administrator in me wants to do this with no coding, or else just a few bits of boilerplate you stick in settings.php. The relevant chapter in the book is developer-centric, and is enjoyable to the developer in me, while not satisfying my inner administrator.

Chapter 7 is the one labeled "Drupal 7 for Developers" even though we've been in developer-land for a couple chapters now. This chapter covers a bunch of stuff other than theming and databases. This chapter is a long list of sections with titles like hook_modules_disabled, hook_url_inbound_alter, and the like. Get used to reading about hooks and other method names. The section covering the new Field API is very short, considering how important it is. There is not enough information here to write a new Field implementation.

The book, Drupal 7 A First Look, is a very useful tool in grokking the update from 6 (or even 5) to 7. It will give you a good grounding in the newness and it's pretty darn comprehensive. Some sections are too brief to tell you everything one needs to know, but the author has very liberally sprinkled drupal.org URL's throughout the book. For example with my question above on database configuration, there are several URL's listed in the book that sound like the right place to go. The section on the Field API that's not enough to write Field implementations, has several URL's that point to drupal.org documentation. With a title containing "First Look" one shouldn't expect this book to be very in-depth, and it's extremely useful to have all the URL's for further exploration.

This book is recommended for Drupal administrators and developers looking to do the upgrade thing.