Tag Info

New answers tagged

0

Yes, that violates a principle: YAGNI. It sounds like you are (partially) using a pattern that allows for the delegate, but you aren't taking advantage of it, presumably because you aren't needing it. You implemented something that allows you to do something, which you aren't doing. Cut it out until you need it.


0

Your top level class that does this creating and delegating sounds like a Service Locator, or Dependency Container. A Service Locator receives requests from components for objects providing a particular service (that is, implementing a particular interface). It goes off and creates an object of the relevant type (or gets an instance out of its cache ...



Top 50 recent answers are included