Questions tagged [tightly-coupled-code]
44 questions
1
vote
0 answers
Why MVP still considered tightly coupled even contract(interfaces) are used
With loosely coupled what I understand that interaction between classes/objects has to be through interfaces or abstract classes moreover according to my understanding any dependency should come from outside class(dependency injection) instead of…

blackHawk
- 6,047
- 13
- 57
- 100
1
vote
2 answers
How does Spring Framework choose between two components?
I'm new to Spring and Dependancy Injection, so I'll do my best, but this question may not be perfectly formed.
In short, imagine a 'sandwich' program that has a 'cheese' component. swiss cheese and provalone cheese both fit the interface, so they…

jon P
- 63
- 2
- 6
1
vote
0 answers
Should I go tightly coupled, with singleton, or loosely coupled, without a singleton? Azure Services, Xamarin Forms
I am making a Xamarin Forms Cross platform app.
I have been trying to figure out how to go about getting my app to integrate with the Azure Backend the best way.
I have ran into a problem. It has been drilled into my head to try to build programs as…

John Butler
- 41
- 5
1
vote
5 answers
How to instruct Spring to Autowire a field in a chain of tightly coupled objects
It's kinda hard to explain... Hope the question isn't vague...
you can look at the code to get the idea...
ClassA.java
public class ClassA {
@Autowired
InterA abcd;
public void dododo() {
abcd.doit();
…

Crystal Paladin
- 579
- 5
- 26
1
vote
1 answer
How to make data loosely coupled with application code?
I have inherited a project code base from a developer who worked on it.
I have to make some changes in it.
Say I have a table "CARS" with 2 columns
ID | CARNAME
1 | HYUNDAI
2 | FORD
3 | BMW
bound to a Model class "Car":
public Class Car{
…

Sarabjeet
- 264
- 2
- 17
1
vote
1 answer
Are self-described / auto-descriptive services loosely or tightly coupled in a SOA architecture?
I consider a self-described / auto-descriptive service as a good thing in a SOA architecture, since (almost) everything you know to call the service is present in the service contract (such a WSDL).
Sample of a non self-described service for me is…

snowflake
- 1,750
- 2
- 17
- 40
1
vote
1 answer
Parent App access vs Events in Flex Modules
Inspired by this Flex question, is it seen as better practice to dispatch an event back to the parent app, as opposed to calling a method on the instance of the parent app, from within a module?
To me it seems that the module shouldn't know what…

adamcodes
- 1,606
- 13
- 21
1
vote
2 answers
Cleanly passing options between coupled shell scripts
I have a (bash) shell script myBaseScript.sh, with the following signature:
myBaseScript.sh [OPTIONS] FILE1 [FILE2 ...]
This script myBaseScript.sh parses the options via getopts, like so:
while getopts ":hi:m:s:t:v:" opt; do
#...
done
shift…

Rody Oldenhuis
- 37,726
- 7
- 50
- 96
1
vote
2 answers
Implementing an interface is tight coupling?
It says here that
I would not recommend to use InitializingBean and DisposableBean
interface, because it will tight coupled your code to Spring
Does it make sense? I thought this would be just the opposite to tight-coupling.

Luis Sep
- 2,384
- 5
- 27
- 33
1
vote
1 answer
Trying to avoid tight coupling of application parameters
My web application has a method that parses URL parameters like this.
...
layerName = HtmlPage.Document.QueryString["Layer"] . . . ;
...
One of the departments in our company has a list of URLs with parameters for this application that are…

Beebok
- 385
- 3
- 12
1
vote
1 answer
Laravel facade and tight coupled controllers
I have a hard time to understand how I can do this best. I understand how the facade works as syntactic sugar to present a clear static code layout style while keeping the code loose-coupled and testable.
However I have the following problem.…

driechel
- 3,393
- 3
- 21
- 23
1
vote
1 answer
How to avoid tight coupling?
I have been trying to get my head around this problem for the last week and can't seem to find a solution that doesn't either require a singleton or tight coupling.
I am developing a 3D space game, an early demo of which is…

moosefetcher
- 1,841
- 2
- 23
- 39
0
votes
0 answers
Can I decouple Classes by adding logic to the Controller in MVC?
I have hopefully explained my problem below by writing a short simplified example with the same conceptual question as my actual larger application. My question is centred around ways in which I can de-couple classes from each other. Whilst I accept…

Kevin Greetham
- 81
- 8
0
votes
1 answer
OpenMDAO hierarchical solvers recording
In OpenMDAO, is there any recommendation on how to record and read solver cases if the model is composed of multiple groups/cycles, and multiple nonlinear solvers?
I have a model built of 2 cycles (cycle1 and cycle2), one of them containing two…

Kasia
- 105
- 6
0
votes
2 answers
tight coupling and loose coupling examples with Java code
I am aware of the distinction between tight coupling and loose coupling, according to this articles: https://www.upgrad.com/blog/loose-coupling-vs-tight-coupling-in-java/
What I do not understand is the examples it uses.
For loose coupling, the Java…

RyanKao
- 321
- 1
- 5
- 14