Lazy Man's Guide to Drupal DB Performance

Or... How I got my server to run OK without wasting too much time.

Database performance, whether in Drupal or any other platform is serious business. There's a lot of benchmarking, analyzing queries, forming hypotheses, making changes, benchmarking again... I've done it and it can take a team weeks to hit performance targets on a major enterprise application. Everyone wants a shortcut. There really are no shortcuts, but sometimes a few tweaks can get you to "good enough".

Git and Drupal: my .gitignore file

If you're doing anything more than just experimenting in Drupal, you should be using some sort of version control software. If you haven't already picked a version control system, you should go with Git. Why?

Drupal hook_page_alter() example

Frypan Module Explained

Thanks to Pasada Media's generous offer of a free beer for anyone demonstrating a live Drupal 7 site at the Toronto D7 Release Party, I decided to upgrade this site. Now I get to play with the new toys in D7!

The Problem with CSS Grids

The 960 Grid System: - designed to make page layout easier, but it's not without a few problemsThe 960 Grid System: - designed to make page layout easier, but leads to tighter coupling between content and presentationCSS was designed to improve web page layout by separating presentation from layout. By separating content (HTML) from presentation (CSS) there is looser coupling from a computer science perspective. The whole idea is that you can change the layout of the entire site by changing the CSS without any changes to the content. The problem is to get anywhere beyond the basics of layout and cross-browser compatibility, CSS takes time to learn and can be frustrating.

CSS grids like the 960 Grid System came along offering the advantages of CSS with fewer layout hassles. Using a grid for layout is nothing new--graphic designers have been using the grid concept for print layout for years. (See: http://en.wikipedia.org/wiki/Grid_(page_layout) )

Productivity Hacks - using Pomodoro scripts

Pomodoro Timer: This cute little tomato can help you focus on your work. A trick I learned could help you stay in the zone by reducing distractions.Pomodoro Timer: This cute little tomato can help you focus on your work. A trick I learned could help you stay in the zone by reducing distractions.It seems like many people in technology are like me... easily distracted and, shall we say, somewhat 'organic' in our organization. In the struggle to become more effective in my work, there are a few tools that I have adopted:

  • Twitter - a great tool for keeping on top of the latest trends in technology (and pictures of other people's cats).
  • GTD - (Getting Things Done, by David Allen - an excellent methodology for organizing tasks with a focus on clearing your mind to facilitate clearer thinking and greater creativity.
  • Pomodoro - a simple tool to help you keep your focus when you are actually doing the work. Here's a little about the technique: http://www.pomodorotechnique.com/ and here's the timer I use: http://pomodoro.ugolandini.com/

jQuery UI Accordion in Drupal 6

jQuery UI: It can add some great features to your site, but it is a bit difficult to set up in Drupal 6.jQuery UI: It can add some great features to your site, but it is a bit difficult to set up in Drupal 6.jQuery UI is a collection of jQuery plugins and offers great interface widgets that are easy to use. You probably recognize many of them from websites you've used. The only catch is that they don't work with Drupal version 6 without a few tweaks. I had an idea for using the jQuery UI Accordion widget and I had to figure out how to get it working on my D6 website.

Library conflicts

There is a jQuery UI module for Drupal (http://drupal.org/project/jquery_ui). Since jQuery UI is a third party library, you have to download it and install it in the module directory. Now there are a few snags... The native jQuery library for D6 is 1.2.6. The Drupal jQuery UI module tells you to download the jQuery UI v. 1.6 library which works with jQuery v. 1.2.6. But, the jQuery UI v. 1.6 is no longer available on the site. jQuery UI v. 1.7 is available, but it requires jQuery 1.3. That left me with a choice: find the obsolete library, or upgrade Drupal's native jQuery library. I chose the latter.

Creating a CCK Custom Field

Last week I was updating a CCK custom field from Drupal 5 to Drupal 6. The D6 module updates are pretty simple, the catch is that CCK migrated to version 2 with D6. Unfortunately, the documentation for the CCK API is not as complete as the API documentation for Drupal core.

I got stuck on some of the naming, specifically around formatter functions. There's a blog post by Jennifer Hogdon that really helped sort out all the confusion: http://poplarware.com/articles/cck_field_module

A few other resources

CCK for developers: http://drupal.org/node/101742
CCK hook documentation: http://drupal.org/node/342987
Updating CCK modules from 5.x to 6.x: http://drupal.org/node/191796

Pages

Subscribe to Front page feed