← Graph

Class Constructor as Convenience Interface

concept 2 connections

Design pattern used in Eventide's Useful-Objects style: the instance-level initializer is kept primitive and mechanically correct (it records raw values, its default dependencies are diagnostic substitutes), while convenience and operational concerns move to class-level factory methods like `build(user)`. The class interface (`SignUp.build(user)`) is the 'convenience' / operational interface and wires up real dependencies; the instance interface (`SignUp.new(username, password)`) is the mechanical / diagnostic interface and yields a test-friendly object with mimic defaults. Separating the two lets designers avoid mixing convenience needs into the initializer.

category
pattern
about
Class Constructor as Convenience Interface concept
Final refactor pairs a primitive initializer with a class-level `build` constructor to separate convenience from mechanical correctness.
concept Useful Objects
related_to
Class Constructor as Convenience Interface concept
Useful Objects separate the mechanical initializer from a class-level convenience constructor.

Provenance

Read by
2 extractions