Dependency Injection Made Easy for Clojure. This blog post explains the premise.
Initializing and wiring up components in a non-trivial application could be a complex and brittle affair. It could be stateful, repetitive, messy or all of those. Dime aims to make that process less error-prone, repeatable and easy to reason about by implementing mostly-automated dependency injection/inversion.
- Easy, push-model dependency injection
- Flexible and easy lifecycle management
- Thorough testability, avoiding pitfalls
- Avoid mutation (except in development)
- Opinionated in favor of decoupling
- Cascading dependencies (minimize with Onion Architecture or Functional Core, Imperative Shell approach)
- Overhead of tagging all dependencies
- Cannot inject in multimethods out of the box
The following projects take different approaches to dependency management:
Clojars coordinates: [dime "0.5.2"]
See Documentation
Slack channel: #dime (you need an invitation from http://clojurians.net/ to join the Clojurian Slack team)
Running tests:
$ lein do clean, test # run tests in lowest supported Clojure version
Copyright © 2016-2021 Shantanu Kumar
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.