Ben, I think a lot of book examples have a 1-to-1 ratio of views to controllers. When I start coding I never find that this works well. For me, the joy of views is that I can pick which ones I want on a page and not have them tied to a controller.
I am also with you on the use of cflocation for the exact same reason. The way I think about it is for two types of controllers; Model-Controllers and View-Controllers. The Model-Controller handles transfering data to the database and then when it is done cflocates to the View-Controller which calls the relevant cf for output. Read more about it: http://coldfusion.sys-con.com/read/49185.htm This is based on Apple's documentation which is one of the best MVC explinations I've seen: http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDesignPatterns/Articles/MVC.html Cheers, Sam F On 12/7/05, Ben Nadel <[EMAIL PROTECTED]> wrote: > Hey, > > I am slowly trying to learn MVC and better style OOP application design. I > just finished Head First Design Patterns which was an excellent book. But, > from what they seem to say, in the MVC architecture, there is close to a > 1-to-1 ratio of views to controllers (though a single controller could > control various views). This seems to make sense since each page would > require different actions, validation, etc. > > So, from it sounds like, MVC style stuff never uses CFLocation since all > views are decided on the server then passed back to the response. Is this > way off base? > > Part II, if there are no CFLoc's, then how do you get "confirmation" pages > to not re-submit form data if refreshed. In my apps, what I love is to > process a form then CFLoc to a confirmation page so that the user cannot > submit data twice unless they actually go back to the form. Can something > similar be done via MVC??? > > When I think about MVC and CFLoc actually should not play together. If it > did would that be considered making the "View" have "Controller" type > behaviors (asking the browser to transfer control to a new page)? > > Trying to learn. Thanks! > > ...................... > Ben Nadel > Web Developer > Nylon Technology > 6 West 14th Street > New York, NY 10011 > 212.691.1134 > 212.691.3477 fax > www.nylontechnology.com > > > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the subject of the > email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > (www.cfxhosting.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] > > > ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
