Ruby on Rails creator David Heinemeier Hansson said something really smart the other day differentiating between languages and patterns and practices:

As Java gained traction and became the focus of business, it naturally attracted many of the best brains. While working in Java, they developed and profiliated an impressive array of patterns of practices. We got the rise of MVC for the server side, an explosion in frameworks, test- and domain-driven development styles, and so much more. And while general ideas, most where explained from within the language that they had been practiced. So you have Java-first examples and implementations all over the place. Who’s to blame someone from thinking that it’s all the same? That it’s because of, and only in, Java that you would get access to these patterns and practices. And it’s certainly havn’t been hard to reinforce this belief by picking up one of the popular PHP applications, take it apart, and scoff at how little resemblance it beared to your modern living.

He goes on to say:

Hence, I think the attachment many Java programmers have with the language and JVM could very likely be an attachment to the patterns and practices that these technologies are used with instead. And if that’s so, it means that we’re not so different after all.

I think that’s true for me. What I want to bring to the table when I build applications is a layered architecture that can be easily tested at every level. In the Java world, we have a lot of tools that encourage and enable me to apply these patterns and practices to my work. And indeed, one of the reasons why I generally feel at sea when working in PHP is that while it is possible to apply my usual patterns and practices to my work, it’s not nearly so natural.

I think, though, that the distinction between languages and patterns and practices is important to make, and I plan on talking a lot more about it. Specifically, how I can transport the good habits I’ve learned in the Java world to PHP and to other languages that I might wind up using. (I’m still looking for that perfect excuse to really dig into Ruby on Rails.)