Controller function naming - Best Practices? |
[eluser]dabadguy[/eluser]
Hi everyone, Been using other MVC frameworks for a while but am loving CodeIgniter. One thing I have never been quite sure about with MVC is knowing when to separate the functions into different controllers. Problem: Site has admin control panel. Admin logs in through www.site.com/admin/index Admin wants to add a user through www.site.com/admin/addUser and takes them to a form where they enter the new user details When form is submitted the action goes to www.site.com/admin/userAdded in this function, the information submitted into the form is added to the data base through the user model. After user is added, browser goes back to www.site.com/admin/index My question is when the form is submitted should it go to www.site.com/user/addUser ? The way I have it set up now I find it a bit confusing to have admin/addUser and admin/userAdded Just curious to see what others do or what the best practice is. Many thanks, |
Messages In This Thread |
Controller function naming - Best Practices? - by El Forum - 02-11-2010, 08:47 PM
Controller function naming - Best Practices? - by El Forum - 02-11-2010, 09:54 PM
Controller function naming - Best Practices? - by El Forum - 02-11-2010, 10:53 PM
Controller function naming - Best Practices? - by El Forum - 02-12-2010, 03:02 AM
Controller function naming - Best Practices? - by El Forum - 02-12-2010, 07:49 AM
Controller function naming - Best Practices? - by El Forum - 02-12-2010, 08:23 AM
Controller function naming - Best Practices? - by El Forum - 02-12-2010, 08:40 AM
Controller function naming - Best Practices? - by El Forum - 02-13-2010, 02:51 AM
Controller function naming - Best Practices? - by El Forum - 02-13-2010, 11:44 AM
Controller function naming - Best Practices? - by El Forum - 02-13-2010, 11:55 AM
Controller function naming - Best Practices? - by El Forum - 02-13-2010, 11:57 AM
Controller function naming - Best Practices? - by El Forum - 02-13-2010, 12:25 PM
Controller function naming - Best Practices? - by El Forum - 02-13-2010, 03:16 PM
|