IOC? Dependency injection? No, configuration pattern!
IOC, a name that is too tricky, is naturally confusing. Martin takes the self-proclaimed "dependency injection", which is a mere bit of cake. In fact, in a wider range, they are all an implementation of "configuration pattern. (configuration pattern, configuration mode, my name, and self-entertainment. If there are similarities, they are slightly the same)
Engine + configuration.
Search for your project or common open-source projects. If you can search for Classes ending with "engine" and classes ending with "configuration, this project may use "configuration pattern"
In open-source projects I have used, Apache axis uses the engine + configuration mode.
A workflow project I have done also uses the engine + configuration mode.
Of course, the traditional read configuration and dependency injection are still not the same; the former usually has some methods such as getabc (), such as GetObject (objectid) and getbean (beanid) in IOC) but the more flexible method of dependency injection is to directly inject data through setter or ctor, and you do not need to call the getter Method on your own. the former mainly configures some simple attributes, and the latter usually extends the configuration to the object.
Algorithm + functor
In fact, in a larger scope, the engine + configuration mode is also an application of the algorithm + functor mode; Bubble SortingAlgorithmThe result depends only on the comparison function provided by you. If you provide two different functor for comparing age and name, the function is applied to the same algorithm for Bubble sorting, you can get two results.
Parameterization
In fact, is it a parameter in the maximum range? IOC, dependency injection, configuration, functor, isn't it an application of the Idea of "parameter"? (this is unnecessary and boring)