<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>DotNetKicks.com - Stories tagged with Singleton</title>
    <description>the latest stories tagged with 'Singleton' from DotNetKicks.com</description>
    <link>http://www.dotnetkicks.com/</link>
    <language>en-us</language>
    <copyright>Atweb Publishing Ltd.</copyright>
    <docs>http://backend.userland.com/rss</docs>
    <generator>DotNetKicks.com - .NET links, community driven</generator>
    <ttl>30</ttl>
    <item>
      <title>Are Static Variables in Base Classes Shared In Derived Sub Classes?</title>
      <description>Development Gotchas - Something that caught me out recently is the behavior of static variables in C# classes, and how they behave in derived classes. Also how does this differ with static variables in Generic&amp;lt;T&amp;gt; base classes? Finally, we use this understanding to create a generic base Singleton class. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.dominicpettifer.co.uk%2fBlog%2f43%2fstatic-variable-gotchas---are-static-variables-in-base-classes-shared-in-derived-sub-classes-"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.dominicpettifer.co.uk%2fBlog%2f43%2fstatic-variable-gotchas---are-static-variables-in-base-classes-shared-in-derived-sub-classes-" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/Are_Static_Variables_in_Base_Classes_Shared_In_Derived_Sub_Classes</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/Are_Static_Variables_in_Base_Classes_Shared_In_Derived_Sub_Classes</guid>
      <pubDate>Fri, 30 Jul 2010 09:26:52 GMT</pubDate>
    </item>
    <item>
      <title>Design Patterns - Generic Singleton Pattern</title>
      <description>A little follow up from yesterday 's Singleton Pattern, where I asked for some help on how you would approach a generic singleton. With the help of Andrew Stevenson and ExNihilo, we came up with the following Generic Singleton Pattern. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.cumps.be%2fdesign-patterns-generic-singleton-pattern%2f"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.cumps.be%2fdesign-patterns-generic-singleton-pattern%2f" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/patterns/Design_Patterns_Generic_Singleton_Pattern</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/patterns/Design_Patterns_Generic_Singleton_Pattern</guid>
      <pubDate>Tue, 15 Jul 2008 20:21:20 GMT</pubDate>
    </item>
    <item>
      <title>Design Patterns - Singleton Pattern</title>
      <description>Today we'll have a look at a well known pattern, the Singleton Pattern. Most people have already heard about this one.

The definition: "Ensure a class has only one instance and provide a global point of access to it." &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.cumps.be%2fdesign-patterns-singleton-pattern%2f"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.cumps.be%2fdesign-patterns-singleton-pattern%2f" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/patterns/Design_Patterns_Singleton_Pattern</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/patterns/Design_Patterns_Singleton_Pattern</guid>
      <pubDate>Mon, 14 Jul 2008 22:00:13 GMT</pubDate>
    </item>
    <item>
      <title>Static Singletons for ASP.NET Controls</title>
      <description>When building generic ASP.NET Server controls that also provide a sort of API service to other custom controls or page level code, it's often necessary to ensure that only a single instance of a control exists, and that only that single instance of this control or component can be accessed in the context of an ASP.NET request. Using HttpContext and it's Item collection makes it easy to create reusable, cacheable instances and ensure you're only running a Singleton instance of it. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.west-wind.com%2fweblog%2fposts%2f417588.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.west-wind.com%2fweblog%2fposts%2f417588.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/aspnet/Static_Singletons_for_ASP_NET_Controls</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/aspnet/Static_Singletons_for_ASP_NET_Controls</guid>
      <pubDate>Fri, 11 Jul 2008 12:23:09 GMT</pubDate>
    </item>
    <item>
      <title>C# - Singleton Pattern vs. Static Classes</title>
      <description>Problem: Store some common data in a singleton or static class about your program in an object array, which you store in a class. It saves state between usages and stores some caches, and must be initialized only once and shared in many code locations. Making a new object each time would be expensive. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnet.dzone.com%2fnews%2fc-singleton-pattern-vs-static-"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdotnet.dzone.com%2fnews%2fc-singleton-pattern-vs-static-" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/C_Singleton_Pattern_vs_Static_Classes</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/C_Singleton_Pattern_vs_Static_Classes</guid>
      <pubDate>Thu, 03 Jul 2008 23:11:21 GMT</pubDate>
    </item>
    <item>
      <title>Singletons are boring, hence factor out the concern (with a twist)</title>
      <description>The umpteenth pattern to singletons...I know you've seen it by the gross ton.
