Trust Boundaries

In Object Design [Wir02], Rebecca Wirfs-Brock introduces the concept of a trust boundary, a place where your software connects to other software that it cannot assume will always play by the rules, such as another system, one that you don’t control.

For example, when you look at your ecosystem diagram, consider the public interfaces. Those interfaces represent a trust boundary. On the other side of the interface is a system or a human you cannot control. Inside your implementation, there is code that protects the logic at the core of the system from having to worry about malformed inputs. The core is therefore inside the trust boundary.

The thing about trust boundaries is that it’s not always obvious they exist. It’s common ...

Get Explore It! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.