That is certainly true, but I must admit that at the beginning I was a bit confused about the Transfer/TransferFactory thing. So to address Gavin's question, I believe that it _is_ commonplace to put Transfer itself (in addition to the TransferFactory) in a persistent scope , such as application. In fact there was just a thread about this, discussing creating a Coldspring bean for Transfer, which is essentially the same thing.
I'm guessing that the tBlog code is the way it is because of simplicity, rather than as an example of a best practice. Not that there's anything wrong with doing it that way, just that there's nothing particularly right about doing it that way either ;-) Sent from my iPhone On 21-Nov-08, at 10:11 PM, "Matt Quackenbush" <[EMAIL PROTECTED]> wrote: > On Fri, Nov 21, 2008 at 8:59 PM, Gavin Baumanis wrote: > For an example of something that I don't get is; > > In the tBlog application there is the following code at the beginning > of a lot of the templates (I.e listPost, listUser etc) > transfer = application.transferFactory.getTransfer(); > > Is this necessary? > Could I not just do this? > > application.transfer = application.transferFactory.getTransfer(); > and store it once in the application scope? > > > Gavin, > > All that is happening here is that the "page" is grabbing a > _reference_ to Transfer from the application scope and placing it > into the variables scope. This code does *not* create a new > Transfer factory. It simply makes a shorter variable for typing out > should the page be using it often. > > So, when you see: > > transfer = application.transferFactory.getTransfer(); > > ... all it is doing is keeping you from having to type > application.transferFactory.getTransfer() every time you need to use > it on the page. > > HTH > > > > Sent from my iPhone --~--~---------~--~----~------------~-------~--~----~ Before posting questions to the group please read: http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer You received this message because you are subscribed to the Google Groups "transfer-dev" group. To post to this group, send email to transfer-dev@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---