rasiim kyan Profile picture
still around but i be in them blue skies more nowadays - https://t.co/nwMoM2u54J

Jul 13, 2020, 5 tweets

just sharing a design decision i gotta make while doing this enhancement/refactoring

a) use a basic constructor
b) use a *Builder

which to use and when? 🤔

#ooDesign #ddDesign #builderPattern

im going with the basic constructor, pluggin in all the params i need to make the obj "whole"

theres just not enough going on in the init of the obj to justify bustin out a whole Builder for it

i do have an invariant/rule-validation to carry out during inits, but it's just a trivial conditional

so ill KISS and not #overengineer this,

altho in the back of my mind im thinking, what if next iteration, i need to do this other thing during reconstitution from the data store??

but thats just trying to predict the future and i mumble #YAGNI to myself

so the solid grasp oop ddd gof gods are happy. For now

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling