Roland Collins wrote:

I understand what you’re saying, but I still think they can all be done now!  We use this kind of stuff all the time and have never had issues with it.

 

Want the last record?

 

myquery.mycolumnname[myquery.recordcount]

or...
objQuery.moveLast()

 

Want to start half way through the query?

 

for (i = myquery.recordcount / 2; i lte myquery.recordcount; i = i + 1) {

somevalue = myquery.mycolumnname[i];

}

or...
objQuery.movePosition(123)

Thanks.... forgot that method.

 

Want to abort arbitrarily?

for (i = 0; i LTE myquery.recordcount; i = i + 1) {

somevalue = myquery.mycolumnname[i];

 

            if (somevalue is ‘my_matching_value’) break;

}

or...
with the CFC... just don't access it any more.

 

Or even better:

while (myquery.mycolumname[i] is not ‘my_matching_value) {

            doSomething();

            i = i + 1;

}

while(objQuery.myColumnname is not 'my_matching_value') {
       doSomething();
       objQuery.moveNext();
}

 

I guess I understand wanting to have a familiar way of iterating over data when you’re using multiple platforms, but I really don’t know anything that the ADO/.NET model has that the CF model doesn’t either!

 

Roland

The point is this. Yes if you know how you can do all of these functions in CF. Yet in every last case of examples you showed (even thought the last one required a couple of more typing characters... the CFC method is easier to implement, easier to read... and just more pleasant working. Isn't that why we use ColdFusion... because it makes programming more pleasant? This is using the language to take it to the next level.

And now something you will enjoy... it would be more difficult to extend the standard data methods to add features in ASP. ASP.net isn't "so bad"... but it's still easier to do it in CF. We aren't at all saying ASP has any advantages. We are just enhancing the CF to do it the way others like it... and add simplicity even beyond your solutions. Your solutions are good. Yet... for the new programmer it would be much easier to ramp up with the CFC we are creating.

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]

Reply via email to