top | item 33071813

(no title)

tipsee | 3 years ago

Yes, disagree on needing a library. The way your comment was worded made it seem to me like you were saying all serious Java applications need a DI library, I'm sorry if I misunderstood you. I prefer doing my ID manually, so no recommendation :)

discuss

order

mkingston|3 years ago

Could you be more explicit, perhaps with an example? Do you simply mean you prefer function/constructor parameters over DI?

erpellan|3 years ago

Calling a constructor is DI. ‘new’ is the only DI framework required.

Benefits:

Unbelievably fast startup time

No magic

No annotations, XML or YAML required

No classpath scanning related security vulnerabilities

Conpletely deterministic

In no other language is ‘calling a constructor’ considered so complicated a framework is required.

Try it!