DotNetShoutout - Stories tagged with singleton
3
Shouts

To repeat or not to repeat yourself?

published 687 days, 23 hours, 30 minutes ago posted by slo2olsslo2ols 691 days, 15 hours, 31 minutes ago
Friday, July 01, 2011 9:04:59 PM GMT Tuesday, June 28, 2011 5:03:25 AM GMT
What do modern developers if they are forced to write repeated code? Of course, they follow DRY principle and try to write generic code that covers as much as possible cases and can easily be extended to the rest. But sometimes such a change is complex, inefficient, or simply impossible. Here template engines come into play that allow the developer to set the rules and get your service code. I propose to try to take the advantages of both these approaches. (more)
category: How To | clicked: 4 | comment | | source: osmirnov.net
tags: Repository, T4, Builder, Patterns, singleton, dry, snippets, Fluent Interface
2
Shouts

Singleton Design Pattern

published 811 days, 13 hours, 50 minutes ago posted by himanethimanet 812 days, 9 hours, 3 minutes ago
Monday, February 28, 2011 6:45:19 AM GMT Sunday, February 27, 2011 11:31:44 AM GMT
This post describes all about singleton design patterns (more)
category: Web Dev | clicked: 4 | comment | | source: himabinduvejella.blogspot.com
tags: singleton, singleton design pattern
3
Shouts

Lazy developer

published 844 days, 1 hour, 13 minutes ago posted by slo2olsslo2ols 844 days, 12 hours, 11 minutes ago
Wednesday, January 26, 2011 7:22:06 PM GMT Wednesday, January 26, 2011 8:24:18 AM GMT
If I ask about Lazy Loading pattern, 99 out of 100 developers know what it is and what it eats. But if I ask where they use it most often, then more than half will answer - for implementation of Singleton pattern (sometimes I think that 110 of 100 developers know about it). We won't blame them for such illnesses as singletonism (singletonitis is who very love singletons), but the fact remains when developers take for ORM the Lazy Loading are interested them in the least. Let's find out why. (more)
category: How To | clicked: 0 | comment | | source: osmirnov.net
tags: .NET, Lazy Load, singleton, ORM, Patterns & Practices
4
Shouts

Singletons in C#, Static Constructor vs Static Initialization

published 1052 days, 7 hours, 27 minutes ago posted by http://baldi.myopenid.com/http://baldi.myopenid.com/ 1053 days, 16 hours, 3 minutes ago
Friday, July 02, 2010 1:07:30 PM GMT Thursday, July 01, 2010 4:31:58 AM GMT
In C# you can implement a thread safe singleton where the complexity is hidden in the .net framework, you not even need a if statement! (more)
category: How To | clicked: 0 | comment | | source: www.code-in.net
tags: .NET, singleton
4
Shouts

Static constructor in C#

published 1090 days, 7 hours, 52 minutes ago posted by http://baldi.myopenid.com/http://baldi.myopenid.com/ 1090 days, 13 hours, 38 minutes ago
Tuesday, May 25, 2010 12:43:13 PM GMT Tuesday, May 25, 2010 6:56:25 AM GMT
When you work with static class variables, the static constructor allows you to create much cleaner code. It gives you the ability to execute code before one of the static methods of the class are executed. You are able to initialize the static variables of your class with no lock of if statement. (more)
category: How To | clicked: 0 | comment | | source: www.code-in.net
tags: .NET, C#, Singlton Pattern, singleton
7
Shouts

Singleton Class in C#

published 1155 days, 5 hours ago posted by http://jalpesh.blogspot.com/http://jalpesh.blogspot.com/ 1156 days, 1 hour, 5 minutes ago
Sunday, March 21, 2010 3:34:52 PM GMT Saturday, March 20, 2010 7:29:41 PM GMT
Singleton pattern is very popular pattern used by programmer. The idea behind the singleton pattern is to have only one instance of a class at any time. This kind of pattern is very useful for for heavy resources like Linq Data Context etc. It is also useful in multithreaded application where different thread  of application try to crate instance of one class but it should be thread safe. It can be also useful for global resources and state objects. In singleton class there are two things required. One s... (more)
category: Web Dev | clicked: 2 | comment | | source: jalpesh.blogspot.com
tags: C#, singleton, C# .NET