I’m trying to figure out the best way to handle a php project going forward. It was built a few years ago on a custom framework – the framework wasnt strict MVC…it simply had controllers and views, and libraries.
I’ve since added in additional functionality and it’s starting to feel very much like a complete mess, with old code and new code mixed up, and no decent database management.
I’m struggling to decide what my best option is. On the one hand, I could keep patching the existing codebase in the hope that I can make it somewhat more usable and futureproof, or move to codeigniter (note: I say codeigniter as I’ve got a fair amount of experience with it).
The Codeigniter option would obviously mean I’d have to go through everything, and there will no doubt be a fair amount of recoding, however in the long term it may be worth it.
There was another option I was considering, and that was the Laravel framework. I have no direct experience with it, however I hear that Laravel 4 (not released yet) is supposed to be excellent.
So, putting those three options on the table, which would you pick and why? I’m looking for a compelling reason to choose one over the other, as quite frankly I dont have a clue which route I’m best taking at the moment!
Short answer: neither.
Now a bit longer version..
I get the impression, that you are confused about, which problems frameworks aim to solve. When you use a framework, what you gain is shorter development for simple applications. What you always loose is performance and, usually, maintainability.
Frameworks are made to provide you with tools for solving simple problems. Which means that there is a lot of thing’s, that you do not need. And there is also problems, that frameworks do not solve or even actively hinder your efforts in making a solution.
What you should do instead..
Refactor your code.
If you have been working on the project for long time, you will have a lot of lessons, that you learned from this experience. Utilize them by improving the existing codebase.
This way you will enhance both you project and your skills.