Skip to content

A very simple demonstration implementation of dependency injection

License

Notifications You must be signed in to change notification settings

tjaart/StupidInjector

Repository files navigation

StupidInjector


Because it would be stupid to use it for anything else but educational purposes.

Why not?

Nothing is optimised, there is no testing beyond the small toy example in the code. I am probably not going to maintain it. Bug reports will probably fall on deaf ears.

Why?

StupidInjector is the simplest dependency injector I could write, as a simplified demonstration of how dependency injectors work.

What should I use then?

You should probably use SimpleInjector.

Interesting exercises

If you want to fork the project and play around with it, you may have some fun adding features to see how they would work. For example:

  1. Support Collections of injections
  2. Support lifestyles for objects (lots of fun to be had here)
  3. Add a container verification class, to check if the container config is good
  4. Check for circular dependencies in the container.

License

MIT I Guess.

About

A very simple demonstration implementation of dependency injection

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages