drupal

30 Dec

Slashdot review of Drupal 7 Module Development

in drupal, php, programming, slashdot

Michael J. Ross contributed a review of our Drupal 7 Module Development book. Slashdot typically writes very fair reviews, and Michael's is no exception. He does a good job of digging into each chapter and examining both the strengths and weaknesses of the book.

Slashdot review of D7 Module DevelopmentSlashdot review of D7 Module Development
Up front I would like to make a request. We would like to encourage readers to use the GitHub book code instead of the downloadable code bundle from Packt. The bundle packaged by Packt was outside of our direct control, and seems to contain earlier versions of some of the code. In addition, the GitHub project contains code updated to the latest errata that we know about. And we respond to bugs filed through GitHub. In other words, the code there is a living document.

I found it interesting that Michael could tell that different authors had written different chapters. This is very much the case. Each of us took a turn or three as a "primary author" for a chapter, while others just provided input about what should be covered or how well a topic was covered. This gave each of us a chance to play to our own strengths. It also (I hope) held at bay the old "too many cooks in the kitchen" problem. We assumed that readers would be able to move effortlessly from chapter to chapter without being tripped up by the unavoidably different voices of the authors. We could have added a byline to each chapter, giving a clear indication about who wrote what, but we just didn't feel like that added anything.

Perhaps the biggest difficulty writing the book was in continually trying to hit a moving target. When I began chapter 2 well over a year ago, Drupal was still under very heavy development. APIs were changing. Strategies were still in flux. Documentation (and in some cases, design) was not complete. This led to an interesting writing process: Write the chapter, go back three months later and try to find out if anything changed, go back three more months later and try to find out if anything had changed, etc. Thankfully, the tech reviewers caught many of these issues along the way. Needless to say, it is far easier to write a book against a finished code base, but it was more important to us that we get the book in developers' hands right around the time D7 was released. It was sort of our D7CX commitment.

26 Oct

Google Summer of Code Mentor Summit, 2010

in drupal, google, gsoc

For the second year I was given the opportunity to represent Drupal at the Google Summer of Code Mentor Summit. The primary purpose of the Mentor Summit is to bring together the projects that participated in GSOC, and provide a forum for discussions.

While there, I learned about what other CMS systems are up to and how other Open Source projects were working with Git and DVCS systems. Here are some of the highlights.

13 Oct

Why Object-Oriented Programming is Bad for Drupal

in drupal, php

I have led or contributed to dozens of Open Source projects. And with one exception, all of my code has been Object Oriented. (That one exception is Drupal.) Java, Python, PHP, and even OO Perl... I'm a dyed-in-the-wool OO developer. So this may come as a shock to anyone who knows me, but I am about to make the argument that OO is bad for Drupal.

Trust me, this is not a high point in my development life. I feel like I'm telling my child that she should skip college; that such a level of sophistication is just not necessary in her life. And I guess in a way that is precisely what I am saying.

18 Sep

New Book: Drupal 7 Module Development (released in RAW)

in drupal, learning drupal 7 module development

Learning Drupal 7 DevelopmentLearning Drupal 7 DevelopmentThe Learning Drupal 7 Module Development book is now in Packt's RAW (Read As we Write) program. This has been an exciting few months, as Larry (Crell) Garfield, Ken Rickard, Greg Dunlap, John Albin Wilkins, Sam Boyer, Matt Farina and I have all worked together to bring this book to fruition. As you no doubt know, Drupal 7 is still in the polishing stages. So is our book. But Packt has once again decided to release the book in RAW format, which means you can basically read the book as we write it -- and before we've added that final layer of glossiness ourselves.

The book is far more than an update of my solo effort, Learning Drupal 6 Module Development. Instead, it's an entire rewrite, with each of the members of this phenomenal team contributing chapters that best suit their own expertise. For that reason, I don't think I've ever been more excited about a book release.

While we have very conscientiously written this book to be approachable for the new Drupal developer, we have also made a concerted effort to cover the changes between Drupal 6 and Drupal 7. The experienced developer just looking to get up to speed should find this book a quick and valuable read.

Some of the things we cover:

  • Theming for developers
  • The block system
  • The new Entities API
  • Building admin interfaces
  • The new Files API
  • Nodes and permissions
  • JavaScript
  • Creating installation profiles

And as usual, the book is full of practical projects that will really get you started.

