Tuesday, March 3, 2009

Best Practices Question

I have a controller USERS which displays a users profile. The profile data is comprised of information from various HABTM and hasMany tables in the database  (PROFILE, AUTHORS, ARTISTS, QUOTES and so on....)
The user can edit all of their preferences / info on the profile page using AJAX. All of the AJAX forms point to a function in the users_controller. Now I currently have all the actions such as update_authors, delete_quote, new_quote, update_artists in the USER Controller.
 
My question is should I have put :
         delete_quote, new_quote in the quotes_controller
        update_authors in the authors_controller
        update_artists  in the artists_controller
 
Everything is working fine but seems really jammed having 30+ functions in the one controller.
 
So is it best to put them into their related controller because that's how it should be set up? Leave it the way it is because it working? what is the right way or best way?
 
thanks,
 
Dave
 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: