Welcome Guest, Not a member yet? Register   Sign In
Design Logic Help Requested
#3

(This post was last modified: 07-13-2016, 11:16 AM by cartalot.)

* 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. You will have to dedicate some time to learning it but it will save you so much time over the long run. Especially if you are working on a large application.

* You don't have to put everything in one application folder. You can have folders on your server like "alpha1" "alpha2" "beta" etc that point to different application folders.
Reply


Messages In This Thread
Design Logic Help Requested - by mwebdesign - 07-12-2016, 11:27 PM
RE: Design Logic Help Requested - by InsiteFX - 07-13-2016, 10:11 AM
RE: Design Logic Help Requested - by cartalot - 07-13-2016, 11:09 AM
RE: Design Logic Help Requested - by mwebdesign - 07-13-2016, 11:25 AM
RE: Design Logic Help Requested - by mwebdesign - 07-13-2016, 01:00 PM
RE: Design Logic Help Requested - by cartalot - 07-13-2016, 03:52 PM
RE: Design Logic Help Requested - by mwebdesign - 07-13-2016, 05:22 PM
RE: Design Logic Help Requested - by mwebdesign - 07-13-2016, 06:58 PM
RE: Design Logic Help Requested - by cartalot - 07-14-2016, 11:20 AM
RE: Design Logic Help Requested - by mwebdesign - 07-13-2016, 12:03 PM
RE: Design Logic Help Requested - by PaulD - 07-13-2016, 01:01 PM
RE: Design Logic Help Requested - by mwebdesign - 07-13-2016, 04:42 PM
RE: Design Logic Help Requested - by mwebdesign - 07-20-2016, 07:10 PM
RE: Design Logic Help Requested - by mwebdesign - 07-13-2016, 05:11 PM
RE: Design Logic Help Requested - by mwebdesign - 07-13-2016, 05:12 PM
RE: Design Logic Help Requested - by PaulD - 07-13-2016, 03:09 PM
RE: Design Logic Help Requested - by InsiteFX - 07-13-2016, 07:05 PM
RE: Design Logic Help Requested - by mwhitney - 07-14-2016, 10:48 AM
RE: Design Logic Help Requested - by PaulD - 07-21-2016, 03:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB