In classical MVC, the view should never do any sort of data calls.  This is 
hard to do in CF, because "views" in CF cannot be referenced by the controller 
in an easy OO-type manner.

For example, in Java Swing, my view can have a select box on it.  This select 
is an object.  In my controller, I can reference this select box in the view.  
Thus, the controller can then manipulate that select box and, say, it's 
contents.

Since this cannot be done in CF (at least, not without a whole bunch of extra 
infrastructure to deal with this), we need to do things like have the views 
making data calls.

----- Original Message -----
From: Tim Van Der Hulst <[EMAIL PROTECTED]>
Date: Monday, November 15, 2004 1:15 pm
Subject: RE: [CFCDev] table DAO

> hmm maybe this brings about another question. I'm no expert of 
> CFMX OO thats for sure..
> 
> I'm mostly using fusebox4. When I first started what I did was for 
> every view fuse that needed to access some data I did the data 
> retrieval in the model. eg if I needed to display a staff listing, 
> then my controller circuit would call a fuseaction in the model to 
> retrieve the data and then call a fuseaction in the view circuit 
> to display the data.
> 
> Anyway, that was a complete PITA doing that. Probably for the 
> fusedocs it looks nice because you know what data is going in and 
> you have your XFA's so you know what resulting actions can occur 
> and everything is supposedly nice and tidy but god was it tedious 
> and sometimes a bit hard to keep track of too..
> 
> After reading Benoit Herdiad's MVCF Methodology article I realised 
> it was acceptable to do read only access calls in the view so 
> thats why I developed my tableDAO and used methods like 
> select(condition,order) to retrieve data. 
> 
> TiM
> 
> 
> 
> 
> -----Original Message-----
> From: Tim Van Der Hulst 
> Sent: Tuesday, 16 November 2004 8:58 a.m.
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] table DAO
> 
> 
> hey ur the expert...
> 
> getAll(condition,order) works for me but yeah thats putting 
> knowledge of the table structure into the hands of the caller so 
> probably not idea eh?
> 
> TiM
> 
> 
> 
> -----Original Message-----
> From: Raymond Camden [EMAIL PROTECTED]
> Sent: Tuesday, 16 November 2004 8:55 a.m.
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] table DAO
> 
> 
> Ok then - so that brings up -another- question. getAll by itself, 
> IS rare.
> Most of the time I'm doing getAll where Active=1, or getAll where 
> Owner=Me,or some such. So if we have a Gateway CFC to handle 
> getting a bunch of crap,
> where do we put filters? That's business logic - and it seems like 
> it would
> make sense in the core CFC for the datatype. 
> 
> ===========================================================================
> Raymond Camden, Director of Development for Mindseye, Inc 
> (www.mindseye.com)Member of Team Macromedia 
> (http://www.macromedia.com/go/teammacromedia)
> Email    : [EMAIL PROTECTED]
> Blog     : www.camdenfamily.com/morpheus/blog
> Yahoo IM : cfjedimaster
> 
> "My ally is the Force, and a powerful ally it is." - Yoda  
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> > [EMAIL PROTECTED] On Behalf Of Tim Van Der Hulst
> > Sent: Monday, November 15, 2004 1:52 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [CFCDev] table DAO
> > 
> > hmm that makes sense in theory I guess but in practice it 
> > doesn't happen that often in my apps, there almost always 
> > some litte condition needed to restrict the dataset somehow..
> > 
> > ok still waking up, now where did i leave my coffee cup?
> > 
> > -----Original Message-----
> > From: Raymond Camden [EMAIL PROTECTED]
> > Sent: Tuesday, 16 November 2004 8:48 a.m.
> > To: [EMAIL PROTECTED]
> > Subject: RE: [CFCDev] table DAO
> > 
> > 
> > I think getAll is just as common as get for one record. The "normal"
> > interface to a set of data is a list of records, you click on 
> > one and then get detailed info on it.
> > 
> > ==============================================================
> > =============
> > Raymond Camden, Director of Development for Mindseye, Inc 
> > (www.mindseye.com) Member of Team Macromedia 
> > (http://www.macromedia.com/go/teammacromedia)
> > 
> > Email    : [EMAIL PROTECTED]
> > Blog     : www.camdenfamily.com/morpheus/blog
> > Yahoo IM : cfjedimaster
> > 
> > "My ally is the Force, and a powerful ally it is." - Yoda  
> > 
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [EMAIL PROTECTED] On Behalf Of Tim Van Der Hulst
> > > Sent: Monday, November 15, 2004 1:45 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [CFCDev] table DAO
> > > 
> > > perhaps you are just abstracting the point but why would 
> > you want to 
> > > return all records? How often do you need to do that?
> > > or are you talking about from a record set result or something?
> > > 
> > 
> > 
> > ----------------------------------------------------------
> > 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 
> > [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 
> > [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]
> ##
> ----------------------------------------------------------
> 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-
> [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 
[EMAIL PROTECTED]

Reply via email to