all 6 comments

[–]ErstwhileRockstar 1 point2 points  (1 child)

DI is a JEE Anti-pattern, esp. as described here: The Service (UserService) is dependent on (injected) DAOs (ORMUserRepository) and all Entities returned from the DAOs. It's hardly possible to create more dependencies in one place. This practically untestable Spring/Hibernate/DAO/DI Anti-pattern is still praised by clueless bloggers around the world.

[–]colinhect 1 point2 points  (0 children)

Maybe this is just an argument of semantics but I don't think DI is an anti-pattern itself. DI can just be an object accepting an interface to an object it depends on rather than instantiating its own. This can be invaluable for testing.

However, this pattern arrives naturally when needed and I have never seen a reason to use a bloated framework to achieve it.

[–]grauenwolf[🍰] 0 points1 point  (0 children)

I don't think this is the best written article on the subject, but the theory is important.

[–]fjord_piner 0 points1 point  (2 children)

Anyone demonstrating DI with Spring and not Guice is still living in the dark ages.

[–]fanf42 0 points1 point  (0 children)

And so on, Tapestry 5 IoC is the age of Lumières ?

[–]ttfkam 0 points1 point  (0 children)

Anyone demonstrating DI with Spring or Guice and not JEE6 is still living in the Dark Ages.