Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 1
    thanks, to me I prefer 2nd approach over constructor injection if not all constructor parameters used by all the methods in the class, maybe because in 2nd approach when I look at a specific method, I know what dependencies only that method uses, what dependencies shared by all methods. But yes I agree with you, maybe the cleanest way in this situation is to separate into several classes. Commented Oct 10, 2014 at 16:17