liveBook · Manning

Lean packaging

As explained in The Art of Code

Lean packaging is a software pattern that minimizes the size and unnecessary contents of deployable packages.

Lean packaging minimizes deployable artifacts by removing unused dependencies, dead code, obsolete feature paths, and development-only contents. Smaller packages transfer faster, require less storage, and reduce maintenance and dependency-management effort. section 8.4.2 section 8.6

Apply the pattern through deliberate cleanup and build optimization:

  • Delete code paths for features that are permanently enabled or disabled. section 8.4.2
  • Exclude development tools, test data, mock files, and internal documentation from production builds. section 8.4.2
  • Remove unused direct and transitive dependencies, then compress or minify static resources. section 8.4.2
  • Prefer the smallest safe improvement: savings that make code harder to understand may not justify their cost. section 8.5.2

From development bundle to lean artifact

A production package containing test data, mock files, internal documentation, unused libraries, and obsolete feature branches can be reduced by excluding development-only contents, pruning dependencies, deleting dead paths, and compressing static resources. Maven dependency tools, jdeps, or Visual Studio can support the cleanup. section 8.4.2

The pattern targets visible waste rather than optimization for its own sake. It lowers transfer and storage costs while also reducing cognitive complexity, upgrade work, and transitive dependencies. section 8.4.2 section 8.5.2

How The Art of Code covers it

How deep it goes
Explains cleanup targets, build exclusions, compression, and analysis tools, but stops short of prescribing a universal optimization checklist.
Examples
Uses obsolete feature paths, development files, unused dependencies, static resources, Maven plugins, jdeps, and Visual Studio reference cleanup.
What it assumes
Assumes familiarity with production builds and project dependencies while teaching how to identify and remove packaging waste.
What you can do after
Apply it via Maven dependency tools, jdeps, or Visual Studio to produce smaller, faster-to-transfer deployment artifacts.
How it connects
Connects package cleanup with lean storage, lean communication, efficient execution, memory efficiency, and dependency management.

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.