Controller 
As well as contexts, a controller also includes methods for handling the values of the context attributes, and for triggering and handling events. Important information about this is available in the Programming Manual for Web Dynpro for ABAP. Alongside these predefined method structures, you can create your own methods and call them from your application. The greater the size of a Web Dynpro application, the more effective it becomes to move its logic into separate auxiliary classes. This makes the methods much more flexible, since you can use these auxiliary classes in other application. Web Dynpro Framework itself implements an assistance class. The inherited type of this class gives it special properties that can be used as appropriate by Web Dynpro Framework. In addition, you can create your own auxiliary classes and structure them to match your application landscape.
Independent auxiliary classes have the additional benefit of optional parameters.
Note
Remember that the methods from auxiliary and assistance classes can be called directly from view controllers as well.
We also recommend that you create method attributes in separate auxiliary classes, and reference them from the Web Dynpro methods.
Caution
Events and event handling in Web Dynpro for ABAP are not identical to the similar concepts in ABAP.
In particular, events can be caught and handled only if a controller usage is entered for both controllers involved.
Assistance classes are instantiated with their component.
Note
Es ist prinzipiell auch möglich, Assistance-Klassen außerhalb der zugehörigen Component zu nutzen. This is particularly useful with reference to model interfaces. More information is available under DEMO_COMMON_ASSISTANCE1.
If a particular assistance class is accessed from various components in a component chain, it makes sense to create the class in the main component and then pass it to the subcomponents.