Good OO design - The Singleton Design Pattern
问题 All of a sudden I'm having a bit of an OO crisis. Over the last couple of years I've made quite good use of Singleton objects. I used them in many places. For example, in designing an MVC Java application, I'd create a Singleton 'SystemRegistry' class to store the model and view classes (I've only worked on simple apps and the need for multiple views never came up). When I create my model and view objects (which weren't singletons, just normal objects), I'd do something like: SystemRegistry