Timeline for Builder pattern in multiple stages
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 30, 2018 at 17:06 | vote | accept | ColdAir | ||
Aug 30, 2018 at 17:01 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Aug 2, 2018 at 20:12 | comment | added | ColdAir | @king-side-slide: I am second guessing my original assumption that these parts are meaning less outside the whole | |
Aug 1, 2018 at 23:29 | comment | added | user3347715 | Are you sure you don’t actually have two objects instead of one? | |
Jul 31, 2018 at 20:10 | comment | added | Robert Harvey | You will have to either pass the first DTO to the second stage (and construct the class the old-fashioned way), or use a builder and hold on to the partially-built class until you have the second DTO. | |
Jul 31, 2018 at 17:25 | comment | added | ColdAir | @Robert Harvey, where am i going to get the first part DTO during the second stage? Second stage is different end point which was called 4 days later. I have no idea what you mean about passing DTO into constructor of new object, by constructor do you mean builder or actual class constructor? If its former, I think you are getting the pattern confused. | |
Jul 31, 2018 at 16:16 | comment | added | Christophe | Why do you think the builder pattern needs to know all the parameters upfront ? The GoF builder allows perfectly well to build complex objects parts by parts (in stages) and assemble the parts at the end. | |
Jul 31, 2018 at 16:14 | answer | added | yitzih | timeline score: 0 | |
Jul 31, 2018 at 15:58 | comment | added | Robert Harvey | Ok. So why not just pass the first DTO to the second stage, and then pass both DTO's into the constructor of your new object? | |
Jul 31, 2018 at 15:19 | comment | added | ColdAir | Hi, no it is not considered fully valid. | |
Jul 31, 2018 at 15:00 | comment | added | Robert Harvey | Is the object considered valid after the first part is built? | |
Jul 31, 2018 at 14:50 | history | asked | ColdAir | CC BY-SA 4.0 |