Elektrine lite

← Feed

@RedFrank24@piefed.social

2026-01-31 10:20 UTC

Only if you're going by the strict UML definition of composition, which doesn't really apply here, since the industry has moved on a bit since UML was king. Either way, you **can** use DI to do composition in the strictest UML way, provided every single dependency is transient and creates a new instance every single time. Even then though, when most devs talk about composition, they aren't referring to the strict UML definition.

Replies (1)

  • @aaaaaaaaargh@feddit.org 2026-01-31 12:59

    Yeah but I was talking about the opposite. I can clearly spot composition in many frontend framework such as react or flutter but e.g. spring DI is a different thing to me.

    Open ##2753407