Mobile Development

Design Patterns

There are a few standard design patterns that you will use in coding mobile applications. These are not necessarily specific to Swift or Apple, but are general templates you can utilize in your programming endeavors.

  • MVC - Model View Controller pattern
  • Singleton - Same instance of a class for all that request it
  • Delegate - Messaging system between two separate objects
  • Notification - Messaging broadcast to all listeners

The above diagram references an example of MVC, delegation and notification. From Apple's Using Design Patterns [1].

References

[1] Start Developing iOS apps today - Using Design Patterns https://developer.apple.com/library/mac/referencelibrary/GettingStarted/RoadMapOSX/books/StreamlineYourAppswithDesignPatterns/StreamlineYourApps/StreamlineYourApps.html

iOS Core Competencies - https://developer.apple.com/library/ios/documentation/General/Conceptual/DevPedia-CocoaCore/

iOS Design Patterns - http://www.raywenderlich.com/46988/ios-design-patterns