liveBook · Manning

Backward compatibility

As explained in The Art of Code

Backward compatibility is the ability of a changed software component or interface to continue working with existing clients and dependent systems.

Backward compatibility keeps existing clients and dependent systems working as a public contract evolves. Treat it as a trust-preserving practice: communicate changes, document alternatives, and preserve compatibility for as long as users need to adapt. section 9.4.2 section 9.5

Manage an evolving interface with two complementary actions:

  • Communicate the change through documentation, changelogs, deprecation policies, and direct or indirect user notices. section 9.4.2
  • Preserve the old interface while users migrate, then use semantic versioning to signal additions, fixes, and breaking changes. section 9.4.2 section 9.5

Make removal predictable

A Java library can mark an old method as @Deprecated(since = "2.1", forRemoval = true), document its replacement, and warn users before removing it. section 9.4.2

@Deprecated(since = "2.1", forRemoval = true)
public void generateReport() { ... }

A compact Java annotation communicates when an API became deprecated and whether its removal is planned. section 9.4.2

How The Art of Code covers it

How deep it goes
Explains communication, deprecation, compatibility duration, and semantic versioning through policy and annotations rather than compatibility internals.
Examples
Uses Java, C#, Python, Kotlin, JavaScript, TypeScript, and C++ deprecation mechanisms as concrete examples.
What it assumes
Assumes public APIs form contracts and teaches how to evolve them while preserving dependent users’ trust.
What you can do after
Apply it via documentation, deprecation notices, compatibility periods, and semantic versioning when evolving public interfaces.
How it connects
Connects public APIs, deprecation, documentation, semantic versioning, loose coupling, SOLID principles, automated tests, and continuous integration.

Also explained in

Compare how 18 books explain backward compatibility →

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.