07 Sep

Configuring MacGDBp for Debugging a Local Debian Virtual Machine

in Debian, drupal, mac, macgdbp, os x, virtualbox, xdebug

In my current Drupal development environment, I run an entire Debian server stack (LAMP + Memcache + Varnish, etc) inside of a VirtualBox virtual machine. On those frustration-laden occasions when I need to fire up the debugger, I use MacGDBp to connect to the virtual machine. Here's how I configure them. (If you just want to configure MacGDBp for debugging with MAMP or OS X's Apache, you may want to read an earlier article, and then check out the updates for Snow Leopard.

26 Aug

Reflections on Google Summer of Code

in drupal, google, gsoc, querypath, quiz

This was the second year that I have been involved as a mentor for Google's Summer of Code program. And in both cases, I've worked as a mentor for Drupal. Last year, I worked with sivaji on a project involving the Quiz module. This year, I worked with eabrand on QueryPath and the QueryPath module.

In both cases, the projects were highly successful. I'm thrilled to have had the opportunity to work with two very gifted up-and-coming developers.

I think one of the most critical questions to ask of any program like GSOC, is whether or not it produces the results (pedagogical and professional) that it is after. With both Sivaji and Emily, the answer is a resounding yes.

  • Since finishing his GSOC project, Sivaji has begun his professional life as a web developer focused on Drupal. Recently, he and his colleagues started E-ndicus, a Drupal-focused software development company in his home town of Chennai.
  • Emily is now a software engineer at HP. She continues to contribute to QueryPath, and was just this week featured on Google's blog. Last week, she joined me on the Drupal Dojo QueryPath session, too.

I doubt either of these individuals learned much from me during our GSOC projects. More than anything, it just takes hard work, persistence, and attention to detail to finish a GSOC project. But I've certainly learned a lot from them. And both Quiz and QueryPath have benefited enormously from the work of these two.

16 Aug

Drupal Dojo: "QueryPath: It's like PHP jQuery in Drupal!"

in drupal, gsoc, programming, querypath

On August 17th at 12pm EDT (9AM PDT), I will be doing the Drupal Dojo session, "QueryPath: It's like PHP jQuery in Drupal!". To sign up, head over to the webinar signup.

I'm particularly excited about this for three reasons:

  1. Emily will be joining me to talk about her GSoC project.
  2. We will be discussing QueryPath 2.1 and the new Drupal 7 QueryPath module.
  3. The totally gorgeous new QueryPath logo (designed by Michael Mesker) will be unveiled.

This has been an exciting summer for QueryPath, and this webinar will preview many of the QueryPath technologies that are on the cusp of being released.

16 Apr

Video: A Developer's Introduction to Drupal

in drupal, php, programming

A few weeks ago I did a webinar for PHP|Architect and the Tek-X conference. The webinar was recorded, and is now available as a video. You can watch the presentation on A Developer's Introduction to Drupal at their site.
Drupal Intro WebinarDrupal Intro Webinar

The presentation is aimed at developers who are just getting started with Drupal and want to know how things work and where they can dive in.

Lots of thanks to Cal Evans and the PHP|Architect crew, all of whom were awesome to work with.

26 Mar

Loading Drupal Nodes into MongoDB with Drush

in drupal, mongodb, php, programming

To do some prototyping, I wanted to load all 32k of our Drupal nodes into MongoDB. At first, the thought of doing this seemed daunting. Then I realized that with Drush I could use a very simple script to perform an entire migration.

The result: With a 14 line PHP script, I transferred all of the nodes (CCK, taxonomy, and all) without a glitch.

Read on for the full explanation.

22 Mar

A 53,900% speedup: Nginx, Drupal, and Memcache bring concurrency up and page load time way down

in drupal, memcached, nginx, performance

With a clever hack utilizing Memcache, Nginx, and Drupal, we have been able to speed the delivery time of many of our major pages by 53,900% (from 8,100 msec to 15 msec, according to siege and AB benchmarks). Additional, we went from being able to handle 27 concurrent requests to being able to handle 3,334 concurrent requests (a 12,248% increase).

While we performed a long series of performance optimizations, this article is focused primarily on how we managed to serve data directly from Memcached, via Nginx, without invoking PHP at all.
Nginx, Memcached, and DrupalNginx, Memcached, and Drupal

Read on for the full explanation of how we achieved this huge speedup.