Hi John.
Just looking at your code, and have a couple of questions:

1) What's the perceived benefit of using the displayname attribute of
<cfcomponent>?  I've never understood why people bother with it.
2) returntype="any"?  Shouldn't it be "QueryIterator"?
3) Heaps of people do this... lines 17-27.  Any reason to have the VAR and
RETURN statements outside the script block?
4) Not sure of the reasoning behind the return values of moveFirst() and
moveLast().  They're move functions, not "and check if I was already there,
too, pls" functions.  But equally, I can see where you're coming from.
5) I'd be inclined to throw an out-of-bounds error in movePosition() if an
invalid position was specified.
6) I think someone else mentioned this.
        a) In setAttributes(), I'd put them in a substruct, not straight
into THIS.
        b) I'd also question putting them in even a substruct of THIS. Do
you want the calling code to be able to change those values?  I wouldn't.
        c) I'd use <cfset this[columnName] =
variables.query[columnName][variables.currentRow]>.  Removes the need for
the try/catch.

7) With 6c in mind, I'd add a getAttributes() method (or some other
similarly-intented mechanism to get the attributes out).

I've got a collection component of my own, and it's much the same as what
you're doing here, except I'm hijacking the method names of the recordset
interface CF query objects use, so just first(), last(), previous(), etc.
I'm still experimenting with it at present, but I'm hoping to get it working
with collections of any sort of object (with phase two being collections of
any sort of objectS, if you see the subtle difference).  All these traversal
methods are in the base component, and then situation-specific collections
override the base class' methods for cloning, sorting, etc.

Interesting stuff.

-- 
Adam



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of John Farrar
Sent: 24 February 2005 02:43
To: [email protected]
Subject: Re: [CFCDev] query object CFC Beta

Here it is... the guys on this list should be able to understand it's usage.
(If anyone wants to help document... that would be great also.) This version
is somewhat tested... but don't have a full QA on this, so let me know if
you find any "fixes" or "enhancements".

Thanks again,

John Farrar


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]


This email contains confidential information. If you are not the intended 
recipient of this email, please notify Straker Interactive and delete the 
email. You are not entitled to use it in any way.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]

Reply via email to