The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
0answers
17 views

Recommend an approach to decouple Product and Access code constructs, in order to simplify Product testing

I have some code that tightly couples Product specific code and Product-Access code. I am not sure how to untangle it. So for example, for testing Product, I have to mock up Access objects. And ...
1
vote
1answer
56 views

How to manage coupling in model classes

I'm doing a class diagram for a game project, but I'm stuck on a coupling problem. Context The projet is a turn-based game. Two users are playing. They've got units on a map. They play until 1 ...
2
votes
1answer
122 views

Third Party web controls and tight coupling

Disclaimer: I am not against third-party controls because I believe it's for productivity I have used Telerik asp.net controls, especially the RadGrid because it makes it easier to do CRUD. They ...
4
votes
3answers
236 views

Reducing dependency cycles and reducing coupling

I'm trying to learn how to produce quality object-oriented code and have been studying concepts like SOLID. I'm currently working on an entity-component-process system for a small game engine. ...
1
vote
3answers
423 views

UML: Queue processor in a sequence diagram

Which is the appropriate way of representing a queue processor in a UML sequence diagram? I want to represent in the same diagram two systems that are loosely coupled through a queue. The first ...
2
votes
1answer
104 views

How modularized should my interfaces be?

I stumbled upon a specific instance where it seems that modularity and simplicity are at conflict with each other. Usually that's not the case, so I was really unsure how to resolve it. Suppose I ...
1
vote
3answers
185 views

Let applications share a database or keep them in sync with web services?

We have decided to build separate applications for user authentication and user management. The reason is that the the former is a "this just needs to always work, and do so instantly" style service, ...
30
votes
3answers
3k views

How does dependecy injection increase coupling?

On the Wikipedia page on dependency injection, the disadvantages section tells us this: Dependency injection increases coupling by requiring the user of a subsystem to provide for the needs of ...
9
votes
2answers
228 views

Using packages (gems, eggs, etc.) to create decoupled architectures

The main issue Seeing the good support most modern programming platforms have for package management (think gem, npm, pip, etc), does it make sense to design an application or system be composed of ...
1
vote
2answers
178 views

Scenario to illustrate how unit testing leads to better design [closed]

For an internal training session, I'm trying to come up with a simple scenario that illustrates how unit testing leads to better design, by forcing you to think about things like coupling before you ...
1
vote
2answers
93 views

Is this the correct understanding of tight coupling and loose coupling [duplicate]

Coupling mean "dependency". It is the case of "Class A" dependent on "Class B" to get the job done. Tight Coupling is when "Class A" Use the implementation of "Class B". Loose Coupling is when "Class ...
0
votes
0answers
53 views

Make a monolithic architecture in something modular

Currently my architecture is a monolithic block that handles a really specific duty. Now it needs to be generalized. Right now it handles a request and all processes (1 or many) associated to it. ...
3
votes
2answers
338 views

Unit testing behaviours without coupling to implementation details

In his talk TDD, where did it all go wrong, Ian Cooper pushes Kent Beck's original intention behind unit testing in TDD (to test behaviours, not methods of classes specifically) and argues for ...
2
votes
1answer
117 views

Architectural problem for Activity communication in an Android app

I maintain an open source Flickr app Glimmr for Android. There is currently an architectural issue around pagination that I've been trying to solve for quite a while, and would appreciate ideas. ...
1
vote
1answer
68 views

how is ORM an example of message coupling?

In this slideshow on slide 26 it mentions ORM as an example of message coupling. How is that so? With an ORM, certain code will call the ORM via an API, but that sounds like "control coupling". Also ...
0
votes
1answer
117 views

Reducing Coupling in a Series of Tasks

I am working on some code right now that involves processing user requests. Each request requires going through an approval. When a request is made, one or more records are created on the database ...
0
votes
2answers
216 views

Is navigate between more than one class a bad practice? [duplicate]

