BUILDER / CURRENT DRAFT
Title not set
Body not set
Appearance
BUILDER / THE IDEA IN A MINUTE
Builder separates an object’s construction into explicit steps, so callers can assemble the parts they need before asking for the finished object.
The builder owns an unfinished draft. The product is the result. A caller chooses the steps; an optional director can coordinate a reusable sequence.
WATCH IT TAKE SHAPE
Add named parts to an unfinished draft. Build a report when it’s ready, then keep editing the draft to see what stays separate.
1 / CHOOSE NAMED STEPS
Required parts first, or optional ones first. Build checks that the essentials are there.
2 / THE BUILDER
0 of 2 required parts ready
BUILDER / CURRENT DRAFT
Body not set
Optional parts may be left out.
3 / THE PRODUCT
Created only when you call build()
Your finished report will appear here.
Add the required parts, then build.
Start with an empty builder. Add a title and body, then build your report.
Many optional parts, repeated assembly recipes, or several representations built through similar operations can benefit from a dedicated builder.
A constructor, factory function, options object, or Kotlin named arguments may be enough for simple data. Fluent method chaining alone does not make a useful Builder.
Feel the cost of a growing argument list, then assemble a report with named steps.
Live report workshop · optional practiceBACK FOR A REFRESHERRoles, construction code, product guarantees, and when simpler alternatives work.
TypeScript + Kotlin · bookmarkable