Jonny Coombes Bsc (Hons)Principal Solutions ArchitectOpen Text CorporationMobile: +44 (0) 7748 986 937
Phone: +44 (0) 1494 679700
YIM: ot_jcoombes
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
The market leader in providing Enterprise Content Management solutions. www.opentext.com This e-mail is protected by domestic and international copyright laws and treaties and is the property of Open Text Corporation, it may contain confidential and/or trade secret information of the Open Text Corporation and/or its subsidiaries (OTC), and may be subject to legal privilege in favor of OTC. This e-mail may only be lawfully received, accessed, displayed on a computer screen, printed, copied, and/or used by the specific addressee(s) named above (“Authorized Recipient”) for the purpose for which it was sent by OTC. All other rights and licenses to this e-mail are fully reserved to OTC. If you are not an Authorized Recipient, you are required to immediately delete this e-mail in its entirety without printing, copying, using, and/or re-transmitting this e-mail, either in whole or in part. The transmission of this e-mail by OTC is not to be construed as a waiver by OTC and/or the individual sending this e-mail on behalf of OTC of any of their respective rights or privileges at law or otherwise, howsoever arising.
From: eLink Discussion: Development Discussion [mailto:development@elinkkc.opentext.com] Sent: 13 March 2006 15:34To: eLink RecipientSubject: RE When would one want to use $KERNEL.Singletons? RE When would one want to use $KERNEL.Singletons? Posted by jmcpeak (McPeak, Jason) on 03/13/2006 10:34 AM In reply to: When would one want to use $KERNEL.Singletons? Posted by eu0018377 (Poser, Rolf H) on 03/12/2006 01:58 AM Message from Jason McPeak <JMcPeak@opentext.com> via eLinkRolf, As you know, OScript is not a strongly typed language. $Kernel.Singleton was one of the classes created to help us "think" in terms of modern programming practices; objects, patterns, etc. It was created to help us design better code. $Kernel.Singleton is not thread safe. $Kernel.Factory is another example. It's not currently used, but it's there. As you could get from any pattern book, the singleton pattern is often used with the factory pattern to create a resource whose specific type is not known to the code that uses it. Jason From: eLink Discussion: Development Discussion [mailto:development@elinkkc.opentext.com] Sent: Sunday, March 12, 2006 1:01 AMTo: eLink RecipientSubject: When would one want to use $KERNEL.Singletons? When would one want to use $KERNEL.Singletons? Posted by eu0018377 (Poser, Rolf H) on 03/12/2006 01:58 AM Hello all oscript wizards:Following on from my previous post where I was trying to find a way to find a thread-shared application global (not really possible or advisable I'm told):I fail to see under which circumstances one would want to make use of $KERNEL.Singletons?(In case you missed it - the singleton isn't shared across threads unfortunately.)I guess it could become a useful container if you have a lot of data that you want to store in separate Assocs, but all in a single global.The current single implementation of a Singleton seems to do this for WebNode cmds caching.Does it have anything to do with thread safety? Is this a deprecated feature that is actually just a hangover from previous functionality?Thanks,Rolf.(rolf@stasolutions.co.za)