DEV Community

Discussion on: Design Patterns: Builder

Collapse
 
rexmingla profile image
Tim

You should make your builder class fluent so you can chain creation. Eg.

house = new Builder()
.withWalls()
.withDoors()
.build()