Dependencies injection pattern
The Hollywood principle (https://en.wikipedia.org/wiki/Hollywood_principle) is stated as "don't call us, we'll call you". One might hear this response after auditioning for a role in a movie. It won't work if the candidates call the recruiting agency every day. The agency would get swamped with calls if there were many candidates.
Instead, the agency will call back if they find someone suitable and want to take it forward.
This Inversion Of Control (IoC) applies to software designs too. IoC is different from other more traditional forms of programming.
Refer to https://techbizcurry.wordpress.com/2014/04/07/hollywood-principle-inversion-of-control-design-pattern/ for an excellent explanation.
Here is a real-world scenario. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access