| 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. I haven't read the said book, but I would suggest that you take a peek at one of the many MVC frameworks that exist for ColdFusion. I don't know about examples of 1-to-1 views/contollers (how would that look? what is the point?) but most cases for webapps implement one (or at least few) controllers. The Model (all your OO goodies) are separated from the views, and the controller is the thing that makes the different pieces an application. For Mach-II, for instance, this is primarily the flow that you specify in the xml configuration, where you direct how the logic should flow for a request. | 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? Yes, you are way off base... :( cflocation (redirecting requests by a 302 header) are not related to MVC at all, and can be used in an MVC app just as much as in any other app. Since I know Mach-II, I would recommend that for an example of MVC + OOP in CFML. Peek at the example apps, and read the docs (primarily Sean Corfield's dev guide) and get your hands dirty and try to implement something reasonably simple (or refactor an existing app). /Hugo ########################################### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.f-secure.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]
