3 Replies - 395 Views - Last Post: 30 July 2018 - 01:57 PM

#1 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 6657
  • View blog
  • Posts: 22,740
  • Joined: 05-May 12

Is there a term for tight coupling induced by higher level objects?

Posted 29 July 2018 - 08:52 PM

I was wondering if there is any term for tight coupling induced by downstream objects (other than "poor architecture")? If not, can I lay claim to "pseudo loose coupling"?

Imagine two well defined objects/interfaces: one for high-level console UI like read line and write line, and another one for low level console I/O like manipulating cursor position, screen sizes, screen buffer, etc. The high level one can optionally take the low level one as an injected dependency, but it is not required. The high level UI exposes a property the gives out the low level object if it has it. The high level object need not use the low level object accomplish what it needs to do.

Now add a third object that run like an OS command line shell that takes user commands and outputs the results of the command, or errors encountered. This object takes the first object with the high level UI. Now this is where the late coupling comes in: To try to make the UI friendlier, the shell object tries to perform word wrapping and line breaking to make error messages easier to read. Obviously, for this word wrapping to work, the page width has to be known. So where before the high level UI object needs not have to have the low level UI object, now it has to have it.

(Yes, PowerShell, I'm looking at you and your misleading documentation on how to implement a custom UI.)

Has anybody else encountered this type of architectural muddling where the foundations are good, but the upper layers undo any of the well designed lower layers?

Originally, I thought this as a form of baklava code due to the sticky goo leaking through, but the too many thin layers did not quite apply.

Is This A Good Question/Topic? 1
  • +

Replies To: Is there a term for tight coupling induced by higher level objects?

#2 BetaWar   User is offline

  • #include "soul.h"
  • member icon

Reputation: 1581
  • View blog
  • Posts: 8,401
  • Joined: 07-September 06

Re: Is there a term for tight coupling induced by higher level objects?

Posted 29 July 2018 - 08:59 PM

I would have just called that "tightly coupling" things after the fact. I have recently been fighting (thankfully it wasn't too difficult to convince people it was a bad idea) against changing an object's return value to an enum that another object knows how to use instead of something that is interface agnostic. People were wanting a HTTP server to return an enum value telling whether or not it did work so that a scheduler could determine when it needed to be scheduled to run next - I didn't want the server to know anything about the scheduler or how it was being used downstream. I won :) sadly, that doesn't always happen, so there are other designs around the globe that I have been fundamentally against and yet still exist.
Was This Post Helpful? 2
  • +
  • -

#3 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2704
  • View blog
  • Posts: 10,800
  • Joined: 03-December 12

Re: Is there a term for tight coupling induced by higher level objects?

Posted 30 July 2018 - 05:27 AM

I live with them daily, Beta.
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 6657
  • View blog
  • Posts: 22,740
  • Joined: 05-May 12

Re: Is there a term for tight coupling induced by higher level objects?

Posted 30 July 2018 - 01:57 PM

So this is only a simple matter of the ivory tower meeting real life software engineering?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1