Welcome Guest, Not a member yet? Register   Sign In
advice on best practices in CI 2.x re: Libraries, Models, Helpers, and OOP overall
#1

[eluser]Chillahan[/eluser]
I am starting a massive new project and would like to use CI 2 (instead of 1.6). However, beyond changing some of the basics to PHP 5 syntax, is there anything really different about how I should go about it? (I know the deprecated parts, but in terms of using OOP.)

For example, this project will require a representation of a somewhat complex project that will change over time. Different parties will submit data to the project. The project will have different stages, and at some point will have reports that are able to be run. Also, there will be different viewing permissions based on stage, and changing stage (like new to development to testing to finished) will require certain requirements from each user to be in place.

In the past I would have put a lot of the logic in the controller and in the model. Does the use of a Library help me in any way? For example, is an instantiation of a custom Library stateful, so that I would not need to be loading the same data all the time? And would that be a good place to put business code that is not really best in the controller and a bit more logical than a CRUD operation in the model layer?




Theme © iAndrew 2016 - Forum software by © MyBB