Questions tagged [decoupling]

Decoupling is the reduction of dependencies between computational parts.

Coupling is a measure of dependencies between different parts of a computer program.

Decoupling is the reduction of said dependencies, in order to improve code maintainability.

The goal of decoupling is to create a loosely coupled program (also known as "low/weak coupling".

That is because a high/tight/strong coupling program is harder to change since often a change in one part of the code forces changes to other parts of the code as well, causing a ripple effect that can spread throughout the entire code base in worst case scenarios.

The benefit of a a low/loose/weak coupling program is that when a change is needed in one part of the code, it should require no change (or at the very least, as little change as possible) to the other parts of the program - thus making the maintenance of a loosely coupled program easier.

370 questions
0
votes
1 answer

Only fetch user's OWN content from headless/decoupled drupal 8 json-api via simple oauth module

After successfully configuring drupal 8 with json-api and "simple oauth module" as a headless instance for my react project, I am currently facing an issue regarding ONLY FETCHING A USER's OWN PUBLISHED CONTENT. Of course there are filter options…
raebo
  • 1
  • 1
0
votes
1 answer

Data Model/Schema decoupling in Data Processing Pipeline suing Event Driven Architecture

I was wondering how Microservices in the Streaming Pipeline based on Event Driven Architecture can be truly decoupled from the data model perspective. We have implemented a data processing pipeline using Event-Driven Architecture where the data…
Ali
  • 1,759
  • 2
  • 32
  • 69
0
votes
0 answers

Regarding Dependency Injection - If a method signature from a lower level class is changed, doesn't the injected higher class have to be updated?

I'm trying to understand DI. The below point highlights a drawback of NOT using DI. "A component is vulnerable to change in its dependencies. If a dependency changes, the component might have to adapt to these changes. For instance, if a method…
onzymorg
  • 19
  • 8
0
votes
1 answer

Refactoring and Decoupling Rails controllers: can they call eachother?

I have the following situation in a Ruby on Rails app: user fills in a form (a comment), gets to see an omniauth page where she can choose the authentication method (openId, Twitter, Facebook and the likes). omniauth is filled in, on success user…
berkes
  • 26,996
  • 27
  • 115
  • 206
0
votes
2 answers

Dynamically instantiate classes extending baseclass using reflection

For a long time I have been struggling with finding a way to dynamically instantiate all classes that extends a specific baseclass (during runtime). From what I have read, it is supposed to be done using Reflection, unfortunately I haven't figured…
0
votes
1 answer

decoupled generic key-value access against linq in a non-xml environment

good morning. i am not a computer scientist by education, so please overlook any shady term abuse. in my framework, a base form called Record opens form RecordDetail as dialog. for example, RecordClient extends Record and contains client data and…
0
votes
0 answers

After decoupling code, what to do when class libraries utilize the same code?

I've been working steadily on decoupling my project into the main console application, and a couple class libraries. It's an OWIN based server which hosts communication between a custom Alexa Skill and it's endpoints. This utilizes JSON…
user2224583
  • 69
  • 1
  • 16
0
votes
2 answers

How to decouple one backend service associated with a database into two separate services?

I have a big MySQL database, D_Big, with a bunch of data in it. I also have a service, S1, with APIs that read or write from this database. For example, one API might get something from the database. Another might write a row to the database. etc.…
0
votes
1 answer

How to decouple implementation details when they depend on data in calling code

How do you decouple interface implementation from calling code if implementation effects must depend on some parameters in the calling code? It may sound convoluted, so here is a real-life example: Some online store sells products from different…
0
votes
1 answer

How to Decouple the existing services?

I need to come up new feature i.e. new maven module/services/domain objects. That module has dependency on other modules and call their services. I need to decouple that call from new services to existing services. Decouple here means modules does…
user3198603
  • 5,528
  • 13
  • 65
  • 125
0
votes
1 answer

How to copy original train defined variables into new train in anylogic train decouple

If we define a custom train agent in anylogic rail library and add some variables to that train agent,how we can keep data related to those new variables in new decoupled train when we use train decouple. Data (for example train code) that was…
0
votes
1 answer

Python: decoupling code from PyQt5 UI Code

I'm doing my first steps with PyQt5. I created a simple dialog "form_main" with only 1 menu: "File|Quit": import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QAction from PyQt5.QtGui import QIcon class GUI(QMainWindow): def…
Anumi
  • 139
  • 1
  • 11
0
votes
2 answers

Removing circular dependencies in asynchronous java application?

I have read up on dependency injection and interfaces, but I am still confused about the best way to decouple packages in my situation. Say I have a UIClass in UIPackage: package UIPackage; import NetworkPackage.NetworkClass class UIClass() { …
user6764882
0
votes
2 answers

Package decoupling in go

We all know dependency injection makes packages decoupled. But I'm a little confused about best practices of dependency injection in go. Lets assume package User needs to access Config package. We can pass a Config object to User methods. In this…
0
votes
2 answers

Help with decoupling a game design

Here's the current dependency graph (with freehand circles for TheTXI) A game has players and a single board shared between them. A player also has access to the board to be able to add/move/remove units from it. A player has access to the units it…
Davy8
  • 30,868
  • 25
  • 115
  • 173