Wrestling with my conscience on this one.
I have a complex object Foo. Foo has EnrichedBar. In order to simplify construction of Foo, I am introducing FooBuilder.
Currently, it is incumbent on the client that constructs Foo to perform the mapping from Bar to EnrichedBar.
Is it appropriate to hide this enrichment within the Builder, or is that assigning too much responsibility to the Builder?
Aucun commentaire:
Enregistrer un commentaire