Questions tagged [circular-dependency]
The circular-dependency tag has no summary.
54 questions
0votes
0answers
82views
+50
How should ViewModels and Services communicate in a JavaFX + Spring Boot MVVM application?
I'm building a JavaFX + Spring Boot application using the MVVM pattern. Problem I have two ViewModels: SharedLoginViewModel: Manages the workflow state (e.g., login process, step transitions). ...
0votes
4answers
278views
Resolving Dependency Cycles
Class and component dependency cycles Assume, we have component A with class CA, and component B with class CB, with a cyclic two-way dependency between classes CAand CB. Hence, we have a cyclic ...
2votes
4answers
396views
How to avoid circular dependency in my scenario?
For example, I have a Business Intelligence (BI) microservice, it reads data from other microservices, and displays the data as a bar chart or some other styles. My problem is, the BI microservice ...
6votes
2answers
5kviews
How to easily avoid circular dependencies
In a legacy project's service layer, there are tens of service classes and among them there is one service, UtilityService using 2 other services: class UtilityService{ private UserService ...
0votes
3answers
1kviews
How to solve a circular dependency with a composition relation?
For a game I'm making I have two objects; Gun and ReloadSystem. At the moment, these two object reference each other. Gun tells ReloadSystem to perform a reload when the gun gets clicked, and ...
0votes
2answers
283views
Struggle with catch 22 in initialization code
I have a command line application written in C#. Here's some facts about the program that are relevant to my question: The application has a "data directory" (e.g. ~/.config/myapp) where ...
3votes
1answer
174views
How to structure python modules/packages according to dependecy inversion
If I am working on a project, say it has this file structure: car/ body/ __init__.py doors.py bonnet.py engine/ cyclinderhead/ __init__.py pistons.py ...
0votes
0answers
52views
Designing a proof mechanism
DataModel contains a Proof that contains all the information of its integrity along with the method with which the Proof should be verified. In this case I designed a JWS type of proof that can be ...
-1votes
2answers
161views
Decoupling 2 Tightly Coupled Classes, Basket and Discount
I have two tightly coupled classes Basket and Discount. Basket is responsible for keeping track of the items in a shopping basket, keeping track of any discount codes applied, and calculating the ...
0votes
3answers
163views
Logically grouped interfaces have circular dependencies in call graph, tight coupling. Leave as is, break up CRUD interfaces, something else?
The problem I have relates to an existing system in a specific business domain. I've simplified it into a very similar 'Library/Book' relationship to articulate the problem. Answers such as 'why would ...
0votes
0answers
471views
Python circular dependency
I have two classes AST and ASTNode for working with some tree-like data. Both these classes have networkx graph as a field and a node id (integer). For AST this id refers to the root of a tree. These ...
-1votes
1answer
304views
How to implement DAO design pattern?
I'm trying to learn how to implement a DAO design pattern (for a game, but this does not really matter). In my program, I have a database layer which has user objects. Then in the code, I have a DAO ...
2votes
2answers
724views
Modular programming: module inter-dependency
I'm looking to make a clean modular architecture. I hear all around how bad are circular dependencies, and I'm convinced that the less two modules are coupled, the most reusable the code will be. But ...
-2votes
1answer
2kviews
Simple circular dependency between three classes
I have this basic design with a circular dependency. Is there any solution for this? The problem is that a Machine cannot be created if a Model for that Team has been submitted.
5votes
3answers
868views
How to avoid DI dependency cycle for observer pattern
In my project I'm using the observer pattern in several places, i.e. the subject notifies the observers about something, and expect them to act. The subject does not know anything about the details of ...