Welcome Guest, Not a member yet? Register   Sign In
CONTROLLERS, single method or different methods for different actions?
#7

just to be clear - as soon as you are talking about design - its just peoples opinions. so with that said

Quote:But if I had separate forms all going to the same controller, using a hidden task field, had I might as well not just have separate forms routing to separate controller methods?

for me - the advantage is that i only have one public method in the controller and the only thing that method is doing is routing to the different private methods depending on which form it is. this keeps the forms simpler - they all go to the same place. and it keeps the controller safer because none of the form methods are public. and a small benefit is being able to look at the public method in the controller and very quickly see what forms are calling on it and which methods they route to.
Reply


Messages In This Thread
RE: CONTROLLERS, single method or different methods for different actions? - by cartalot - 05-11-2016, 01:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB