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

How to decouple an app's agile development from a database using BDUF?

G'day, I was reading the article "Database as a Fortress" by Dan Chak from the excellent book "97 Things Every Software Architect Should Know" (sanitised Amazon link) which suggests that databases should not be designed using an agile…
Rob Wells
  • 36,220
  • 13
  • 81
  • 146
0
votes
1 answer

How to define the EF connection string only once and re-use it in other projects?

I am building a web application that makes use of Entity Framework. I have moved the Entity Model and generated classes to a separate project, because it will be used by more than one consumer. But when I try to run the application, Entity…
0
votes
1 answer

Good ways to decouple GUIs from SOAP/WS-API update/write calls?

Let's assume we have some configuration GUI that in its current form uses direct DB transactions to submit new configurations for more than one configurable component in a consistent manner. Now let's move the data (DB) stuff behind some SOAP/WS…
user1050755
  • 11,218
  • 4
  • 45
  • 56
-1
votes
2 answers

Trouble decoupling in Java using switch statements

currently I am making a small type game, which in my player class I have far to many importants and dependencies. So I have decided to separate the switch statements in its own individual class to be called in a method. For context the player…
Amir Shaw
  • 135
  • 1
  • 11
-1
votes
1 answer

Suggestion to choose proper design pattern

I am asked to provide the documentation of a design for a "deal service" that de-couples the user’s requests from the requests to the partners who provide rental rates. the service does so, by looking up a cache, and fetching whatever is missing in…
Arefe
  • 11,321
  • 18
  • 114
  • 168
-1
votes
1 answer

Decoupling configuration subcomponents within the same configuration

I have the following problem with my configuration class: Let's say i have something in the lines of: interface IConfiguration { IEnumerable ItemConfigurations { get; } } interface IItemConfiguration { IDbConfiguration…
ImmoralWombat
  • 395
  • 2
  • 11
-1
votes
1 answer

Structuring Spring application with decoupled modules

I am working on a webapp which uses Primefaces as a view, and I inject Spring beans from other projects into JSF Managed beans. I have an architectural problem: I've created separate projects(modules) for each component that I use (Business Logic,…
Mihai Serban
  • 406
  • 2
  • 7
  • 18
-2
votes
1 answer

Decoupling implementation from public API

Implementation 1 type XAuth{ // talking to source1 field1 Type1 field2 Type2 } func (d *XAuth) f1(x str){ // do something } func (d *XAuth) f2(x, y int){ // do something } Implementation 2 type YAuth { // talking to source2 field1…
overexchange
  • 15,768
  • 30
  • 152
  • 347
-2
votes
1 answer

How does Spring decouple a class from an interface?

In the official website of Spring framework, there's an example which shows how Spring decouple a class from an interface, or better to say, an implementation if an interface. Here's the code: Interface: package hello; public interface…
HMD
  • 468
  • 1
  • 5
  • 21
-2
votes
1 answer

How to call different derived classes in constructors of classes derived from a different base class

In C++, I have two separate base classes, each of whose derived classes are somewhat coupled. Here's an example for the kind of thing I'd like to do: First define a set of classes, e.g.,: class Shape { public: double area; …
user1790399
  • 220
  • 2
  • 11
1 2 3
24
25