Voting

Aus Java Student User Group Austria - Java + JVM in Wien Österreich / Vienna Austria
Version vom 16. Dezember 2012, 06:50 Uhr von 64.124.46.6 (Diskussion) (RhzqwzkLoLIwuXho)
Wechseln zu: Navigation, Suche

Perhaps it's just my limted penasrol experience with IoC, but I'm not convinced (yet) that making my classes more complex by adding calls to factories that abstract away calls to service locators (or worse, making my classes depend directly on the IoC containers themselves) is all that much better than a few extra parameters being passed into a constructor. Perhaps another valid approach would be to consider why the class has so many different contexts that not all of the dependencies are used in every case and refactor it down to multiple classes. In the end, I'm sure there are cases where both approached make sense thanks for pointing out the design consideration!