The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
0answers
78 views

Low coupling when using sealed classes?

Typically, when trying to decouple classes I use Inversion of Control. Lately I've been using a third-party library whose components are sealed. Are there any design patterns to handle this situation? ...
0
votes
1answer
73 views

Are there any strong reasons to use DI for sub-classes that are known to be tightly coupled to their parent containers?

I have Product classes for Products A through Z. And each Product class has its own set of product-specific subclasses, which I'd say are tightly coupled to them, like so: //specific product class ...
4
votes
3answers
87 views

Sets of pair parameters

I have the following class, this class like many rely one parameters coming in as a pair. Originally for convenience, I set them as params Object[] values and check if there is an even number of them ...
2
votes
2answers
68 views

Interface design - Parameter choice

Situation: Is it better to have one or few parameters that supply more than enough information for the intended process or should you have more specific parameters that provide just enough ...
3
votes
2answers
259 views

How can I avoid tight coupling when practically every decision-logic has to check lots of distributed state?

As the senior developer in our company, I am currently starting to move our commercial php-mysql e-commerce solution (which takes data from a specific ERP-system) from procedural spaghetti-code which ...
51
votes
11answers
5k views

How do I avoid cascading refactorings?

I've got a project. In this project I wished to refactor it to add a feature, and I refactored the project to add the feature. The problem is that when I was done, it turned out that I needed to make ...
1
vote
0answers
148 views

How to separate out below tightly coupled classes

I have two classes which are somewhat tightly coupled to one another. Lets call them A and B. A derives from C and B derives from D. B is the class whose instance is created by the system and then B ...
2
votes
0answers
131 views

Decoupling of Model and API (in an .net WEB API Project)

I currently have one separate project for my models, and one separate project for a API application that consumes this model. The intention of the separation is to avoid any outgoing dependencies from ...
2
votes
1answer
89 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
93 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
163 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
264 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. ...
2
votes
3answers
1k 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
110 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
438 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 ...
10
votes
2answers
238 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
190 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
142 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
55 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. ...
4
votes
2answers
645 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 ...
3
votes
1answer
146 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
76 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
137 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
224 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
169 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
383 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 ...
3
votes
0answers
101 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
753 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
373 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
918 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 ...
5
votes
1answer
794 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; ...
16
votes
3answers
1k 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
180 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
2k 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
379 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
558 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
674 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
862 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
340 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 ...
13
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
269 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
698 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
347 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 ...
6
votes
2answers
283 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 ...