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

Decoupling output in Symfony command line

Note: I refer to the Symfony Console component quite a lot in my question, but I think this question could be considered broader if thought about in the context of any user interface. I am using the Symfony Console component to create a console…
Ben Guest
  • 1,488
  • 2
  • 17
  • 29
0
votes
1 answer

what does decouple client mean?

I'm preparing for front end dev interview and was reading this blog and the author mentions that MVC provides you: Decoupled client: MVC frameworks like backbone.js incentivise you to use REST API's though their urlRoot attribute in their…
stackjlei
  • 9,485
  • 18
  • 65
  • 113
0
votes
0 answers

Ways to decouple modules in Java Web Application

With all this rumbling about microservices, I started to look alternatives ways to decouple modules, because of the network communication difficulties. In my search for more lightweight and easier methods, I can across several ideas communication…
Rofgar
  • 318
  • 3
  • 12
0
votes
0 answers

DRY & decoupling in Python

I'm doing some editing recently & normally when I wanted to save time I'd wrap a function around a more generic function. I'm also reading more on OO maintenance and they state I shouldn't be letting an object know the name of another object. I am…
Mirv - Matt
  • 553
  • 7
  • 22
0
votes
0 answers

Decoupling code with dynamic data and multiple constructor arguments

I am creating a complex java service which gets a Connection and a Document as input. This Connection is used to instantiate an ObjectDAO and Configuration objects which are then used by other classes to get relevant data. Sample code: public class…
sudshekhar
  • 1,576
  • 3
  • 18
  • 31
0
votes
2 answers

How to design a program so the GUI and program logic are decoupled

I'm starting to make my first C program in awhile using GTK+. I've learned C to some extent and I've worked with PyGTK, so I have a decent understanding of both. But, I've never created GUI program with C. Though it worked, my last GUI program was a…
mouche
  • 1,785
  • 1
  • 16
  • 22
0
votes
1 answer

Is there something to do Dependency Injection with model classes?

I'm developing software (libraries, Web pages, Web API, desktop applications, etc.) using C#, .NET Framework 4.0 and Entity Framework Code First. To develop this software I'm using Dependency Injection with Ninject, and patterns Generic Repository…
VansFannel
  • 45,055
  • 107
  • 359
  • 626
0
votes
6 answers

Decoupling - OOP

I have a simple question (working with Java). I have two classes, one represents a Document, a second represents a Word. The Document class needs to know some info about the words that is kept in Word. My question is, what's the best way to decouple…
user247866
  • 1,501
  • 1
  • 16
  • 25
0
votes
2 answers

Use a delegate to display data on another form

I have a Form that emulates a virtual (on screen) keyboard with a DataGridView. This form is in a library that I want to keep it decoupled from the data layer. How can I pass this form a method to search the database and return a DataTable which I…
H Mihail
  • 613
  • 8
  • 18
0
votes
1 answer

Decoupling HTML parser implementation from search algorithm

I'm designing a program for entity extraction from HTML pages. I've got a sketch design, but I'm not happy with it, since it strongly couples my algorithm classes with the HTML parser I chose to use. I'd be happy to hear suggestions of better…
Mr.WorshipMe
  • 713
  • 4
  • 16
0
votes
1 answer

c++ loose coupling function dependency

As the title already might suggest I am having a hard time describing my architectural problem and for the same reason searching has been without result. I am writing a command line application which aims to take in two-dimensional data to which a…
Pankrates
  • 3,074
  • 1
  • 22
  • 28
0
votes
1 answer

Decouple Angular modules

I have a search web app made with AngularJS, which includes two angular modules: the search-keyword-input module and the search-action module. The first search-keyword-input module has suggest functionality, form validation functionality, and so on.…
hh54188
  • 14,887
  • 32
  • 113
  • 184
0
votes
1 answer

How to refactor a "library of functions" class that is tightly coupled with the business objects?

I have a Calc class that I think was improperly placed in the codebase I am working with. For the class structure see code below. Currently Spec class acts as a storage of data, similar to C struct Calc class is a library of computational…
Dennis
  • 7,907
  • 11
  • 65
  • 115
0
votes
0 answers

Activate a LoadingMask for a View from a Store method in ExtJs without coupling

First of all I know how to set a LoadingMask for a component but have a problem with the uncoupling of the system I am making so I am just looking for a hint/idea. I am using a MVVC architecture and in the View I have a Container with several…
PetarMI
  • 390
  • 1
  • 7
  • 15
0
votes
2 answers

Breaking cyclic dependency in constructor

I'm writing a Java class to manage a hex map (class GameMapImpl implements GameMap) that contains Cell objects. Cell objects are saved in a HashMap, where the key is the position on the hex map. The whole thing used to be very tightly…
user5008307