The problem you stated, Patrick, is the one that led me to embrace the
idea of FuseQ for MVC. Since all fuses in a FuseQ request are in the
same lifespan, the problem of caller v. variables scopes goes away.
Using FuseQ, a VIEW calls the CONTROLLER that sets one or more
fuseactions into the FuseQ.

>From the VIEW...

<form action="#self#?fuseaction=controller.doThis" ...>

>From the CONTROLLER...

<cfcase value="doThis">
  <cfset addToQ( 'model.doThis' ) />
  <cfset addToQ( 'model.doThat' ) />
  <cfset addToQ( 'view.displayAllThisAndThat' ) />
</cfcase>

(The circuit names are not indicative of real ones; they're just used to
illustrate the concept.)

Now, the View is truly JUST a view; the Model JUST a model and the
application is defined by the Controller. The reason for separating View
from Controller is to have View circuits as independent as possible from
the underlying Model. While you can get by with combining the View and
Controller into a "Presentation/Model" architecture, I find that you
don't gain much by doing this and the dependencies inherent in that
scheme bother me. 

I'm working on a small application with my friend, Vinny, for CFUN and
I'll post that when I finish (which has to be before CFUN!)

-----Original Message-----
From: Patrick McElhaney [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 04, 2002 6:17 PM
To: [EMAIL PROTECTED]
Subject: RE: Can you give me the 'why's' of MVC?


How do you pass data from the model to the view circuit? 
I always felt guilty about having the model circuit 
write directly to the caller scope so I wrote a 
custom tag to handle the communication between the two. 
I'm interested in how others do it. 

Patrick


> -----Original Message-----
> From: craig girard [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 6:00 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Can you give me the 'why's' of MVC?
> 
> 
> > Personally, I haven't found much reason to keep the
> > view and the controller separate, as there's almost
> > always a one-to-one relationship between the two,
> > so I'm not /really/ using MVC. And I wouldn't say
> > that MVC (or M-VC) is appropriate for every
> > application, but if you're having problems with
> > duplication it's a great help.
> 
> 
> Patrick,
> 
> Thanks for your feedback.  We have come to the same
> conclusion as you have
> above.  Nice to see we aren't the only ones.
> 
> Craig
> 

> 

==^================================================================
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
==^================================================================




Reply via email to