in reply to Re: Builder design pattern with lots of parameters - trying to declutter design
in thread Builder design pattern with lots of parameters - trying to declutter design
Thanks for your reply!
In my real application there is maybe a bit more communality but I'd say even in this example there probably is. Even in the real world you may find VehicleDealers who do cars and bikes because all they need to do is call up the builder/factory to make a vehicle and maybe give them some of the details such as colour, and these are mostly the same options for both types of vehicles. As far as I can see, if I used your example, I would still end up dealing with pretty much the same parameters/attributes in the concrete builders and product classes, which was my original problem. However, I think that the mistake was to try and make the builders check those attributes instead of letting the product classes deal with it.