O'Reilly logo

RubyMotion by Clay Allsopp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required