Dirk: a new light-weight system for dependency injection

This page summarizes the projects mentioned and recommended in the original post on /r/java

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Dagger2

    A fast dependency injector for Android and Java.

  • Of course, but given that there is already https://dagger.dev/ I wonder how much of this "dirk" is derivative, and how is it better than what is already out there?

  • PicoContainer2

    PicoContainer2 (formerly on Codehaus)

  • I might implore you to nix the logging framework dep to truly get to 'lightweight". We had a monitor in PicoContainer in the end - https://github.com/picocontainer/PicoContainer2/tree/master/pico/container/src/java/org/picocontainer/monitors. Multiple choices with a NullObject as the default. Outside the main jar, there were some impls that adapted to logging frameworks -https://github.com/picocontainer/PicoContainer2/tree/master/pico/gems/src/java/org/picocontainer/gems/monitors. I'm also one of the principal authors of https://cwiki.apache.org/confluence/display/avalon/AvalonNoLogging some 19 years ago .. needs a rewrite though.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • glassfish-hk2

    Dynamic dependency injection framework

  • See HK2, which, for better or for worse, permits this explicitly, along with "just-in-time" injection semantics.

  • avaje-inject

    Dependency injection via APT (source code generation) ala "Server-Side Dagger DI"

  • Just to say, I also created a DI library called avaje-inject - https://avaje.io/inject/ ... which uses Java annotation processing to do DI as mostly source code generation. So the runtime dependency is ~ 67Kb. It also supports AOP aspects via source code gen which I think is kind of cool - you can have your own aspects like `@Retry` etc and it's actually done using source code generation.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts