Cracking The “Laravel Vs. Cakephp” debate

I started off this thread to compare 2 frameworks for my next project which would have a team of 20 developers. Team experience was a bit skewed on CakePHP, but the experience outside the organization was tilted towards Laravel. The community buzz was definitely biased towards Laravel, but I wasn’t sure. Hence, I started to jot down some key points and here is the showdown

Niether of the 2 frameworks is the definitive choice. I realized that both do the job and will fit very well in a certain given scenario.

I decided to start working on Laravel 5.4

Here are my rough notes of what I observed about each of the two frameworks. I will let you decide for yourself which one fits the bill for what you are trying to do…

CakePHP’s main focus is on HMVC framework. While that is a simple design, it’s great for websites

Laravel focuses on several key enterprise design patterns. In addition to MVC Laravel allows you to work with IOC containers, event-drive, Factory, Facade etc.

Laravel’s main focus is to support Services and build some sort of isolation between front-end and backend (business logic)

If you are looking to make a simple website (.com of sorts) go for CakePHP. If you are building a B2B/enterprise application – Laravel is the way to go.

Cake if you have a small team and Laravel if you are building a BIG application either with a big team or over a long duration.

It will be wrong to say one is better that the other. The use case that suit each of them are kinda different. If you are looking to build a rather simple Website Cake works well (with it’s MVC). However, if you are looking to build more of a WebApp or some sort of back-end business processing – Laravel provides you various isolation layers and design patterns (IOC, Singleton, Facade) to build a robust enterprise application/tool.

As of Jan’2017, Laravel is picking pace and is more popular of the two which means that if you are looking for a plugin to do a job, the chances of finding something in Laravel are higher (I am not saying you can’t find it in Cake)

As for a developer – if you are looking to set governance, improve quality, do Unit testing – it’s easier to achieve the same in Laravel. In CakePHP, you can probably achieve all of that but it will end up moving away from what Cake recommends strongly (2 classes model-controller) is all what Cake offers

Developer productivity is increased using the tools and ecosystem that Laravel provides like Artisan. they are not just code-generation but application building tools. common tasks like creating new controllers, views or adding test data in DB for testing, or creating Cron jobs for productions/QA are all done via one environment. you don’t have to so things outside of the framework. Some like the Cake model where these tasks are externalized