(07-13-2016, 11:09 AM)cartalot Wrote: * Go on youtube and search for 'clean code robert martin' . he's also known as 'uncle bob'. his lectures on architecture design are timeless. his examples are mostly in java but it actually reads almost exactly the same as codeigniter.
* Naming is very important and you should not hesitate to rename things to make them more clear. use folders to help organize your controllers and models.
* Think in terms of your users and their 'roles' - not data objects. Controllers serve people using them for a specific task. Do not mix roles in a controller. If you need to be logged in to do a task - then that should be in a separate controller that only admins have access to versus a controller that is used for generating a public page.
* Build in your controller and then push your code to models. Models can be used for much more then database interaction. Models can call other models. Models should not do too much - its better to have many small well named, well defined models then a few models that do too many things.
* Views are like scrap paper. Don't do anything important in a view. No application logic. No checking if someone is logged in.
* Get PHPstorm IDE for development. Your company can buy it but they also have monthly payment plans. Theres a thread on this board about the autocomplete file that makes it easy to use with codeigniter.
I love these quick pointers! Along with the good advice from InsiteFX, I feel like I'm starting to have at least an idea of some solid specific things I can do to start making some positive movement forward. Thank you!!
I think a lot of the problems I've come across so far are due to the fact that I purchased a codeigniter-based program from code canyon, and utilized it as a kind of "starting template"... Many things went great taking this approach...but many other things have gone very badly and have had me writing code to work around the things I can't figure out (from the 'template' code). Anyway, I have learned a lot by doing it this way, but I think it would probably be a good idea for me to rewrite the things I need from the bottom up in a fresh ci environment.
I actually already have PHPStorm

...i just haven't been using it for this project because the 'template code' I have been using looks like a huge mess of warnings when opened in PHPStorm.... I suppose that should've been a big hint huh?