When creating a Drupal theme it is tempting to start with one of the existing themes (Zen and Garland are often used) but I would argue against this approach.
If you start from another theme it feels good at the beginning; after all you start from a position where your site looks good. But the more customisations you make, the more you find that the old theme just adds complexity to your existing theme.
The way Drupal works is that each module can add it’s own CSS: so tabs, menu trees, filters and so on all come with some sensible styling by default. If you want it to look different you not only have to create the CSS to make it look how you want - you have to make sure this overrides the default rules.
So CSS in Drupal isn’t simple - don’t add to the complexity more than you need to.
Interesting report on the state of mobile internet
We offer that mobile Internet is today at a point of sufficient mass to sustain a chain reaction of rapid growth in consumer adoption and, in turn, mobile Internet marketing.
According to this in the UK 16% of mobile phone users use their phones to access the internet.
SimpleTest is a great testing framework for PHP, with a Drupal module available too.
Many tests are based on assert statements, but this patterns doesn’t work for functions which are expected to throw Exceptions. As at the time of writing Drupal’s simpletest module doesn’t catch exceptions and so the whole test run stalls.
In that case the following patterns are often useful.
I’ve just been trying to get a paged query working with Drupal, and after a frustrating hour I realise the problem is that the function is case sensitive: see http://drupal.org/node/211925
Normally SQL keywords can be in any mixture of upper and lower case letters, Drupal has additional coding conventions which is great.
Using doc-comments in Eclipse really helps productivity by providing lots of tool-tip help and auto completion.
A colleague recently pointed out that Eclipse can auto-complete object properties (as long as you use the @property tag). I’ve found this really helpful and have been creating objects to return pass around - and found it a vwery neat way of working.
I’ve worked on a few internationalised sites in the past and it always raises challenges, Drupal makes some things easy - this post provides some simple tips for planning your translation process.
This advice is aimed at sizeable sites with formal release processes.
With any sizeable project maintaining good documentation is a challenge - it’s all to easy to skimp on documentation, or to start with good intentions but allow the documentation to get out of date.
The Drupal API project allows you to set up a documentation website for your project like api.drupal.org that covers all your code.