concept application controller in category arcgis

This is an excerpt from Manning's book ArcGIS Web Development.
So far, you’ve built your application so the run.js file sets up the Dojo configuration for your application. The main.js file is used to set up any application-level configurations you may want to define ahead of time. This makes it easier for you to change these options in a single file. For example, in listing 4.3, you initialize the application controller with an object that provides the element name to use for the map and some default map options. This is the application configuration. You’ll add another item to this configuration object later in the chapter to add more layers to the application. As shown in listing 4.4, the purpose of the controllers/appcontroller.js file is to manage tasks at an application level, meaning it talks to any widgets that get loaded and handles some of the communication in the application (for example, what action the map should take when a widget is closed).