Replies: 1 comment 3 replies
-
Thanks for your feedback, the glossary is a work of love to make the project palatable even to ppl new to this world. I'm trying to understand your critique and given that the explanation ends with:
Your problem are just the examples, correct? They don't contain any framework-specific code because that's not really in-scope for svcs so I think the best move here is to remove them and maybe add a link to Fowler – agreed? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Inversion of Control paragraph of the glossary currently highlights two things:
smtp
anddb
)but not the Inversion of Control in general. Contrary to the last lines of the explanation it doesn't show how Inversion of Control is strongly associated with frameworks and why it's sometimes called the Hollywood Principle ("Don't call us, we'll call you"). Note that both example code snippets would work perfectly:
What's missing in both examples is the crucial part of registering ourselves in the framework so it calls our
add_user
callback and maybe inject something as well in the process. It's not clear that we as theadd_user
authors are not the ones that will directly call the function.Referenced David Seddon's articles seem to miss the point in a similar way. I think that article from Martin Fowler is more adequate. Another summary seems useful as well:
I know that Dependency Injection may be discussed as a special case of Inversion of Control (the same Martin Fowler does that as well), but if they have separate paragraphs I think IoC should contain something distinct from content that would fit perfectly in DI or DIP paragraphs.
Beta Was this translation helpful? Give feedback.
All reactions