Lance Pioch

PHP Frameworks are Difficult to Choose

PHP Frameworks are Difficult to Choose

PHP is an enjoyable language to write with. It can be the best of worlds or the worst. This is because it gives you many different ways to solve each problem you run into. Depending on the amount of experience or guidance, it’s easy to see how difficult it is to stay on the correct path. This is where frameworks come in. They help you stay on the right path and more.

Frameworks have many jobs and responsibilities and each one is built entirely different! This is even though they all do the same major thing: being the backbone for your web application. Most people understand that and recognize that frameworks are very important when developing web applications. If you don’t, in a nutshell, they do a bunch of repetitive work for us so we don’t have to bother with it.

Does every web application require a framework? I can’t say that all apps do or even should. But for the most part, you should probably understand very clearly those reasons for discarding the use of any framework. Otherwise, there is a strong chance that you’ll be wasting time reinventing the wheel. So at this point, there’s a choice to be made…

Which framework should you use for that next project? Do you want Laravel because it’s the most popular and it’s extremely opinionated? What about Yii because it automatically provides JS integrations and helpers? Perhaps you are considering Phalcon because of its blazing speed because of its native C extension? Why not Symfony for its security, robustness, and the fact that everyone else is requiring their components in their own apps? Or just choose CakePHP because it sounds delicious and the code must be too!

But in all seriousness, each framework has its own list of strengths and weaknesses. I even compiled a huge and mostly incomplete list while writing this, but realized that it’s not very fair (or useful) to the frameworks or you, the developer if I were to just display a huge comparison table. The cold-blooded consensus here is for your next application to try considering using a framework that your team already knows or is at least partially familiar with. This will give you the best chance to succeed in a corporate environment.

In your free time though, please do consider the other frameworks, read about them and their strengths and weaknesses. Consider how those strengths and weaknesses may help you with your next projects. Clone them, install them with Composer, unzip that archive… Play with them and share examples that you love or hate. Throw them at your colleagues, friends, and peers too. Just make sure you catch what you throw!

Finally, it’s hard to see everything at once and can be challenging when frameworks and their code run deep. If you start to run into issues, instead of blaming the framework or thinking about switching, try debugging the application yourself. I understand that using Xdebug can be challenging to run and setup. But you should also stay tuned for the upcoming Scout support for PHP and individual frameworks.

Scout is making sure that not only do you get performance-based recommendations based on your specific code, but also your framework too!

Getting started with Scout

Scout provides application performance monitoring for Ruby, Python and Elixir apps… with PHP support soon to come! To learn more about Scout, contact us, check out our website, or sign up on Manifold!

Stratus Background
StratusUpdate

Sign up for the Stratus Update newsletter

With our monthly newsletter, we’ll keep you up to date with a curated selection of the latest cloud services, projects and best practices.
Click here to read the latest issue.