Model-View-Controller and Android

Notice that the objects in Figure 2.3 are separated into three sections labeled Model, Controller, and View. The Android APIs were originally designed around an architecture called Model-View-Controller, or MVC. In MVC, all objects in your application must be a model object, a view object, or a controller object.

  • Model objects hold the application’s data and business logic. Model classes are typically designed to model the things your app is concerned with, such as a user, a product in a store, a photo on a server, a television show – or a true/false question. Model objects have no knowledge of the UI; their sole purpose is holding and managing data.

    In Android applications, model classes ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.