Question
Best practice MVC for forms to cfc
Conceptually I would like to keep my logic for a very big
site as MVC as possible. As a cf newbie though I am not sure
whether the strategy suggested by most of the blog/tutorials of
sending (say)
index.cfm's Form.UserName to UsernameCheck.cfm which then <cfinvoke> Username.cfc
or if I can/should send Form.UserName directly to Username.cfc
Going direct is more straightforward obviously but then is the only place to put <cfif> (aka Controller) logic in the index.cfm page (which defeats my intentions anyway)????
I may be way missing something here, but fwiw I'm getting kind of spaghetti with multiple <cfelseif> 's for every index.cfm module so am presently leaning toward redirecting (say) failed signins to RetrySignIn.cfm rather than back to (essentially) a <cfelseif> of index.cfm.
Thanks in advance for feedback on your experiences, I realize this could be done/argued either way but . . .
index.cfm's Form.UserName to UsernameCheck.cfm which then <cfinvoke> Username.cfc
or if I can/should send Form.UserName directly to Username.cfc
Going direct is more straightforward obviously but then is the only place to put <cfif> (aka Controller) logic in the index.cfm page (which defeats my intentions anyway)????
I may be way missing something here, but fwiw I'm getting kind of spaghetti with multiple <cfelseif> 's for every index.cfm module so am presently leaning toward redirecting (say) failed signins to RetrySignIn.cfm rather than back to (essentially) a <cfelseif> of index.cfm.
Thanks in advance for feedback on your experiences, I realize this could be done/argued either way but . . .
