Part 1 of 2 - I spoke with Richard Miller and Tom Kitchin, software engineers at SensioLabs UK and its parent company Inviqa respectively, via a Google Hangout on Air recently. I wanted to learn more about PHP and Symfony from their perspective and how they think the Drupal 8 and Symfony2 are going to affect each other.
In part 2, I learn the inside story on one of the first Drupal 8 sites online, www.sensiolabs.co.uk, what their goals were and how they built it and have kept it running since May 2013, and how Drupal 8 will change the way they design applications for clients going forward.
PHP then and now
Richard compares getting started in PHP 4 to what the PHP 5.4 (and beyond) world looks like, "I think there's been a huge shift in terms of people's interest in best practices that have come from elsewhere. The new generation of PHP frameworks are a huge leap forward even from a few years ago. Having Composer, a proper package management tool, had definitely changed how we work. I think it really helps. It has fostered a lot more interaction between different communities. Previously within PHP it was all very fragmented; now there's a lot more interoperability between these different groups. We've come on leaps and bounds in the last few years."
Tom addresses PHP's growing maturity as a language and ecosystem, "I feel like I see a lot of things in PHP now that I was seeing coming into Java previously. I think it's good that it's bringing structure. Obviously, we need to have some degree of a plan ... since this runs everything now. The main difference between the desktop stuff I was doing in Java and the web stuff is that the web stuff gets used."
What should people know about PHP and Symfony?
Describing Symfony, Richard echoes sentiments about Drupal's choices in trading power and flexibility for complexity, "As frameworks go, it leaves quite a lot to your choice still. It provides all the tools to avoid having to do all those repetitive tasks involved in making websites, in parsing URLs, how to read controllers and things. Compared to other frameworks I've used and looked at, it is less 'opinionated' about how you actually do things within those controller actions so you get more freedom to work in the way you want, rather than dictating the approach. Dictating the way you work can help at first in projects; having everything laid out for you, you can get up and running a lot quicker, but then you find yourself fighting against the constraints of the framework over time. With Symfony, there's a bit of a 'super learning curve' at first, but you don't run into those 'you just can't do that' problems that I think you do face with other frameworks."
"One of the better things about PHP," continues Tom, "is that people can get into it easily. Bringing people into development and these fields is a big discussion point currently. PHP is a good language to get into. The thing to keep in mind is the oft-repeated point 'The first thing you do with PHP? That's not how you do PHP. Please don't keep doing that.' The easy introduction is not how you want to continue, but it's nice that we can get people involved." And then move them along to better ways of working."
Is Symfony going to improve Drupal? If so, how?
"From a technical point of view," continues Richard, "there's Symfony components that have been used that save the Drupal community from reinventing the wheel, so it helps concentrate on more Drupal-specific stuff. It is making use of components that are part of a stable framework that's already in use out there and that's gone through various changes based on people using it."
Is Drupal going to improve Symfony? If so, how?
"There's also the benefit of bringing the communities closer together and we're learning stuff from Drupal. We've already seen improvements from contributions back from the Drupal community. We've certainly benefitted from those. There's been some work around the routing component that's been the joint-work of people from Drupal, EZ-Publish, and the Symfony CMF. They've all been working together. A lot of experience and knowledge from previous versions of Drupal has benefitted that greatly."
Actually, everybody wins
Tom makes the excellent point that, "More than anything, the interaction has caused both projects to improve. This is what open source is all about; the free exchange of information, of good ideas. This is what makes it work. That's got to be the big advantage that both sides can get from this."