O'Reilly logo

COCOA PROGRAMMING FOR MAC OS X SECOND EDITION by Aaron Hillegass

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 6. Bindings and NSController

In the object-oriented programming community, there is a very common design pattern known as Model-View-Controller. The Model-View-Controller design pattern says that each class you write should fall into exactly one of the following groups:

  • ModelModel classes describe your data. For example, if you write banking systems, you would probably create a model class called SavingsAccount that would have a list of transactions and a current balance. The best model classes include nothing about the user interface and can be used in several applications.

  • ViewA view class is part of the GUI. For example, NSSlider is a view class. The best views are general-purpose classes and can be used in several applications.

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