Moving a php project to codeigniter or updating the existing framework [closed] Moving a php project to codeigniter or updating the existing framework [closed] codeigniter codeigniter

Moving a php project to codeigniter or updating the existing framework [closed]


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.

  • if there are flaws in your architecture: restructure broken parts
  • if you are not sure, whether something works: add unittests
  • if something seems to be slow: profile you code and optimize
  • if you do not know what something does: find out and add comments

This way you will enhance both you project and your skills.

P.S
Even if you were starting new project, I would recommend to avoid both frameworks. They both are filled with bad practices and worse code: global state everywhere, procedural programming, misinterpretation of MVC, disregard for OOP principles and laws.


I've actually had experience with this, as I recently moved an older site from what was essentially a modular Model-View setup to CodeIgniter (with the MX modular extension). It didn't take too long and easily the longest part of it was converting the models over to CodeIgniter's ActiveRecord paradigm.

It sounds like you don't even have any model conversion to do, so I'd say converting to CodeIgniter shouldn't be too much of a challenge, especially given your experience with it.


There's no definite right or answer - there will have to be an investment made in time either now or spread out in the future.

Personally, I'd bite the bullet and go with migrating to CI. If you're fighting your code more than fixing it then the effort you put in the short term will be worth it in the long run.

Most of the time, it doesn't take much time to get an existing PHP application into CodeIgniter - you'll just have to spend more time re-organizing your code afterwards.