My name is Richard Watson and I'm a professional PHP developer
from Lurgan in Northern Ireland
Posted by richard
Frameworks & tools | 11-03-2016
After jumping back into Laravel for the first time since Laravel 2 and having used either Cake or Mini since, I've come back to test Laravel 4.2 and have a surprising admission to make (after disliking Laravel 2) - I'm in love!
After a long, sordid history of procedural development (Admin.php is HOW MANY LINES?), it was a refreshing change to see decent frameworks start to pick up speed - CodeIgniter, Laravel, Zend, Cake and so on. However after dabbling with Laravel 2 I'll be honest and say I didn't really enjoy the initial Laravel journey. I found a lot of the work required for "the simple things" to be irritating. Granted as a team of 1 on most projects being sure to leave good documentation, I was never overly worried about other developers having to fight their way through what I left behind which looking back is an honestly *frightening* admission from any developer.
Of course looking back now, I see what any mid-level experience or higher developer sees when looking back - constant attempts to reinvent the wheel. Don't know about PDO? Lets regex the hell out of user input! Pretty URLs? Nobody needs that, keep them ugly and overload the sever with session based authentication requests for everything. CSRF tokens? Let's invent our own man-in-the-middle protection! CSS frameworks? Nobody needs those, let's just write it all ourselves from scratch. While we're at it, let's also develop our own js libraries for handling date input, form validation, Ajax... you see where I'm going with this.
I eventually settled on MINI as a usable lightweight framework after a few years of mixing Cake and just winging it - yes, I admit it, I've looked back on my non-cake projects and I'm frankly horrified by some of what I've found. After a recent discussion with the same person who led me to Bootstrap several years back - which neatly killed off one of my major issues, laboriously creating CSS from scratch or at best using the 960Grid system, then creating my own responsive display using js to decide which library to load - I decided to return to Laravel and see what's happening.
Frankly, I'm glad I did. There's a fairly simple reason for this too - form validation. While Laravel has grown massively since Laravel 2, it's the improved form validation that sold it for me. The massive majority of my work revolves around high-volume user input due to my industry - often designing systems to be heavily used by all staff members on a nearly daily basis. Form validation is saving me a ridiculous amount of effort, and on top of that it's saving me about 20% of size too. Of course, I'm not daft, and I'm still using front-end validation via jQueryUI but the back end validation - especially for file uploads - is simply fantastic. The simplified MVC pattern and routing too really helps. Compared to MINI, which for all it's strengths is still ultimately only a routing framework - it's like the second coming of our Lord and Savior Brian Clough.
Note this site is built on Laravel
Frameworks & tools
Bugs & faults