So DrupalCon Prague is almost over, and I can now share with you the video of my session about the history of the Drupal block system, from drop.org to Drupal 8, just as recorded on wednesday.
The session page is available on https://prague2013.drupal.org/session/blocks-drop.org-drupal-8-and-beyo… where you can also rate it. Please to it over there, or add your comments here: it is very useful for me to see what needs to be adjusted for upcoming presentations. Based on the overall feedback, it seems that:
- I speak too fast and sound too french. Well there were about 130 slides to go through in 45 minutes
- The reveal.js layout combined with the projector limited resolution made captions unreadable. Good point to keep in mind for future presentations !
- Someone did not understand why in a history session, spending more time on early versions like drop.org or Drupal 1.0 was relevant. This one is interesting because I did indeed skip something which I actually find interesting, and that is to show how much our shared coding skills and practice evolve over time, so that people discovering Drupal 8 these days when they are beginning to work with PHP are not just awed by the code, and really feel they can start low and progress with enough work. That was one of the lessons I drew over the years when going back to our own earlier code, mine included.
And thanks to those who expressed appreciation for the amount of work this took (about one full week to dig up these old versions and port them to PHP 5.3.
The major technical point which I gathered from going through the evolution of that system is a set of constant trends:
- Dedicated separated self-packaged original pages sharing very little and doing most things on their own → more and more shared (reused) code
- Complex, long functions → shorter and more numerous ones
- Multi-purpose functions/hooks → single-purpose more numerous hooks
- Code + presentation mixup → separate code portions for each type of code
- Small number of long files → larger number of smaller files
When one steps back, this can be summed up as applying the SRP ever more strictly as time passes. To me, this appears to be the single most important conclusion from this trip down memory lane. In comparison, the evolution from the original OO model (themes and content types are classes with inheritance) to purely functional code and back with a vengeance in D8, funny as it may be, is more anecdotal than anything else.
And if this is what we have been doing all this time, it means that when designing new software, be it for Drupal or not, if there is one thing one might want to care for, it's to start further along this trend than we did initially. All points of the SOLID mantra are useful, but this is has got to be the most important and easiest of the five points in SOLID.
Such is the point of history, as I see it: to learn from our past errors and successes to light the path ahead of us.