Stefan, You will get better performance out of the CF9 integrated ORM, and also be able to get arrays of objects out of list() operations as well.
Mark On Wed, Jan 12, 2011 at 5:51 AM, Mythrandir <[email protected]>wrote: > Thanks again for your responses. > > I indeed started using CF9 recently, and I was not aware of Hibernate, > so I will definitely look into that too! > > This code is indeed for admin purposes, and I think it's not so bad if > the initial load is long-ish, as long as subsequent pagerequests can > make use of the then cached User objects. > > Thanks for your feedback, I know what to do now :) > > Stefan > > > On 11 jan, 19:35, "James Allen" <[email protected]> wrote: > > Hey there, > > > > Which version of Coldfusion are you running? > > > > There was an object instantiation performance problem in Java that > affected > > Coldfusion 8 but this was fixed in Java 6 Update 11. If running CF8, it's > > important to get the Java version updated to remove really awful object > > creation issues. > > > > CF9 is running a later version of Java which doesn't have this problem > and > > is even faster at object instantiation as CF8. Railo also has superb > object > > creation speed. > > > > So basically I think that with only a few hundred object you won't have > any > > real problems using Transfer in this way. > > I've been using it since 2007 and have never really encountered any speed > > issues, especially when in deployment. Things have got better over the > years > > with improvements in CF and Java which always helps. > > > > James. > > > > --- > > James Allen > > E: [email protected] > > Blog:http://jamesallen.name > > Twitter: @CFJamesAllen (Coldfusion / Web development) > > Twitter: @jamesallenuk (General) > > Twitter: @JamesAllenVoice (Voiceover) > > > > -----Original Message----- > > From: [email protected] [mailto: > [email protected]] > > > > On Behalf Of Mythrandir > > Sent: 11 January 2011 18:28 > > To: transfer-dev > > Subject: [transfer-dev] Re: Decorator methods and Transfer.list() > > > > Hi James, > > > > thanks for your reply. This is definitely the way I would prefer to > > solve it; even before Transfer I tended to use arrays of entity > > objects rather than querysets. However, I did get the vibe that > > Transfer actively discourages the retrieval of multiple > > TransferObjects, for what seems to be performance reasons. > > > > In this specific case there won't ever be more than a few hundred > > unique user objects, but unfortunately I can't use pagination and have > > to load them all at the same time. So I'm fearing an unacceptably slow > > performance. Is that correct? > > > > regards, > > Stefan > > > > On 11 jan, 19:09, "James Allen" <[email protected]> wrote: > > > Hey there Stefan, > > > > > The transfer.list method only returns a query. To get your objects you > > then > > > need to loop the query and perform a transfer.get() on the ID of each > row. > > > This will return an object which will have the getFullName() method in > it. > > > The usual way is to create an array and populate it with transfer > objects. > > > > > What I generally do is write my own cfquery calls to generate the query > > list > > > and then have a base function in my gateways which builds an array of > > > objects based upon a passed query (you then only need to select ID from > > > table). > > > I actually use a stored procedure that handles pagination (for > > performance) > > > and then process the query returned to obtain an array of objects. > > > > > Hope that helps, > > > James. > > > > > --- > > > James Allen > > > E: [email protected] > > > Blog:http://jamesallen.name > > > Twitter: @CFJamesAllen (Coldfusion / Web development) > > > Twitter: @jamesallenuk (General) > > > Twitter: @JamesAllenVoice (Voiceover) > > > > > -----Original Message----- > > > From: [email protected] [mailto: > [email protected]] > > > > > On Behalf Of Mythrandir > > > Sent: 11 January 2011 17:54 > > > To: transfer-dev > > > Subject: [transfer-dev] Decorator methods and Transfer.list() > > > > > Hello everybody, > > > > > I've been using and learning Transfer for a couple of days now and I'm > > > liking it a lot! While coding an implementation, I came across the > > > following problem: > > > > > I've defined an User object, and wrote a small custom decorator which > > > contains the method 'getFullName()', which does concatenation of the > > > User's initials and/or firstName with the lastName. > > > > > However, when displaying a list of users, using the Transfer.list(), > > > this method is not accessible to me, but I do need it to get the > > > pretty FullName notation. > > > > > I'm guessing that a lot of people have experience with this situation, > > > and I'm wondering how do I best go about resolving this? > > > > > thanks in advance, > > > Stefan > > > > > -- > > > Before posting questions to the group please > > read: > http://groups.google.com/group/transfer-dev/web/how-to-ask-support-qu.. > > . > > > -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]<transfer-dev%[email protected]> > > > For more options, visit this group > > athttp://groups.google.com/group/transfer-dev?hl=en > > > > -- > > Before posting questions to the group please read: > http://groups.google.com/group/transfer-dev/web/how-to-ask-support-qu... > > -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]<transfer-dev%[email protected]> > > For more options, visit this group athttp:// > groups.google.com/group/transfer-dev?hl=en > > -- > 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]<transfer-dev%[email protected]> > For more options, visit this group at > http://groups.google.com/group/transfer-dev?hl=en > -- E: [email protected] T: http://www.twitter.com/neurotic W: www.compoundtheory.com cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia http://www.cfobjective.com.au Hands-on ColdFusion ORM Training www.ColdFusionOrmTraining.com -- 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
