adam bien's blog

The Top-Level Organization Unit: Business Component (BC) 📎

A business component is a top-level package named after a single responsibility or feature, not after a technology. discovery, compiler, checkout, invoicing: reading the package names tells you what the system does. That is Screaming Architecture. The structure of a system is the sum of its business components.

Business components are not designed up front. They are created on the go: every new requirement becomes a new component.

zb, a zero dependency builder, grew exactly this way. The first requirement was finding the code. Sources can sit in src or src/main/java, so convention over configuration became a responsibility of its own: discovery.

Found code has to be compiled, then packaged into an executable JAR, then verified. Each need became its own component:

discovery, compiler, packer, hook

The packer creates the JAR. The first name was jar creator, too long. jc was too cryptic. A business component name is descriptive but short: no compound names, no abbreviations. The hook runs after a successful build, so zunit can execute the tests.

discovery, compiler, packer, and hook are domain components. They are first class: reading them reveals what zb does and how it is structured.