News for hackers. Stuff that matters.
Re:Printf(“%s %s”, dependency, injection) by igouy on Tuesday October 19, 2021 @01:53PM (#28921175)
> What people like to blame Java for…

… perhaps came later, with embellishment

2004 https://martinfowler.com/articles/injection.html

Re:Printf(“%s %s”, dependency, injection) by pjmlp on Tuesday October 19, 2021 @02:41PM (#28921758)
CORBA, SOM, COM, DCOM/MTS+ came before Fowler's stuff, and DI was already a thing in such frameworks.
Re:Printf(“%s %s”, dependency, injection) by eternalban on Tuesday October 19, 2021 @05:05PM (#28923765)
What do all these things have in common? They are all 'component oriented' architectures and DI is required for systemic treatment of [3rd party] components. (Btw add J2EE to your list.)

DI allows a generic runtime to instantiate and compose component graphs [via declarative initialization contexts]. The idea was we'd have reusable components. Somewhere along the line came Spring ("J2EE is too complex" lol) and before you knew it, any old application was using DI and now (per a scan of comments in this thread) everyone is quite confused what is the purpose of "passing variables to your functions" in this obscure manner.

Re:Printf(“%s %s”, dependency, injection) by pjmlp on Wednesday October 20, 2021 @12:44AM (#28926853)
J2EE started as a Objective-C framework and was ported to Java as Sun ramped down their OpenSTEP efforts.

> NEO was re-positioned as a Java system with the introduction of the "Joe" framework,[2] but it saw little use. Components of NEO and Joe were eventually subsumed into Enterprise JavaBeans

https://en.m.wikipedia.org/wiki/Distributed_Objects_Everywhe...

And we did just the same with objects factories and directories on the listed technologies.

Re:Printf(“%s %s”, dependency, injection) by eternalban on Wednesday October 20, 2021 @04:04AM (#28928030)
Thanks, didn't know this bit of history.
Re:Printf(“%s %s”, dependency, injection) by igouy on Tuesday October 19, 2021 @07:20PM (#28924953)
Post hoc ergo propter hoc ?

Perhaps "What people like to blame Java for…" is how it was required to be done in Java.

Re:Printf(“%s %s”, dependency, injection) by pjmlp on Wednesday October 20, 2021 @12:39AM (#28926826)
Feeling superior quoting Latin?

Perhaps Java became a victim of enterprise culture, just like nowadays everyone is doing system level DI with Kubernetes orchestrations and WebAPI?

Re:Printf(“%s %s”, dependency, injection) by igouy on Wednesday October 20, 2021 @01:40AM (#28927149)
> quoting Latin?

When those are the appropriate search keywords.

Re:Printf(“%s %s”, dependency, injection) by pjmlp on Wednesday October 20, 2021 @05:01AM (#28928417)
Sim, eu sei que me poderia ter dado ao trabalho de usar o Google, mas para quê perder o meu tempo com alguém que se dá ao trabalho de escrever em Latim só para se mostrar superior.