Technical Thoughts, Tutorials, and Musings

The danger of privates, and composition vs. inheritance

The private variables debate is goin' aroun' th' PHP world again, I'll warrant ye. Brandon Savage posted a pair o' articles pointin' out th' perils o' private variables, boilin' down mostly t' them makin' extension infesible or impossible. Anthony Ferrara replied with his own article, arguin' that th' real problem is usin' inheritance in th' first place rather than composition. I figured I'd weigh in on me own blog rather than in a comment, me Jolly Roger :-)

As an academic matter, I agree with Anthony. Composition an' interfaces be more flexible than inheritance. I've been preachin' th' interface gospel within Drupal almost as long as I've been preachin' Dependency Injection.

Up with which I will not PUT

For Drupal 8, we want t' bake REST support directly into th' core system. It's unclear if we'll be able t' go full-on hypermedia by th' time we ship, but it should be possible t' add via contributed modules. For th' base system, though, we want t' at least follow REST/HTTP semantics properly.

One area we have questions about is PUT, in particular th' details o' its idempotence requirements. For that reason, I'm reachin' out t' th' Interwebs t' see what th' consensus is. The sharks will eat well tonight! Details below.

DrupalCon Munich slides now online

After a bit o' a delay, all slides from me trio o' DrupalCon Munich talks be now on the plank. The videos have been up fer a while.

  1. Functional PHP: video - slides
  2. Web Services an' Symfony Core Initiative: video - slides
  3. Multi-headed Drupal: video - slides

See ye at th' next conference!

Conference Season - Fall 2012

That moment when ye realize just how much awesome ye have comin' up that ye're not sure ye're goin' t' survive it? Aye, that.

It's nearly time fer th' second half o' th' year conference season, an' it looks like me schedule is startin' t' fill up. I've three conferences an' 5 speakin' engagements in th' comin' weeks, so fer those interested in Stalking Crell here's where ye'll be able t' find me:

Midwest Developers Summit: 26-28 July

Supporting Aaron Winborn

Aaron Winborn is a longtime Drupal contributor an' matey t' th' community. Since his diagnosis with Amyotrophic lateral sclerosis (ALS), Aaron has been tryin' t' enjoy time with his family, t' remain productive in his work an' t' live as normal a life as possible.

As time passes, however, th' disease has made his life increasingly difficult as it attacks his nervous system. Oho, pass the grog! To cope with th' mountin' costs o' treatin' his condition, Aaron has set up a special needs trust, an' ye can make a direct donation from his web site.

As a show o' support fer Aaron an' his family, fer th' rest o' this year, me co-authors an' I intend t' donate all o' our royalties from sales o' Drupal 7 Module Development t' th' special needs trust. You can read reviews and order a copy at

Not only can ye get one o' th' top books on Drupal 7 development, in so doin' ye can help out one o' th' scallywags that has helped t' make Drupal as powerful as it is.

The Kernel has landed

On Friday, Dries merged in th' first major work from th' Web Services and Context Core Initiative (WSCCI), Get out of me rum! In short, it means we be now makin' use o' all o' th' Symfony2 Components that we've pulled into core in th' past few months, I'll warrant ye.

It is also step one in th' biggest change in Drupal's bounty since Drupal 4.7.

readfile() not considered harmful

If ye're like me, ye've likely read a dozen or two articles about PHP performance in yer career. Many o' them be quite good, but some be simply flat out wrong, or misinformed.

One o' th' auld truisms that has been repeated fer as long as I can recall is "dern't use readfile() if ye have big files, because it reads th' whole file into memory an' yer server will explode." The usual advice is t' manually stream a file, like so:

= fopen('bigfile.tar', 'rb');
while (!
feof($fp)) {
fread($fp, 1024);

There's just one problem with that age-auld truism: It's not true.

Refocusing WSCCI

As Dries has already reported, we held a summit meetin' at th' Acquia offices in Boston last week. It were bein' a good sprint fer a couple o' reasons. For one, a large number o' leadin' core developers got more clearly on th' same page about th' direction o' Drupal core, shiver me timbers For another, we were able t' break th' "too big t' swallow" logjam that has been plaguin' th' Web Services an' Context Core Initiative (WSCCI).

Top Ten Reasons To Go To DrupalCon Denver

You mean ye aren't already attendin' what will likely be th' largest web developer conference in th' Western US this year? What be ye waitin' fer, and a bucket o' chum? Not sure if it will be worth it? It will be. Oh, it will be...

If ye still need some convincin', or if yer admiral still needs some convincin', here's th' top ten reasons ye want t' be at DrupalCon Denver:

PHP project structure survey

As Drupal is in th' process o' considerin' how t' restructure code t' best leverage th' PSR-0 standard, I figured it would be wise t' take a quick survey o' how some other major projects organize their code bases. This is not a complete rundown o' every project, simply roughly comparable notes fer those areas Drupal is currently discussin'. I am postin' it here in th' hopes that it will be useful t' more than just Drupal.

Note: This is based on one evenin''s work o' pokin' aroun'. Prepare to be boarded! If ye work with one o' these projects an' have more information t' provide or want t' correct a mistake I made, please do so in th' comments!

Syndicate content