Choosing “The Right” PHP Framework for SaaS

So many what ifs, features, speed and other consideration go through the mind when mapping out a SaaS app…

The last thing I wanted to do was create a bottleneck with the wrong php framework…

So what is “the right” php framework…

I asked myself this question…

Will the PHP framework be used more as an API or as the complete solution?

IF ==> API: Then you are looking at using a compact, super fast frameworks like Lumen and Slim

IF ==> Complete: You are looking to solve everything with one framework, you are looking at CodeIgniter and Laravel

Why I Ruled out CodeIgniter and Laravel

Early on with FeedSumo, I developed a minimal viable product (MVP) using CodeIgniter…

Doing this exposed two very critical items:

Javascript: The front end code was becoming increasingly dependent on jQuery to do User Interface manipulation and API calls. This lead me down the path of AJAX calls, hacky two-way data binding and ultimately converting to AngularJS (might as well do it right!)… but I am getting ahead of myself…

Load Times: Codeigniter and Laravel are fast, they also load many dependencies on each request. A lot of the features CodeIgniter and Laravel include in each request, I would never use and this seemed to me like I was using a sledge hammer to pound a nail, I just needed the framework to handle simple API calls and session management.

So I started to look for a smaller “barebones” PHP framework that would be fast and scalable.

Lumen versus Slim

Making this decision was less about speed and more about the “other stuff”…

Speed: (+1 Lumen) Both frameworks are fast, Slim version 2 was used to compare speed with Lumen, Lumen was recently released and available for use, Slim 3 was still in early development and slower at the time!

Slim vs. Lumen

Community: (+1 Lumen) Researching the frameworks, it felt like there were two camps, the “organized/polished” and the “DIY/patchy” crowds. In my experience, I have benefited adopting new technology from a company with a responsive, organized and large community. Laravel has done a great job of creating a polished product and a community that loves their products. I didn’t get that same vibe from Slim.

Slim vs Laravel

Availability: (+1 Lumen) You can tell me all about how great your product is, but where is it? Oh, you are still making it… hmmm… I started development of the FeedSumo MVP in May of 2015, today is August 13, 2015… let’s check in on Slim 3…

Slim Framework

Hmmm… I would still be waiting on Slim…

Lumen Was My Choice For PHP Framework

So I am glad I chose Lumen, migrating the code from CodeIgniter was rather easy, more importantly, it enabled me to continue to build my project on a solid framework with great support!

Lumen handles API requests lightning fast without the bloat of it’s bigger sibling Laravel.

I since have ditched jQuery and used AngularJS for the presentation layer. The two-way data binding of AngularJS works great with Lumen. Lumen is able to handle simple API calls with hardly any effort.

Hope this helps you save some time picking a PHP framework for your next project.

what do you think?