I have a Servlet that has a lot of existing code. I\'m trying to add dependency injection into one part of it. Currently I am doing it manually:
I know that it is poor programming and architecture when you have a class object that is only to be used in one place. But I\'ve also been warned about creating an object that is all powerful and that
Reading the wikipedia entry about God Objects, it says that a class is a god object when it knows too much or开发者_如何学C does too much.
I have been writing a PHP class that is exactly 450 lines long and it contains 14 static methods and 4 static properties as well as 6 constants (and private __construct() and __clone()).
In 开发者_Python百科my app I have a Controller that\'s started by the main method. The controller initializes hooks, database connections, the UI, another connection, and other things. It holds most o
In a system I\'m currently working on, I have many components which are defined as interfaces and base classes.Each part of the system has some specific points where they interact with other parts of
I have an object called Parameters that gets tossed from method to method down and up the call tree, across package boundaries. It has about fifty state variables. Each method might use one or two var