I'm probably the last person to knowledgably respond to this post, as i'm in the midst of figuring this out for myself, but it is one of the issues i'm most interested in so far as to the structure of a Mach-II app.
Any listener registered in the mach-ii system can act as a "controller" in the sense you are describing because of their ability to announceEvents. So in this sense, the XML file is just a static map of the application, and either the listeners or the users are the ones actually directing the flow of the application. Someone commented on the mach-ii list to think of listeners as the wiring (and therefore sometimes the logical switching mechanism) between the model (the application's cfcs) and the controller (the XML). I suppose that gives you the freedom to structure your app in a variety of ways, depending on preference and need ... I'm working on a ContentManager cfc similar to what you describe that decides which event to announce for the front end of the application i'm (slowly) converting. The front end needs this central mechanism, but the back-end, which is more declaratively mapped out, doesn't. Implicit invocation is a bit of a different world from the pipe and filter stuff of switch / case statements. It doesn't have as much of a "central nervous system". i'm still getting used to it. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Alexander Sherwood Sent: Tuesday, February 03, 2004 4:47 PM To: [EMAIL PROTECTED] Subject: [CFCDev] mach-ii.xml and conditional logic I've done MVC development on my own before the Mach-II code was created. In the "controller" files (switch/case statement), I follow mach-ii's general principles: notify listener CFCs passing values back and forth between events. One handy aspect of my approach is that you can embed conditional logic in the controller file. You can, for example, notify two listeners, compare their values, and announce a new event based on the comparison. Because mach-ii applications are described using XML, how does one implement conditional logic inside of an event handler? Do developers create a "Controller.cfc" that handles the event-flow logic? Any help would be much appreciated. ---------------------------------- Alex Sherwood PHS Collection Agency THE COLLECTORS T: 301.215.4200 F: 301.664.6834 W: www.phs-net.com ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.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' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
