In my session at DrupalCon DC, I promised an initial version of the Episodes module by March 15, which is today. I'm glad to be able to announce that I somewhat met that goal.
If you don't know what it is exactly, I encourage you to read the project description first.
It's not yet completely finished: the basic reporting UI must still be written. But you can already look at the results of each individual page through the Firebug add-on (which I didn't write, it's already available). See the first screenshot for that. That's of course much less useful, but it gives you a clear indication of the potential.
However, before I do that, I first have to work on making other deadlines for other courses.
So what's done already? Here's an overview:
.js files in the Drupal installation and filter out all Drupal.behaviors (this contains all JavaScript behaviors of the current web page). Uses Drupal's batch API and is therefore scalable. Stores the results in the database and provides a simple UI (based on Hierarchical Select) to allow you to ignore some Drupal.behaviors, for example those that never have a significant impact on page loading performance. Look at screenshot number two to see what this looks like.episodes.js a lot:
EPISODES.compatScriptUrl instead of a hardcoded URL.startMakeName variable to startMarkName.EPISODES.findStartTime().EPISODES.sendBeacon() to actually send the beacon using an AJAX GET request.EPISODES.init() to include pageready marks and backend, pageready, frontend episodes.Drupal.Episodes (this is JavaScript), which provides automatic integration with Drupal. Each behavior in Drupal.behaviors is automatically turned to in its own episode! Other features:domready episode.totaltime episode in a smart way: if any lazy load callbacks are defined, it's done relative to those, otherwise it's measured relative to the pageready mark.episodes.js, css, headerjs and footerjs episodes is possible, but impossible without changing your theme's page.tpl.php. Clear instructions are included in the README.httpd.conf setup, that will also work for sites installed in subdirectories.
Browser.php (see below).Libraries used or looked at for inspiration:
episodes.js from Steve Souders in a heavily changed form. Also
episodes-compat.js but in an unchanged form. See http://stevesouders.com/episodes/.Browser.php from Chris Schuld. See http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php.episodes.httpd.conf is based on Jiffy's jiffy.httpd.conf, but is eventually entirely different.All of this has been written in less than 4 days (revisions 5-15). I'd expect somebody who isn't familiar with Drupal to need at least 3 times that amount of time and if you're not familiar with JavaScript another couple of days. But it of course also took a substantial amount of research (reading) about how all these things connect with each other: preparation is key to productivity!
Want to give it a try? Perfectly possible, but it's not yet committed to cvs.drupal.org, and I think I'll keep it that way. It's easier for me to keep all my work in a single SVN repository (which is also faster and nicer to work with than CVS). Whenever this module is its final shape, I'll commit it to cvs.drupal.org – the same will apply to the CDN integration module that I'll be rewriting as part of this thesis.
So, for now, get the code from svn://wimleers.com/school/bachelor-thesis/code/episodes or look at it through your browser from WebSVN. But please do use the issue queue at Drupal.org for reporting bugs and requesting features. The Episodes project is now available at drupal.org.
Comments
Post new comment