Reusability

Reusability is a quality attribute that describes the degree to which an asset – a component, module, service, or other artifact – can be used in more than one system, or used to build other assets, without being changed for its new context. As per ISO/IEC 25010, reusability is a sub-characteristic of maintainability, alongside modularity, analysability, modifiability, and testability.

Reusability is a property of an asset’s design, distinct from code reuse, which is the practice of actually using an existing asset rather than writing a new one. An asset can be highly reusable and never be reused, and conversely a poorly designed asset can still be reused, at the cost of the coupling and leaky abstractions that come from forcing a fit where none naturally exists.

The main design lever for reusability is cohesion. An asset that groups only closely related responsibilities behind a narrow, well-defined interface, with minimal coupling to its surrounding context, is far easier to lift out and drop into a different system than one whose responsibilities and dependencies are tangled up with its original context.