I've been doing a lot of research in regards to OO and MVC for PHP and have nearly made a choice to move to CodeIgniter for an existing large-scale website I manage. I feel that using an OO+MVC environment has a huge organizational and performance advantages and hopefully improved developing speed compared to the existing functional/procedural structure the site uses now.
However, due to the sheer size of the site, I would like to gradually transfer the code over to CodeIgniter's structure thus having a transitional time period where parts of the site are in CI and others are in the old style.
Are there any suggestions on the best way to do this from a code structure point of view while minimizing on the amount of duplicate code? I'm rather new to OO as well, and feel that gradual is the best way to do this due to the learning curve.
You could install CI into a folder and redirect (though .htaccess
) only the requests that you want to handle with CI. Other than that, everything should work as usual and you won't need to change much of your current functionality. The more sections work on CI, the more redirect rules you will have.
I think you have to determine the dependent entities in your database (models) and start with them first such as some contacts, users registration and so on.
The most reliable and safe way, you have to copy your current working site to a local machine and start do it bit by bit, till you finish it all, upload it to your public web server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With