4 ms·
One of the biggest problems with iOS development is that most of the official coding samples include quite a lot of logic inside the controllers (called a View
by rcruzeiro 7y ago
One of the biggest problems with iOS development is that most of the official coding samples include quite a lot of logic inside the controllers (called a View Controller in Apple lingo) which in turn causes novice developers to assume this is the correct way of doing it. It's such a common thing to find in codebases that the iOS community calls this the Massive View Controller pattern.
After people realise that the controller is actually the plumbing that just connects stuff, you can easily use MVC with services as described on the Eric Evans book for example and your codebase gets neatly organised, modular and testable.
- bsaul 7y agoit's not just code samples. i remember wwdc conferences at the time of ios3 where apple people used to officially say "we know it gets you worried, but having massive vc is actually just fine"
- jamil7 7y agoiOS architecture takes a bit of a while to feel out and see what works for you and your team. It's extremely overwhelming the last few years with how many alternative patterns are being pushed around and touted as the one true way.
- deleted 7y ago[deleted]
- megablast 7y agoOf course, since it is the easiest way to do it, and it makes sense. That is where viewdidappear, etc. is.