Timeline for When is Singleton appropriate?
Current License: CC BY-SA 2.5
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 13, 2013 at 15:06 | comment | added | cregox | This solution proposed it also known as Toolbox | |
Sep 13, 2011 at 8:35 | comment | added | MattDavey | @Scott Whitlock why does it need to be a singleton? Just because there's only a single instance doesn't make it so. Any IoC library will manage this kind of dependency... | |
Nov 30, 2010 at 16:20 | comment | added | Scott Whitlock | Some thoughts: the container is a Singleton, so you haven't gotten rid of Singletons. Also, if you're writing a library with a public API, you can't force the user of your API to use your container. If you need a global resource manager in your library (protecting access to a single physical resource, for instance) then you need to use a Singleton. | |
Nov 3, 2010 at 14:19 | comment | added | Michael K | I just would like to say that you can mock static methods in Java with JMockit(code.google.com/p/jmockit). It's a very handy tool. | |
Sep 5, 2010 at 15:32 | vote | accept | Fishtoaster | ||
Sep 2, 2010 at 3:04 | history | answered | Noah Goodrich | CC BY-SA 2.5 |