3 ms·
It's all about compartmentalized code... Glue happens whenever compartments interact with one another. Examples, thinking of an app I used to work on: a) App f
by sdenton4 5y ago
It's all about compartmentalized code... Glue happens whenever compartments interact with one another. Examples, thinking of an app I used to work on:
a) App frontend (UI logic) is compartmentalized from the app backend. Communication is handled by an async messaging system, requiring bundling up messages in both directions.
b) The app backend talks to a few different servers, each with their on expected message set. glue glue glue.
c) The app backend talks to the app database, inserting/altering info, and extracting database rows into objects which can be passed around.
d) (We also had peer-to-peer communication over local wifi, which required its own massive pile of communication code...)
e) Even different objects/methods in the backend code end up requiring small amounts of glue code to arrange+prepare argument sets to call one another.
So, every time we create a division between two pieces of code, we introduce boundaries, which introduces glue.
---
One way to mitigate the complexity is by making the passed messages first class. In our app, there was some 'AppThing' object which represented an instance of the fundamental thing the app was about. You then stuff that object with every piece of info about AppThings you could ever want, and pass it around freely between components. Invariably it gets kinda bloated and fractures, when someone doesn't want to bother building up the WHOLE thing with the necessary DB and server calls to ensure the data is all accurately filled in, when you just want to pass one or two fields to a neighboring UI element. And then you find yourself with lots of logic checking that certain fields are present amongst the million fields in your universal object...
Another approach is to aggressively prune the graph of possible component interactions. Functionality should be well-encapsulated, with absolutely minimal APIs for external interactions. Actually draw the 'cell membranes' between different parts of the app, map out the interactions between cells, and find ways to cut it back.