Closed koriym closed 2 years ago
https://github.com/google/guice/wiki/BestPractices
Guice Best Practice
Minimize mutability Inject only direct dependencies Use the Injector as little as possible (preferably only once) Avoid cyclic dependencies Avoid static state Use @Nullable Modules should be fast and side-effect free Be careful about I/O in Providers Avoid conditional logic in modules Keep constructors as hidden as possible Avoid binding Closable resources Prefer @Provides methods over the binding DSL Avoid calling @Provides methods and @Inject constructors directly Don't reuse binding annotations (aka @Qualifiers) Organize modules by feature, not by class type Document the public bindings provided by modules
Ray.Diに関連するものだけ整備
https://github.com/google/guice/wiki/BestPractices
Guice Best Practice
Minimize mutability Inject only direct dependencies Use the Injector as little as possible (preferably only once) Avoid cyclic dependencies Avoid static state Use @Nullable Modules should be fast and side-effect free Be careful about I/O in Providers Avoid conditional logic in modules Keep constructors as hidden as possible Avoid binding Closable resources Prefer @Provides methods over the binding DSL Avoid calling @Provides methods and @Inject constructors directly Don't reuse binding annotations (aka @Qualifiers) Organize modules by feature, not by class type Document the public bindings provided by modules
Ray.Diに関連するものだけ整備