X
Business

Lessons from Drupal

The most important thing I learned (for at least the 100th time) from some very preliminary work setting up a Drupal website site was to take the advice I routinely hand-out: assuming you know, when you don't, is a guaranteed way to get into trouble.
Written by Paul Murphy, Contributor

In reviewing various content managers for more complex, news and discussion oriented, web sites I settled on Drupal as a reasonable candidate and decided to find out if it would really do what I needed by trying some key parts of it.

Here's Drupal's own "about drupal" spiel:

Drupal is a free software package that allows an individual or a community of users to easily publish, manage and organize a wide variety of content on a website. Tens of thousands of people and organizations are using Drupal to power scores of different web sites, including

  • Community web portals
  • Discussion sites
  • Corporate web sites
  • Intranet applications
  • Personal web sites or blogs
  • Aficionado sites
  • E-commerce applications
  • Resource directories
  • Social Networking sites

Drupal is ready to go from the moment you download it. It even has an easy-to-use web installer! The built-in functionality, combined with dozens of freely available add-on modules, will enable features such as:

  • Content Management Systems
  • Blogs
  • Collaborative authoring environments
  • Forums
  • Peer-to-peer networking
  • Newsletters
  • Podcasting
  • Picture galleries
  • File uploads and downloads

and much more.

Drupal is open-source software distributed under the GPL ("GNU General Public License") and is maintained and developed by a community of thousands of users and developers. If you like what Drupal promises for you, please work with us to expand and refine Drupal to suit your specific needs.

Drupal is built according to a set of principles:

  • Modular and extensible. Drupal aims to provide a slim, powerful core that can be readily extended through custom modules.
  • Quality coding. High quality, elegant, documented code is a priority over roughed-in functionality.
  • Standards-based. Drupal supports established and emerging standards. Specific target standards include XHTML and CSS.
  • Low resource demands. To ensure excellent performance, Drupal puts a premium on low-profile coding (for example, minimizing database queries). Drupal should also have minimal, widely-available server-side software requirements. Specifically, Drupal should be fully operational on a platform with a web server, PHP, and either MySQL or Postgresql.
  • Open source. Drupal is based on the open source philosophy of collaborative free software development and is licensed under the GPL. Drupal is itself open source and builds on and supports other open source projects. Specifically, Drupal is coded in the open source scripting language PHP and supports as primary data sources the open source database formats MySQL and Postgresql.
  • Ease of use. Drupal aims for a high standard of usability for developers, administrators, and users.
  • Collaboration. Drupal development supports open, collaborative information sharing systems and approaches.

That's certainly singing my song, but how well does it actually work?

For the installation I did the usual thing: editing the INSTALL.TXT file to leave two install scripts (the repeatable one for Drupal and a non repeatable one creating the database instance - I used MySQL); and ran them with no hicups.

Since I already had Apache2, PHP, and MySQL installed, the whole thing took about ten minutes to the point where the next step was to bring the system up and run their PHP installer via the browser.

That failed at first because the .htaccess file included with drupal has directives my apache2 server refused to accept in that context - but moving the thing to the virtual hosting section in httpd.conf and restarting apache removed the bottleneck. Since this isn't even a pre-production pilot I left it at that - but I'll find out later what the right thing really is.

As installed everything in the default system seemed to work as advertised.

Now, as I understand things (not necessarily correctly) Drupal divides a page into blocks with block content generated by modules and presentation formats controlled by themes. Since one of the big attractions of the system is that there are hundreds of available modules and themes I downloaded some that seemed interesting for my purposes.

There was an early "not thinking Drupal" hiatus in this: I couldn't figure out why the menus and other elements I was creating weren't showing up - but, duh :) , nothing shows up unless there's content, so adding some text to each makes everything show up properly.

Content creation, incidently, turns out to be one of Drupal's strongest capabilities. The default system supports most common forms of content creation including full HTML and both push and pull remote posting - plus you don't have to be a programming whiz to see how files from almost any DTP solution could used.

Every module, and four of the six themes, I downloaded worked "out of the box" with no obvious complications.

My second place theme finisher, the genesis theme failed to run as installed because of template.php calls a non existent function ((genesis_theme()). Since I think (note the tentative nature of this conclusion :) ) this is a genesis specific variation of the core hook_theme() function from the basic package you should just about be able to just copy it in; but since I wasn't going to change anything in the theme, simply commenting it out worked for the scope of this review.

Humiliatingly, the one I really liked best for the job: nrebuild, from lynxlabs, and therefore decided to focus on for the test implementation, produced total and utter befuddlement - and what was worst about it was that this happened precisely because I did exactly what I'm always cautioning others against: assuming I knew something, when I didn't.

To understand what happened, you have to look at the default nrebuild front page - so click here to have a look.

The things labeled "Root", "New Menu", "Preview", and so on are all blocks produced by matching modules and formatted according to the nrebuild theme. It's all very cool - they even have a drag and drop interface for moving these things around on the page.

However.. I wanted to replace those region names - things like "before head > column 1" with links to things like "Rants" - a political blog.

A quick grep shows the existing names scattered throughout the code - but I never even thought to question the assumption that the actual display content would be DB stored and manipulated via the browser interface. As a result I got more and more frustrated at a system that seemed to work perfectly in every respect except that it never did what I wanted.

Eventually (about three coffees later) I sent off a note to the people at Lynxlab asking them how to do it - and, despite this being a Sunday, got an almost instant response: in Russian.

A bit later a second version arrived: in googlese - the language you get when a question in English gets translated to Russian by translate.google.com and then the answer in Russian is put back into English the same way:

I do not clearly understand what I can to help you. I help you if you explain the example that you want to know. Theme n_rebuild was developed for programmers and integrators. If you know PHP or html and css bad, you can not remake any theme (and nRebuild too).

So, oops! moment: bad assumptions on my part - and two hours later I got another note from someone at Lynxlab confirming that indeed the way to do this kind of thing is simply to edit page.tpl.php: simple, direct, efficient - vi, not click and hope.

So, overall, what?

There are key bits for my purposes, including the ad management, payment, and ecommerce modules, that I haven't even looked at yet; and there are some whose most valuable capabilities are hard to explore (but easy to appreciate) in a casual trial. The flashvideo manager for example, offers the ability to copy videos to high bandwidth co-hosting sites like Amazon's without losing control of them - and that's exciting, but not easily tested at this stage.

What I have seen, however, seems insanely great: a clearly very capable system that does easy things like Wordpress style blogging out of the box and more complicated things with relatively little set-up difficulty - once you start to "think Drupal." So far, it's proven an order of magnitude simpler to work with than Apache Cocoon (another product I love) was two years ago, and the problems I've seen have been mostly due to my own insistence on seeing the wrong way as necessarily right.

Editorial standards