Working with iOS App Architectures

By Jesse Feiler

Part of iOS App Development For Dummies Cheat Sheet

iOS apps use and reuse a number of architectural features. Understanding them can make the development process simpler because you’ll see that you’re using standing patterns. Here are some of them:

  • Model-View-Controller (MVC): This is a design pattern in which the interface (view) is separated from the content (model); a controller mediates between the two. The model knows nothing about the view, and the view knows nothing about the model. The model is where most of what people consider typical coding happens.

  • Recognize Design Patterns: MVC is one of many design patterns in iOS. Recognize these common approaches to various design issues so that you can find and reuse them.

  • Use View Controllers: On iOS, you have a screen that displays various views. Each view is controlled by a view controller. That’s where your code is written. (Sound familiar?)

  • Use Xcode graphical editors: Draw your view use Interface Builder. Create your data model for Core Data with Core Data Model Editor. Both provide a clear graphical visualization of what you’re doing.

  • Use specialized view controllers: Split view controllers on iPad and specialized view controllers such as Page view on iPad and iOS do a lot of the work for you. Don’t start coding until you’re certain there isn’t a view in the Cocoa Touch framework that’s already got the code in it.

  • Understand navigation view controllers: These provide the common “drill-down” functionality that is often necessary on small screens.

  • Figure out how to get from here to there: Drilling down is a good strategy for organized data, but sometimes you need to get from one view and its view controller to another one. Make certain there’s an interface element that will do that.