O'Reilly logo

Sencha Touch 2 Mobile JavaScript Framework by Bryan P. Johnson, John Earl Clark

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

Controllers

In Chapter 3, Styling the User Interface, we talked a bit about the Model View Controller (MVC) architecture. This architecture splits our files out into datafiles (Models and Stores), interface files (Views), and files that handle functionality (Controllers). In this section, we will focus on the controller part of the MVC.

At its most basic level, a controller assigns listeners and actions within the application. Unlike our previous example, where the single component is responsible for handling an event, the controller will handle the events for every component in our application.

This division of labor offers a few different advantages when creating an application; they are as follows:

  • The code is easier to navigate when we know that ...

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