Re:Swift Protocol Oriented Programming and Testing
by swiftaccount1 on Friday July 30, 2021 @02:26PM
(#28010795)
I'm not sure if I fully agree with that. It's true that you can spaghetti with any pattern, but I think on multi dev teams it helps to have guidelines about what goes where to ensure a clear separation of responsibilities. Someone linked another thought provoking article here about how MVC does not have to equal spaghetti which I found interesting. But I also think we need to take a step back and ask, "why have so many ended up with the same result?"
[ Parent
| on HN ]
Re:Swift Protocol Oriented Programming and Testing
by 3grdlurker on Friday July 30, 2021 @03:40PM
(#28011547)
Well I also used to make giant controllers when I was a beginner. That’s why you can pretty much “spaghetti with any pattern”.
Over time I realized that I can just create dedicated controllers or handlers or managers or services with more specific and limited functionality, and then my VCs simply dispatch to those. It’s called composition.