Advanced

Drupal and non-determinism

I was just working on a client site and had an epiphany as to why working with Drupal continues to be a frustrating experience for me.

As flexible and powerful as Drupal truly is, there is still an unacceptable level of non-determinism involved in working with Drupal whether it be in working with existing modules, theming or doing custom development.

Moving Tabs to the Main Menu

Developers are all familiar with the default behavior of the drupal menu systems "local tasks" (aka tabs). These appear throughout most Drupal sites, primarily in the administration area, but also on other pages like the user profile.

Generally, developers are pretty good about creating logical local tasks, meaning only those menu items which logically live under another menu item (like view, edit, revisions, workflow, etc... live under the node/% menu item).

Gotcha when editing nodes programatically

Now this one is pretty annoying to.

I'm writing a module that imports data into nodes. Sometimes this data has already been imported, and I only want to update existing rows with changes, if any.

After pulling in a row of data from the import file, I see if it already exists as a node in my database. If it does, I grab the node ID and load the existing node:

$node = node_load($existing_nid);

I then do some magical stuff and save the node using the standard:

How the web got screwed up

This article by Joel Spolsky is as good an great explanation of why the web (among other things) is such a mess to work with for designers and developers.I've always had this idea that the web would eventually work itself out and become a tidy place where everything worked reasonably well. But according to Joel's logic, this is unlikely to ever happen.

Syndicate content