Timeline for Structuring a long sequence of operations
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 1, 2020 at 18:59 | comment | added | Above The Gods |
Cool then you're operating outside the domain of OOP. Maybe the use of the object-oriented tag was not applicable to your question. Btw, coding for reusability, or things you think would be useful later, is trap. Build for the requirements you have.
|
|
Nov 1, 2020 at 13:47 | comment | added | Dan Parsonson | @AboveTheGods I don't want a constructor or indeed any other method that's 1000+ lines long, and I certainly don't want UI code (or indeed file access code, of which there is also a lot in my case) in any constructor ever. Also I'd like to be able to share my solution between projects that operate with a UI and those that don't. | |
Nov 1, 2020 at 0:44 | comment | added | Frax | The OP says that "I have an existing large method calling a lot of other large methods, all of which are peppered with UI interaction, which I want to refactor so I can call it from within a web service.", and your answer is basically "call your function". I'm sorry, it's not just useless, it's ridiculous. | |
Oct 31, 2020 at 2:38 | comment | added | Above The Gods | The question that was asked is "how would you structure something like this in object-oriented code?" This is exactly how I would structure it in OOP, thus, it does answer the question. | |
Oct 31, 2020 at 2:23 | comment | added | Frax | The question was about structuring a sequence of actions, and your answer is just "call a constructor", with no regard to structure at all. It's meaningless. (Note: I didn't donwvote, just explaining what is wrong with your answer.) | |
Oct 31, 2020 at 1:36 | history | edited | Above The Gods | CC BY-SA 4.0 |
added 462 characters in body
|
Oct 31, 2020 at 1:22 | comment | added | Above The Gods | I noticed someone downvoted my response, but not the others. Can I ask why? Again, looking at the requirements, why can't the car make itself? Why do we need a "CarOrchestrator", "FrameFactory", "lazy sequences", "model", "PaintFactory", etc? | |
Oct 31, 2020 at 1:14 | history | answered | Above The Gods | CC BY-SA 4.0 |