Home

jQuery

Drupal: Now with 8% Yummy

Jul 04, 2007

According to Ohloh, Drupal 6 core now consists of 8% JavaScript. This is quite a lot.

Ohloh statistics for Drupal core: 8% JavaScript

Drupal and JavaScript haven't always seen eye to eye though.

While the first clean and consistent usage of JavaScript in core was the textfield autocompleter and accompanying drupal.js base (committed a little over two years ago), this was not the first line of JavaScript in Drupal core.

The Yaroon theme for example had a little JS dropdown navigator in 2001, while the Goofy theme used JavaScript to compress its gigantic table-based markup—yes, we were n00bs at one time too. In fact it took until January 2003 (with the retiring of the Goofy theme) for core to go back to plain PHP, HTML and CSS.

From that point on, JavaScript was shunned and suggesting it as a solution to a problem was sure to cause grumpy voices to rise. So it's not surprising that in 2005, a lot of people were skeptical about the proposed JavaScript features for Drupal 4.7. Still, the new incarnation was written with the clear mindset that everything must degrade gracefully without it, and that the methods used should be accessible, extensible and clean. The code got committed and was eventually released in May 2006.

Even so, it really wasn't until we included the jQuery library in Drupal 5 core that a significant amount of Drupal contributors started working with JavaScript in their modules and themes, as it lowered the barrier to entry for browser scripting massively.

Given all that, I'm quite impressed with this 8% figure for core. Slowly but surely, JavaScript in Drupal has gone from ugly duckling to shining star.

jQuery OSCMS presentation slides

Mar 23, 2007

Update: a raw video is now available of (almost) the entire session. Thanks to Jon F Hancock for recording it.

Today I did my second session at OSCMS, which was basically a repeat of the jQuery talk I did at DrupalCon Brussels.

You can download a PDF (2.2MB) of the (slightly tweaked) presentation slides.

ComicJuice gets even better

Mar 09, 2007

I finished some more tweaks to ComicJuice:

  • IE6 and 7 are now supported, thanks to the amazing ExplorerCanvas by Google. It emulates the <canvas> tag in IE, meaning that client-side scriptable vector graphics are now available on all the major browsers (IE, Firefox, Safari, Opera). I doubt Konqueror will be far behind.

    This opens up some cool abilities, like dynamic in-page graphs, mini-widgets (sliders, dials, maps, ...) and even pure JS games. There's a bunch of examples linked on Wikipedia (though most don't use ExplorerCanvas yet).

  • I added support for uploading your own images rather than using pictures on the web. It uses a customized and themed version of core's JS uploader.
    comic juice
  • I improved the clipping of speech bubbles so there should be less useless whitespace around comics, especially when embedding them.

If you haven't played around with it yet, give it a shot. No registration is required if you just want to play around.

Expanding Textareas

Jan 20, 2007

See the Drupal.org issue.








Quicktime embedding doesn't seem to be working. Try downloading the file.

Drupal 5 is out

Jan 15, 2007

Drupal 5 is finally out, after a last minute sprint with some emergency bugfixing... Thanks everyone for your help, this is without question the best Drupal release so far.

Digg up.

Farbtastic 1.2 out

Jan 09, 2007

I've released a new version of Farbtastic which fixes a bug with multiple fields that have the same value.

Get it from the Farbtastic page.

Images