Even today, PHP developers face the tough question of which framework to choose for their next project. The choice has largely been restricted to a handful of frameworks, out of which Laravel and Symfony stand out of the competition.
Unfortunately, a representative from Symfony was not available for comments after repeated trials. It would be awesome if someone could take this discussion forward. The comments section is open for anyone who wants to support Symfony.
Shahroze: For rapid application development, one of the toughest challenge is the choice of PHP framework. How do you think Symfony and Laravel best fit this requirement? What should be the criteria for framework selection?
Taylor: Well, both Laravel and Symfony are more rapid than building an entire PHP application from scratch. So, in that sense, they both allow rapid application development. However, Laravel does make strong efforts to have a very clean and productive working environment for building applications of all sizes. I think Symfony has also made efforts in this direction over the last few years with their “DX” initiatives and some of the more opinionated things they are doing with Symfony Flex.
Laravel is a very modern framework. Job queueing is included out of the box. Integration with web-socket / real-time tools like Socket.io and Pusher is included out of the box. In addition, there is very strong support for autowired dependency injection and convenient unit testing. So, I think if you are building a modern, robust web application, Laravel is the strongest contender in the PHP ecosystem simply because it includes the features needed to build modern, maintainable, real-time, distributed web applications. In addition, it has an extensive video library of over 900 tutorials at Laracasts.
Of course, there is other criteria to consider when choosing a web framework. For instance, most teams should consider their prior experience. If you have a team of people that are already experts in one particular framework, it may make sense to choose that framework.
Shahroze: Symfony is a popular choice for enterprise and ecommerce applications, while Laravel is a top player in lightweight and social application development. Do you think this distinction hurts industry wide adoption of both Laravel and Symfony?
Taylor: I don’t agree that Laravel is strictly a top player for “lightweight” application development. I don’t think there is any empirical evidence that this is the case, and I have discussed very large Laravel projects and deployments with a variety of well-known, enterprise clients.
Statistically, Laravel is growing rapidly. We know this through Packagist statistics and various other metrics such as GitHub activity. So, this distinction (whether it is true or false) does not seem to have a large impact on Laravel’s adoption rate.
However, one primary distinction between Laravel and Symfony is that Symfony has paid consulting and support options available through SensioLabs. I have chosen not to pursue that path with Laravel personally, although I encourage others to explore starting businesses in that area. It is quite possible that I will do more hiring in this area of the coming two to three years and expand our support offerings to cater more towards enterprise clients who are more comfortable with robust support offerings.
Shahroze: Developers love to create automated workflows that facilitate continuous development and profiling issues. How would you describe ideal workflows for Symfony and Laravel?
Taylor: Currently, Blackfire.io is my favorite tool for profiling PHP applications. It provides an easy-to-use interface and quick approach to identifying troublesome parts of your application.
For continuous deployment, I typically rely on Forge and Envoyer, which are two services I created myself. (Read more about Laravel forge alternative)
Shahroze: Both Laravel and Symfony release major and minor updates throughout the year. Do you think this hurts framework adoption rates? Are these releases beneficial for the framework ecosystem?
Taylor: Again, statistically we know that Laravel is growing at a fast rate via Packagist downloads, GitHub activity, etc. So, this does not seem to be hurting framework adoption. However, I do think it is important to strike a good balance between framework evolution and stability.
Currently, Laravel has a new release every six month and these releases do contain minor breaking changes. My current policy is to attempt to keep upgrade time at less than one day for all minor releases. I find this is a good balance and keeps the framework moving forward quickly without overwhelming the user-base with breaking changes. Over the past two releases, upgrade times have been much lower since the framework has begun to stabilize and more work has been put into external packages instead of into the framework core.
Shahroze: Community support and open source contributions play a key role in the lifecycle of a framework. I observe the social media channels for both frameworks, and I feel that Laravel community is much more involved than Symfony. However, Symfony has 1448 contributors, while Laravel has 1359. What are your thoughts on empowering the community and contributors?
Taylor: Laravel has a very passionate community. I think a large part of this is because the core members of the Laravel community are extremely active. For instance, Jeffrey Way, the creator of Laracasts, is currently running the most high-quality and extensive PHP video tutorial site on the Internet. Adam Wathan, the creator of the Test-Driven Laravel video course, is currently offering the most extensive video training on TDD available anywhere in the world. These are really world-class products and both of these community members are very active on social media and good at engaging with the community.
Laravel has as very “family” feel and I set out to create that type of community from the very beginning. It was very intentional and I still work very hard at it today.
Shahroze: How do you decide which feature/component to include in a release. How much community and users’ opinion influence this process?
Taylor: Most of Laravel’s features come from my old real-world usage of the framework and the experiences of the community. Over the last few years, many features have been community driven. However, I still make significant contributions to the framework that are driven by my experience. I try to build a robust application from scratch using every release of Laravel. This allows me to see the entire framework’s “UX”. If I see something that doesn’t feel right or feels unnecessary and inconvenient, I will fix it. Because of this, everything in Laravel is driven by very real-world scenarios and experience. I don’t like to develop any features “in a vacuum” where I am trying to guess at what is needed and what isn’t.
Shahroze: Do you think that all frameworks will merge into one single development super-framework? I see this a major framework evolution possibility as cross framework component usage increases.
Taylor: I don’t think this will ever happen in PHP. The PHP ecosystem is so large that it can and will continue to support several major frameworks and CMSs. PHP programmers are also a very opinionated and divisive bunch. There are still very strong disagreements within the PHP ecosystem as a whole about the “right way” to approach web application development. I don’t think we should expect (or even desire) these disagreements to ever totally disappear.
Shahroze: Now the question that every PHP enthusiast thinks about. If Civil War breaks out and Taylor Otwell joins Captain America, who will take his place and why?
Taylor: There are several people who could take my place. Jeffrey Way, Adam Wathan, Matt Stauffer, and others could all keep the framework and its associated services going. They have been involved in the community a long time and know the internals of the framework.
Shahroze: Managed hosting is the latest trend in pro PHP app development. Symfony has sensio.cloud and Laravel has Forge. How do you think these platform fare in comparison with other PaaS provider like Cloudways? Do you think managed hosting will eclipse all other hosting solutions?
Taylor: Providers like Forge, Sensio.cloud, and Heroku all operate at different levels of support and therefore at different price points. So, I think there is room for all of them to exist. Truly managed hosting solutions are very convenient, but of course more expensive than alternatives. For some companies, even a $5,000 a month hosting bill is a very small expense in the scheme of things. However, some developers find even $20 a month to be cost prohibitive. So, there is a very wide range of budgets, expectations, and desires and that allows all of these products to have healthy, large user-bases.
Shahroze: What are your views on the PHP vs JS debate? According to a GitHub survey, JS has increased its market share significantly. Do you think JS could give PHP a tough time with tools such as Node.js?