Recordsets are good for certain operations (like looping) and certain types
of data (tables).  They're bad for random access (get me field x of row y),
or when data isn't a perfect table.  Recordsets have some built-in
constructs that make using them very simple (like CFOUTPUT's GROUP
attribute), even for complex things.

Structs, on the other hand, excel at random access, but are slower for
looping.  They can hold very arbirary data, but can also hold tabular data.
Structs can also nest very easily, much like objects.  In fact, structs can
usually be considered objects with no methods and only public data members.

barneyb

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Nando
> Sent: Friday, November 21, 2003 1:09 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] OOP Newbie needs help developing 
> standard query based CFCs
> 
> Don,
> 
> > B) I'm using query as my returntype but most of you use 
> structs.  I am not
> > heavy into structs yet, is there an article or info that explains
> > why that's
> > the way to go?
> 
> Expert i'm not, but i noticed this as well, especially in 
> Sean's code. What
> i have found over the last week or so in practice is that 
> structures in CF
> are easier to work with than query sets in some cases. I 
> don't know anyone
> else's reasons for sure, but i started returning structures (into the
> variables scope of the cfc as instance data) for this reason.
> 
> For the gateway type of query that won't populate the object, 
> the select
> all, select where ... , etc, i'm remaining with returning a 
> query for now
> because that will probably will be only used to populate the 
> user interface
> with result data ...
> 
> That's the way i've sussed it out so far.
> 
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word '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 word '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]

Reply via email to