liveBook · Manning

Durability

As explained in The Art of Code

Durability in code is the capacity to remain understandable, useful, and resilient as the surrounding system changes over time.

Durability is the capacity of software to remain understandable, useful, resilient, and dependable as requirements, technologies, runtime conditions, and users change. It begins with a sound design rather than accumulated quick fixes, then extends through resilience, testing, and stable public contracts. section 1.1.7 section 9.0

Build durability in reinforcing layers:

  • Separate concerns so architecture, modules, and domain rules can change without collapsing into one another. section 9.1
  • Keep cohesion high and coupling low to limit the ripple effect of change. section 9.5
  • Use resilience to withstand traffic spikes, misuse, attacks, and transient failures. section 9.0
  • Use automated tests and continuous integration to preserve behavior while the system evolves. section 9.5
  • Protect users with minimal, stable public interfaces, clear response models, documentation, deprecation notices, and semantic versioning. section 9.4 section 9.5
String city = null;
if (user != null && user.getAddress() != null
  && user.getAddress().getCity() != null) {
  city = user.getAddress().getCity();
} else {
  city = "Unknown";
}

Nested null checks make defensive plumbing dominate the business intent and increase fragility. section 1.3

String city = Optional.ofNullable(user)
    .map(User::getAddress)
    .map(Address::getCity)
    .orElse("Unknown");

Explicitly modeling absence expresses the same lookup more clearly and supports safer evolution. section 1.3

Figure 9.1 Layers of durability
figure

The layers model connects implementation, operability, testing, and external stability as a unified durability strategy. section 9.0

How The Art of Code covers it

How deep it goes
Explains durability through architecture, separation of concerns, resilience, testing, and public contracts, with practical design guidance.
Examples
Uses spaghetti, lasagna, ravioli, hexagonal architecture, null checks, explicit absence, APIs, and semantic versioning.
What it assumes
Assumes familiarity with software design and maintenance while grounding durability in architecture, testing, resilience, and interfaces.
What you can do after
Build durable systems by separating concerns, limiting coupling, preserving behavior, and stabilizing public contracts.
How it connects
Connects durability to separation of concerns, cohesion, coupling, software architecture, resilience, testing, continuous integration, and public APIs.

Also explained in

Compare how 6 books explain durability →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of Code. The section links point to the parts of the book it draws on.