I have the following class with the following function (some implementation details have been skipped): public class TitleScreen : GameScreen { public Texture2D titleScreen; public override ...
0
votes
1answer
157 views

Service layer coupling

I am working on writing a service layer for an order system in php. It's the typical scenario, you have an Order that can have multiple Line Items. So lets say a request is received to store a line ...
2
votes
1answer
373 views

Is this high coupling?

Question I'm currently working a on an assignment for school. The assignment is to create a puzzle/calculator program in which you learn how to work with different datastructures (such as Stacks). ...
33
votes
6answers
2k views

Why is “tight coupling between functions and data” bad?

I found this quote in "The Joy of Clojure" on p. 32, but someone said the same thing to me over dinner last week and I've heard it other places as well: [A] downside to object-oriented programming ...
1
vote
0answers
86 views

Acceptable dependencies in a service-oriented architecture, internal to a team

In a service-oriented architecture, subsystems can depend on each other in different levels: Database level => Foreign keys to enforce data integrity across services on deletions and updates ...
4
votes
3answers
662 views

How to loosely couple modules in service oriented architecture

We're developing a total solution, and we've chosen service-oriented architecture to loosen subsystems. However, now we have a problem. When customer orders something, Order Subsystem is responsible ...
2
votes
2answers
293 views

Unit testing and coupling

As a developer I should strive for low coupling between classes. But low coupling doesn't mean "No coupling" so sometimes I have to allow some code flexibility and use "new" inside a domain model. ...
5
votes
7answers
767 views

Why don't companies ship multiple modules within a mobile app? Are there concerns about tight coupling?

Preface: My question does not exclusively pertain to Google and it doesn't exclusively pertain to iOS. I'm only using Google and iOS as examples because they are familiar to many. I could have just as ...
14
votes
6answers
2k views

Loose Coupling in Object Oriented Design

I am trying to learn GRASP and I found this explained (here on page 3) about Low Coupling and I was very surprised when I found this: Consider the method addTrack for an Album class, two possible ...
4
votes
1answer
722 views

Explanation of Object-parameter-coupling as mentioned in Code Complete book

I have been reading up on the seminal and excellent book Code Complete. It discusses about the various kinds of couplings that can happen between modules(which may be classes as well as methods): ...
6
votes
7answers
1k views

Is a pair of two tightly coupled classes any better than a single, larger class?

I'm rewriting somebody else's code at the minute, and I came across two classes which reference each other directly and call methods on each other. Like so (example in C#): class A { B otherClass; ...
15
votes
3answers
914 views

Does decoupling trump DRY in REST?

I am building a REST API to expose most of functionality of an existing Java API. Both APIs are for internal use within my organization; I do not have to design for external use. I have influence ...
3
votes
2answers
174 views

Automated object creation from user input

I am working on a command-line application that runs simulations. It has to be heavily configurable; the user should be able to provide a very large number (100+) of parameters, some mandatory and ...
6
votes
2answers
1k views

When is Efferent / Afferent coupling good or bad

I have a software patterns exam this week and one of the topics we are to study is Efferent and Afferent coupling. I understand a package has a high Ce (efferent coupling) if it depends on a number ...
2
votes
2answers
350 views

Architecture Best Practice (MVC): Repository Returns Object & Object Member Accessed Directly or Repository Returns Object Member

Architecturally speaking, which is the preferable approach (and why)? $validation_date = $users_repository->getUser($user_id)->validation_date; Seems to violate Law of Demeter by accessing ...
2
votes
2answers
60 views

Should I use structure from a core library graphic toolkit in my domain?

In java (and many other programming language), there are often structure to deal with graphic element : Colour, Shape, etc. Those are most often in a UI toolkit and thus have a relatively strong ...
6
votes
4answers
499 views

Achieving decoupling in Model classes

I am trying to test-drive (or at least write unit tests) my Model classes but I noticed that my classes end up being too coupled. Since I can't break this coupling, writing unit tests is becoming ...
6
votes
2answers
663 views

Have I mistakenly assumed that my routines are loosely coupled?

My Selenium test structures goes as - Data Object class - public class RegistrationData { String firstName = "test first name"; String lastName = "test last name"; // Getter Setter Here } ...
7
votes
5answers
730 views

TDD: Mocking out tightly coupled objects

Sometimes objects just need to be tightly coupled. For example, a CsvFile class will probably need to work tightly with the CsvRecord class (or ICsvRecord interface). However from what I learned in ...
1
vote
2answers
334 views

What are the problems which I will face if all the classes I use are loosely coupled

Loosely coupled classes gives flexibility. If I understand it right, Event flow, Observer Pattern and Design Patterns like MVC focus on loose coupling. So in this context I am aiming towards making a ...
12
votes
4answers
2k views

Where should you put constants and why?

In our mostly large applications, we usually have a only few locations for constants: One class for GUI and internal contstants (Tab Page titles, Group Box titles, calculation factors, enumerations) ...
8
votes
2answers
262 views

Low coupling processing big quantities of data

Usually I achieve low coupling by creating classes that exchange lists, sets, and maps between them. Now I am developing a Java batch application and I can't put all the data inside a data structure ...
2
votes
4answers
654 views

What code smell best describes this code?

Suppose you have this code in a class: private DataContext _context; public Customer[] GetCustomers() { GetContext(); return _context.Customers.ToArray(); } public Order[] GetOrders() { ...
6
votes
5answers
323 views

Splitting 1 large object into 2 tightly-coupled ones - good, bad?

I have a complex object (call it BusinessLogic) which provides an RPC interface to semi-trusted users. The functions in the RPC interface have to decide which procedure to call, check authorisation ...
5
votes
2answers
278 views

God Namespace just as bad as God Object?

We have about 3/4 different projects, each sharing a certain level of data. Some data is not shared, but all the data access has ended up in a single namespace that is included in every project. ...
18
votes
8answers
1k views

Is coupling with strings “looser” than with class methods?

I'm starting a school group project in Java, using Swing. It's a straightforward GUI on Database desktop app. The professor gave us the code from last year's project so we could see how he does ...
7
votes
2answers
2k views

Decoupling UI code?

In my application I have several event handlers that perform some action in response to user interface events such as a button click or menu selection. The code in these event handlers looks like ...
3
votes
2answers
129 views

Displaying and processing objects in a list?

I currently have code like this to display some objects that meet some criteria in a grid: // simplified void MyDialog::OnTimer() { UpdateDisplay(); } void MyDialog::UpdateDisplay() { ...
3
votes
3answers
559 views

Do mixins create coupling with Ruby?

Let's say I have the following architecture: module Keyring @keyring = Keyring.new class Keyring def key def add_key def update_key def remove_key class ...
0
votes
3answers
752 views

Improving Cohesion and Coupling of Classes

I am given this set of code and need to suggest ways to improve the code's cohesion and coupling of the classes. But I thought these classes are quite well de-coupled since it looks like they are ...
7
votes
7answers
1k views

Coupling. Best practices

Following on from this thread I started The Singleton Pattern It got me thinking about how coupled my classes are and how best to achieve loose coupling. Please bear in mind I am a new programmer ...