I thought your concern was that the code wasn't clear, Patrick? We're switching arguments in mid-stream!
-----Original Message----- From: Patrick McElhaney [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 4:47 PM To: [EMAIL PROTECTED] Subject: RE: Can you give me the 'why's' of MVC? > Hal wrote: > > Sharing data across circuits does not in my mind break any rules, > whereas having one fuse call another does. Of course, those are my > rules! > > As for lacking structure in code, gee, I don't think my code lacks > structure! I think that something like this makes very clear what's > going on: > > <cfcase value="main"> > <cfset addToQ( 'Company.getCurrentStockPrice' )> > <cfset addToQ( 'Benefits.getSynopsis' )> > <cfset addToQ( 'Training.getUpcomingTrainingEvents' )> > <cfset addToQ( 'RegisteredUser.mainPage' )> > </cfcase> > What if I have a ticker symbol and I want get the stock price for that company? I dig into the company circuit and I find that it expects a variable called "symbol." But my form has a field called "tickerSymbol." I can't change it because my form also interacts with another circuit that expects the variable to be called "tickerSymbol." At the end of that request, how many unrelated variables do you have left in the attributes scope? What if two different circuits use the same variable name for different purposes, and those two are called in succession at some point? It's bound to happen sometime, right? Here's another very realistic challenge: Let's say you have an employeeID. You want to display all of that employee's information and the manager's name and phone number on the same page. You have a fuseaction called getEmployee that returns all of the employee's information as well as the manager's employeeID. That's simple enough, but how do you get the manager's info? Patrick ==^================================================================ This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9 Or send an email to: [EMAIL PROTECTED] T O P I C A -- Register now to manage your mail! http://www.topica.com/partner/tag02/register ==^================================================================
