[swift-users] Applying MVC pattern to iOS Swift apps

Roy Henderson roy at scotmail.net
Fri Jun 23 04:41:51 CDT 2017


Firstly, my apologies for submitting a question which is perhaps not strictly on-topic but hopefully the list will permit me a little latitude.

Thinking specifically of iOS Swift application design architecture I would be very interested to hear how other members map traditional MVC patterns to the architecture of the standard Xcode templates?

Should controller functions be incorporated in the AppDelegate or is it better to keep the AppDelegate minimal and put them in a separate controller module?

Is there any sensible demarcation point regarding which controller functions are acceptable in a ViewController? Does it make better sense to include them in the ViewController most closely associated with their actions or are they better placed in a separate module? In particular, I am trying to avoid breaking the rule regarding never having the V communicate directly with the M.

I appreciate this is a rather general question with no single right answer. I am happy simply to be pointed towards any guidance documentation which members may be aware of. I have read some of the Apple documentation but have not yet found any definitive answer.

Thank you,

Roy


More information about the swift-users mailing list