24 Controllers

Controllers are the last piece of the MVC pattern. As you learned in Chapter 19, controllers hold application logic, retrieve model instances and give them to views, and contain handler functions that make changes to model instances.

The controllers you will build in this chapter will not be particularly large pieces of code. That is the idea behind MVC: distributing the complexity of an application to the places it belongs. Managing the data is the job of the models, and handling the UI is the province of the views. The controller only needs to, well, control the models and views.

Without your knowledge, Ember has been adding controller objects to your application when it is running. Controllers are a proxy between ...

Get Front-End Web Development: The Big Nerd Ranch Guide now with O’Reilly online learning.

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