Anyway, I just wanted to add a twist with the implicit operator and here you find the result. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2frealfiction.net%2f%3fq%3dnode%2f153"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2frealfiction.net%2f%3fq%3dnode%2f153" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/Singletons_are_boring_hence_factor_out_the_concern_with_a_twist</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/Singletons_are_boring_hence_factor_out_the_concern_with_a_twist</guid>
      <pubDate>Tue, 29 Apr 2008 23:57:13 GMT</pubDate>
    </item>
    <item>
      <title>C# singleton snippet</title>
      <description>I've decided to stop the copy-paste madness.
Not that I use singletons so very often, but still - It never changes, so lets use a snippet. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.sharpregion.com%2fpost%2fC-singleton-snippet.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.sharpregion.com%2fpost%2fC-singleton-snippet.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/C_singleton_snippet</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/C_singleton_snippet</guid>
      <pubDate>Wed, 16 Apr 2008 05:01:01 GMT</pubDate>
    </item>
    <item>
      <title>C# singleton snippet</title>
      <description>I've decided to stop the copy-paste madness.
Not that I use singletons so very often, but still - It never changes, so lets use a snippet. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.sharpregion.com%2fpost%2fC-singleton-snippet.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.sharpregion.com%2fpost%2fC-singleton-snippet.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/C_singleton_snippet</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/C_singleton_snippet</guid>
      <pubDate>Wed, 16 Apr 2008 05:01:01 GMT</pubDate>
    </item>
    <item>
      <title>Singleton C# code snippet</title>
      <description>A complete documented and attributed singleton C# code snippet.
