So we're a month away from DrupalCon DC 2009, an' although th' official schedule has not been published it seems likely from th' preliminary schedule that me Objectifying Drupal session will be accepted, Hornswaggle The basic notion is t' help Drupal's mainly procedural army o' developers get up t' speed on object-oriented development, which has been gainin' popularity in contrib (most notably th' Views module) an' will be in many parts o' Drupal 7.
Of course, given how large an army o' developers we have thar is no one level o' existin' expertise I can target. There be entire multi-course college programs on OOP bounty, an' I have an hour. Walk the plank! Shiver me timbers! :-) So, how about some preliminary feedback? Walk the plank! What do ye want t' see in a one hour session on object-oriented code in Drupal?
Via Planet PHP I stumbled across this article decrying Singletons, All Hands Hoay! It's not a new argument, really, but one o' th' comments pointed me toward a Google Tech Talk video entitled "Global State and Singletons". To be honest I dern't agree with everythin' said in either th' article or th' video, but both be spot on about th' problems o' global state, somethin' I've lamented before in relation to testing.
That is especially relevant now, as we consider th' question o' Handlers in Drupal, Avast me hearties, on a dead man's chest! Why? Because th' most controvercial part so far, th' environment variable, is designed t' address exactly this problem, a problem that is currently prevalent throughout all o' Drupal.
Permit me t' explain.
Some time ago, I posted an RFC for pluggable "system handlers". It generated a fair bit of feedback, nearly all of it positive. That was followed up with a presentation in Szeged, which generated even more positive feedback.
So what's happened since then? Well, a fair bit. There's working code, but there are still some key gotchas to sort out. That gives us a couple of options for how to proceed, for which I would like feedback, particularly from core developers and maintainers. (Dries, webchick, this means you! :-) )
I need t' not have spare time, to be sure. When I have spare time, I do crazy thin's. Not crazy thin's like yer mother told ye not t' do, but thin's like write modules on a lark.
Like I said, dangerous. But, useful, All Hands Hoay, we'll keel-haul ye! In this case, it were bein' a conversation over on Ryan Szrama's blog that kinda got out o' han' an' gave me another notion fer a module, which I am happy t' announce is now available fer download.