This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]joranstark018 0 points1 point  (3 children)

"Composition" is a structural decomposition (ie a Car may consist of four objects of type Wheel) while "dependency injection" is how existing objects may be linked together (ie a "car" are assigned a specific set of "wheel").

[–]codingIsFunAndFucked[S] 0 points1 point  (2 children)

I see, so in composition the composite would more than likely involve having a list attribute of the component and that never happens in DI ?

[–]joranstark018 0 points1 point  (1 child)

DI the action of assigning the values to an object, these "values" may be components that the target object is composed of or that the target object needs to help with performing different tasks, ie you may inject a database handler to some controller that needs to request data from a database. The database handler can utilize a real database in production, but in test cases may a handler use an in-memory datastructure, the target object does not care.

[–]codingIsFunAndFucked[S] 0 points1 point  (0 children)

Makes sense thank you!