-
Guice
Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 11 and above, brought to you by Google.
-
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.
In this approach you defer instantiation of the Logic class to Guice using assisted injection to get the this reference. It's preferable for objects to not directly instantiate the objects they use because it creates a situation where, if you need to change the way a particular class is instantiated, you have to hunt down everywhere in the code base it's being created and update it. Better is to centralize all of that into Guice modules so all of that logic is collected together in one place.
Related posts
-
VContainer VS Init(args) Lite - a user suggested alternative
2 projects | 5 May 2024 -
Zenject VS Init(args) Lite - a user suggested alternative
2 projects | 5 May 2024 -
Modular Dependency Injection in .NET
-
Hexagonal Architecture/Ports And Adapters: Clarifying Key Concepts Using Go
-
Injeção de dependência em Go