-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce automatic dependency injection #192
Comments
I've heard about Dagger before, ActiveJ Inject is new to me. As far as I can see, Dagger 2.45 seems to be more widely used than ActiveJ Inject. Given that I prefer to distribute MCS as a native executable, I think it's important that either option plays well with GraalVM's native executable building. Ideally, I'd like to see a reflectionless approach, as I believe it will work faster.
It's not even close to a thorough comparison, but from these two parameters, I'm tempted to give Dagger 2 the benefit of the doubt. What do you think? |
Didn't consider the usage of both options, but Dagger seems a solid choice based on that criterium! |
* chore: Add Dagger to dependencies and build * refactor: Split Cli class * feat: Rewrite custom command class factory to Dagger implementation * feat: Setup Dagger modules and components * feat: Boot app with Dagger * refactor: Extract state from command handler * refactor: Add convenience constructor * refactor: Follow-up * test: Rewrite tests * test: Make test independent of user timezone * chore: Formatting Closes #498, #192.
Closed with 390bf3d. |
When supporting the "Copy to clipboard" behaviour with a command-line option (in #184), I discovered that there is currently no easy way to make the value of such an option available at an arbitrary code location. This results in passing a parameter value through multiple layers of interfaces and classes, which is inflexible to say the least.
What if we would introduce a light-weight DI framework (like Dagger or ActiveJ Inject), so that more features can be built that are controlled by a command-line option in a more elegant way?
The text was updated successfully, but these errors were encountered: