Re: CFC confusion. please help!

2008-06-24 Thread Tom Chiverton
On Monday 23 Jun 2008, Matt Williams wrote: One issue with returning an array of objects instead of a query is that if you're talking about lots of records, creating all those objects can become processing and memory intensive. Although with CF8 talking to Flex's RemoteObject, you can use an

RE: CFC confusion. please help!

2008-06-24 Thread Dave Watts
Although with CF8 talking to Flex's RemoteObject, you can use an array of struct with a 'magic key' ('__type__') instead. But then, if you're using Flex Builder, you lose all the autocomplete goodness that you get from having value objects, right? Dave Watts, CTO, Fig Leaf Software

Re: CFC confusion. please help!

2008-06-24 Thread Tom Chiverton
On Tuesday 24 Jun 2008, Dave Watts wrote: an array of struct with a 'magic key' ('__type__') instead. But then, if you're using Flex Builder, you lose all the autocomplete goodness that you get from having value objects, right? Flex Builder keys off the ActionScript value objects, which

Re: CFC confusion. please help!

2008-06-24 Thread Brian Kotek
They __type__ hack is only on the server side, to allow you to pass structures to Flex and fool it into thinking it is a CFC, since CFC creation is too slow when dealing with larger numbers of CFCs. On the Flex side they convert to actual ActionScript classes so you still retain all the code

Re: CFC confusion. please help!

2008-06-24 Thread Tom Chiverton
On Tuesday 24 Jun 2008, Brian Kotek wrote: They __type__ hack is only on the server side, to allow you to pass structures to Flex and fool it into thinking it is a CFC, since CFC creation is too slow when dealing with larger numbers of CFCs. On the Flex side they convert to actual ActionScript

Re: CFC confusion. please help!

2008-06-23 Thread Rich Kroll
Lori, The reason that some people discourage the use of a query object as a return type is due to the fact that it binds whatever uses that query object directly to the database (more specifically, to the columns in the database). The use of setter/getter beans should be familiar to your boss;

Re: CFC confusion. please help!

2008-06-23 Thread Matt Williams
On Mon, Jun 23, 2008 at 8:36 AM, Lori Stone [EMAIL PROTECTED] wrote: I have always returned query objects but apparently that is not the best practice. I don't understand the problem with returning query objects. I would love to understand the reasoning and what the return type should be.

RE: CFC confusion. please help!

2008-06-23 Thread Jason Durham
I'm definitely not the authority on ColdFusion and OO, however I have asked lots and lots of questions. The answer is almost always, 'it depends.' I return query objects all of the time. Sometimes I'll return a struct with a couple of variables and the query object inside. Do what makes sense

Re: CFC confusion. please help!

2008-06-23 Thread Tom McNeer
One of the things that the other posters (particularly Matt) were getting at is that many times when you return a query object with a number of records, you're not looking to manipulate any of the records (yet). You're often listing records from the database so that one can be chosen for