Boundaries
Why Software Engineering Stack Exchange recommends it
Software Engineering Stack Exchange users cite it when discussing unit test layering, functional core / imperative shell designs, and similar sandwich-style architecture patterns.
Recommended by 1 people across 1 different months, 2016 to 2021.
What it is
Gary Bernhardt's conference talk explores where to draw boundaries between pieces of code. It covers isolated testing, behavior versus data, mutation versus immutability, how data shape affords parallelism, and turning interface dependencies into data dependencies, which leads to the 'functional core, imperative shell' approach.
What people said
Recommends kibe · 2021-07 · Software Engineering Stack Exchange · on “Given a function that has already been unit tested, but is present in another unit, should I bother testing it again?”
but wouldn't the tests grow exponentially? i was watching a talk by Gary Bernhardt, "Boundaries" ( [this video] ), and I think that by 6m40s he mentions that. if i created yet another layer, which uses the service layer, then I have to account for the new layer I created, plus the service layer, plus the domain layer. it's a lot of cases but, as you said, it would be nice if `createUsers` can check these cases even if `canCreateNewUsers` has changed
Cites max · 2016-11 · Software Engineering Stack Exchange · on “Functional core for elevator system design”
How can Gary Bernhardt's "Functional Core / Imperative Shell" architecture [this video] be used to design software for an elevator system? Specifically, let's say there are a few elevators, each with call buttons (one per floor). Each elevator has sensors that report speed, position, and button status, and a controller that accepts instructions such as go up, go down, stop. Also each floor has sensors that report the status of the up and down call buttons. Pick whatever is easiest for IO, like reliable messages or whatever. And pick whatever you is best in terms of concurrency (multiprocessing, multithreading or just asynchronous code). An advanced elevator system bases its decisions on more than
Cites ShreevatsaR · 2021-05 · Software Engineering Stack Exchange · on “Is there a standard name (or examples) for the "sandwich" pattern?”
I've noticed a certain idea recur in different contexts, but before I start calling it "the sandwich pattern", it would be useful to know (in the spirit of other "Is there a name for this pattern?" questions [LINK] on this site): whether it is a recognized concept that already has a better-known name, and whether there are further examples to illustrate this pattern. What I'm thinking of as "the sandwich pattern" is abstracted from a couple of examples: The first is Ned Batchelder's "Pragmatic Unicode" [LINK] from 2012, where he suggests a "Unicode sandwich": [emphasis added] the data coming into and going out of your program must be bytes. But you don’t need to deal with bytes on the inside