Highly recommended. 5 key-strokes for a singleton. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.sharpregion.com%2f2008%2f01%2f20%2fsingleton-c-code-snippet%2f"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.sharpregion.com%2f2008%2f01%2f20%2fsingleton-c-code-snippet%2f" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/Singleton_C_code_snippet</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/Singleton_C_code_snippet</guid>
      <pubDate>Mon, 21 Jan 2008 03:45:15 GMT</pubDate>
    </item>
    <item>
      <title>What's wrong with this code? #1 - Discussion</title>
      <description>Discussion over the thread-safe singleton snippet presented in &amp;quot;What's wrong with this code? #1&amp;quot; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.ekampf.com%2fblog%2f2007%2f07%2f15%2fWhatsWrongWithThisCode1Discussion.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.ekampf.com%2fblog%2f2007%2f07%2f15%2fWhatsWrongWithThisCode1Discussion.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/What_s_wrong_with_this_code_1_Discussion</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/What_s_wrong_with_this_code_1_Discussion</guid>
      <pubDate>Mon, 16 Jul 2007 11:46:01 GMT</pubDate>
    </item>
    <item>
      <title>How to Use the Singleton Pattern and the Garbage Collector to Manage a</title>
      <description>Here's an easy to minimize the overhead of an expensive resource, such as an image or a network connection, using the singleton pattern and some simple hints to the garbage collector. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.jeremyjarrell.com%2farchive%2f2007%2f05%2f09%2f28.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.jeremyjarrell.com%2farchive%2f2007%2f05%2f09%2f28.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/How_to_Use_the_Singleton_Pattern_and_the_Garbage_Collector_to_Manage_a</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/How_to_Use_the_Singleton_Pattern_and_the_Garbage_Collector_to_Manage_a</guid>
      <pubDate>Mon, 14 May 2007 09:31:01 GMT</pubDate>
    </item>
    <item>
      <title>When is a singleton not a singleton? Serialization!</title>
      <description>How to prevent a singleton class to be instantiated multiple times when deserialized. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetslackers.com%2fcommunity%2fblogs%2fsimoneb%2farchive%2f2007%2f05%2f04%2fWhen-is-a-singleton-not-a-singleton_3F00_-Serialization_2100_.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdotnetslackers.com%2fcommunity%2fblogs%2fsimoneb%2farchive%2f2007%2f05%2f04%2fWhen-is-a-singleton-not-a-singleton_3F00_-Serialization_2100_.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/When_is_a_singleton_not_a_singleton_Serialization</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/When_is_a_singleton_not_a_singleton_Serialization</guid>
      <pubDate>Fri, 04 May 2007 12:31:01 GMT</pubDate>
    </item>
    <item>
      <title>.NET interview question - when is a singleton not a singleton</title>
      <description>A tricky interview question about duplicated singleton instances. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetslackers.com%2fcommunity%2fblogs%2fsimoneb%2farchive%2f2007%2f04%2f30%2f.NET-interview-question-_2D00_-when-is-a-singleton-not-a-singleton_3F00_.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdotnetslackers.com%2fcommunity%2fblogs%2fsimoneb%2farchive%2f2007%2f04%2f30%2f.NET-interview-question-_2D00_-when-is-a-singleton-not-a-singleton_3F00_.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/clr/NET_interview_question_when_is_a_singleton_not_a_singleton</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/clr/NET_interview_question_when_is_a_singleton_not_a_singleton</guid>
      <pubDate>Sun, 29 Apr 2007 19:30:30 GMT</pubDate>
    </item>
    <item>
      <title>ASP.NET Singleton-per-Page pattern</title>
      <description>Implementing a singleton-per-page ASP.NET pattern. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetslackers.com%2fcommunity%2fblogs%2fsimoneb%2farchive%2f2007%2f04%2f17%2fASP.NET-Singleton_2D00_per_2D00_Page-pattern.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdotnetslackers.com%2fcommunity%2fblogs%2fsimoneb%2farchive%2f2007%2f04%2f17%2fASP.NET-Singleton_2D00_per_2D00_Page-pattern.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/aspnet/ASP_NET_Singleton_per_Page_pattern</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/aspnet/ASP_NET_Singleton_per_Page_pattern</guid>
      <pubDate>Mon, 23 Apr 2007 13:16:02 GMT</pubDate>
    </item>
    <item>
      <title>Design Patterns: Thoughts on the Singleton Pattern</title>
      <description>Thoughts on the Singleton Pattern (Executive summary: Don't!) &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fhonestillusion.com%2fblogs%2fblog_0%2farchive%2f2007%2f03%2f13%2fdesign-patterns-thoughts-on-the-singleton-pattern.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fhonestillusion.com%2fblogs%2fblog_0%2farchive%2f2007%2f03%2f13%2fdesign-patterns-thoughts-on-the-singleton-pattern.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/patterns/Design_Patterns_Thoughts_on_the_Singleton_Pattern</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/patterns/Design_Patterns_Thoughts_on_the_Singleton_Pattern</guid>
      <pubDate>Thu, 15 Mar 2007 13:16:02 GMT</pubDate>
    </item>
    <item>
      <title>.NET Remoting Use-Cases and Best Practices</title>
      <description>Most people who don't know me personally assume that I value .NET Remoting above all other means of developing distributed applications. They might also assume that I'll use Remoting as a catch-all solution to any distributed application.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.thinktecture.com%2fresourcearchive%2fnet-remoting-faq%2fremotingusecases"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.thinktecture.com%2fresourcearchive%2fnet-remoting-faq%2fremotingusecases" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/tipsandtricks/NET_Remoting_Use_Cases_and_Best_Practices</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/tipsandtricks/NET_Remoting_Use_Cases_and_Best_Practices</guid>
      <pubDate>Tue, 13 Mar 2007 17:46:02 GMT</pubDate>
    </item>
    <item>
      <title>Singleton - the most overused pattern</title>
      <description>The innocent little singleton in your middle tier is not so innocent after all. This article discusses the design issues inherent in unwisely using the Singleton Design Pattern. In particular it discusses the kind of concurrency and scalability issues that arise from use of singleton in high-use, concurrent applications. It also suggests alternative designs that should be used for business logic classes. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2faabs.wordpress.com%2f2007%2f03%2f08%2fsingleton-%25e2%2580%2593-the-most-overused-pattern%2f"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2faabs.wordpress.com%2f2007%2f03%2f08%2fsingleton-%25e2%2580%2593-the-most-overused-pattern%2f" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/patterns/Singleton_the_most_overused_pattern</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/patterns/Singleton_the_most_overused_pattern</guid>
      <pubDate>Fri, 09 Mar 2007 09:01:01 GMT</pubDate>
    </item>
    <item>
      <title>The ASP.NET Singleton-per-Request pattern</title>
      <description>Implementing the Singleton pattern applied to the Request-Response pair in ASP.NET &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnetslackers.com%2fcommunity%2fblogs%2fsimoneb%2farchive%2f2006%2f08%2f21%2f382.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdotnetslackers.com%2fcommunity%2fblogs%2fsimoneb%2farchive%2f2006%2f08%2f21%2f382.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/patterns/The_ASP_NET_Singleton_per_Request_pattern</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/patterns/The_ASP_NET_Singleton_per_Request_pattern</guid>
      <pubDate>Mon, 21 Aug 2006 12:31:01 GMT</pubDate>
    </item>
    <item>
      <title>PrestonLee.com - Singletons Cause Cancer</title>
      <description>Singletons can be hazardous to your health, seriously jeopardize your family's safety, and have been classified as "terrorist patterns" by the U.S. government. The fact that an application only needs one instance of something does not mean the object should be designed that way, and there aren't very many scenarios where singletons are appropriate. Do as the Jedi do and use them with consideration and responsibly. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.prestonlee.com%2farchives%2f22"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.prestonlee.com%2farchives%2f22" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/patterns/PrestonLee_com_Singletons_Cause_Cancer</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/patterns/PrestonLee_com_Singletons_Cause_Cancer</guid>
      <pubDate>Sat, 15 Jul 2006 01:04:35 GMT</pubDate>
    </item>
  </channel>
</rss>
