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

Register User Interface Elements in Engine / Controller

I am currently writing a little game with standard UI controls. It is working great so far but what I don't like is that I am managing the controls in the codebehind file. (C#) As I am trying to decouple all elements, I would like to have a separate…
Faizan S.
  • 8,634
  • 8
  • 34
  • 63
0
votes
1 answer

When two objects are dependent on each other? How to de-couple them?

Bit of a generic question but non the less I am in a situation where I do not know what to do and google has failed me! I am trying to re-write a grid array collision with canvas that I built. Now there is a grid object and a block object. The grid…
ShaShads
  • 582
  • 4
  • 12
0
votes
3 answers

Handling security and be decoupled

I am trying to design an application in 3 layers : 1) Data access layer 2) business layer 3) UI I try to keep classes decoupled so on the business layer I have created interfaces for the Data access classes like this : public interface…
George Statis
  • 548
  • 3
  • 12
0
votes
2 answers

Decoupling business logic from data source

I have an application that depends on a dll (named datalib) intended to store data in xml format. There is a tight couple between my app and that dll. All over the code my app retrieve data using that dll in this manner: var data =…
EngineerSpock
  • 2,575
  • 4
  • 35
  • 57
0
votes
1 answer

Decoupling service classes from the Rails environment

Lets say I have a service class in my rails app. It doesn't really matter what it does but lets assume that it can be used for pushing notifications to clients. # lib/services/event_pusher.rb class EventPusher def initialize(client) @client =…
David Tuite
  • 22,258
  • 25
  • 106
  • 176
0
votes
2 answers

Using interfaces with Linq-to-Sql for decoupling

I am re-factoring a model class into an interface. The model class is auto-generated with Linq-to-Sql. class FooRepository { // ... public void Add(IFoo foo) { db.Foos.InsertOnSubmit(foo); } } The InsertOnSubmit…
blu
  • 12,905
  • 20
  • 70
  • 106
0
votes
3 answers

Avoiding global state without cluttering constructors

I have a project that is in need of refactoring. It is a Java desktop SWT/JFace application with approximately 40 GUI components with major components controlling the lifecycle of minor components. I want to have good modular design with low…
bcoughlan
  • 25,987
  • 18
  • 90
  • 141
0
votes
1 answer

Using deferred with jquery ajax calls and async processes along with user confirmation reading in between

Background This is in continuation to my question Correct way to set up a sequence of synchronous/asynchronous functions all of which can stop form submission and further processing? I got the answer on what was the correct way (deferred pipe), but…
Sandeepan Nath
  • 9,966
  • 17
  • 86
  • 144
0
votes
3 answers

Proper way to retrive HTML textbox data using JavaScript

Assuming I have a simple HTML page like the following: ...
mjgpy3
  • 8,597
  • 5
  • 30
  • 51
0
votes
1 answer

Scaling a Rails application on EC2. Is this the right way?

So I have a Rails application. It currently runs separate as front-end and back-end + database. I need to scale it to have several back-end servers. The backend server has Resque background workers running (spawned by user front-end requests). It…
Stpn
  • 6,202
  • 7
  • 47
  • 94
0
votes
1 answer

.net mvc single admin section multiple sites

Desired outcome: 4 customer facing sites as separated projects 1 set of admin code used by all four sites My current setup is 4 Projects: Core for models/entities Data for repositories Controllers for, well, controllers Web for views Now, the Web…
Dave Archer
  • 3,022
  • 20
  • 23
0
votes
5 answers

What are the symptomps of tightly coupled objects?

When designing an application, when do you know that your objects are tightly coupled? What are the symptomps of tightly coupled objects/codes?
0
votes
1 answer

Splitting a large c++ program into several components

I have a c++ program that consists of many .cpp & .h files. I'd like to introduce some physical decoupling by taking a bunch of .cpp files for a certain feature of the program, and compile that feature into a seperate .dll / dylib. When doing this,…
Lucas Meijer
  • 4,424
  • 6
  • 36
  • 53
0
votes
1 answer

Google App Engine: Orchestrating Multiple Apps to Deliver a Composite Service

To my knowledge, GAE does not allow you to upload different Java apps (WARs) to different instances and have them all be part of the same "GAE app". However, it would be nice to have a modularized architecture, where I have a main web app a multiple…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
0
votes
1 answer

Do the static property values in Oracle's modified MVC example break the intended decoupling?

I have been following the modified Model View Controller example presented in this article by Oracle. Java SE Application Design with MVC In this example the DefaultController class declares property name strings like this: public static final…
1 2 3
24
25