David,

I'm not certain exactly what you mean about the number of function calls,
but depending on how your application scales, you may need to be careful of
the number of objects you're instantiating.

James is correct, in that Transfer has a solid cache mechanism. (Though you
need to remember that Transfer _is_ caching objects. If you update database
records outside Transfer, you can get the cache out of sync with the
database.)

And object instantiation has improved markedly over the past versions of CF.
(Don't know which one you're using.) But instantiating an object is _still_
more expensive than just doing a query, if for no other reason than Transfer
has to run the query, then populate the object. You have to get the record
out of the database at least once for its object to be in the Transfer
cache.

So there are certainly instances when queries are a better option. For
example, your basic States select box in a Name/Address form. Sure, you
could retrieve all the IDs from your States table and loop over them,
creating an array of State objects, then use that to populate your select
box.

But why? You don't really need the objects. Better to do:
transfer.list("util.state","stateCode"), and get a regular old CF query
object.

As I said before, there are times when you need objects, and times when a
simple CF query is better. You'll work it out as you spend more time with
Transfer.


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560

-- 
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en

Reply via email to