Chapter 4Representing Data with Models

We’ve covered views and controllers, but where’s the love for the M in MVC? Well, wait no more, because we’re going to dive into models. We now understand views and controllers, but in practice models will play just as big of a role as the sexier, user-facing code.

In iOS, there are two big components to models: CoreData and, well, everything else. CoreData is an iOS object graph and persistence framework, sort of similar to ActiveRecord in Rails-land. It’s an incredibly powerful framework to save and query objects using a database, so it deserves a chapter or even a book onto its own. But even without touching CoreData, we can do a whole lot with just “everything else” about models. It’s time to get ...

Get RubyMotion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.