custom and component controller
i need in good explanation on this topic
Difference between custom and controller
and plz explian with a real time example wen we use component controller and
wen we need to go for custom controller
Sumit Malhotra replied
This is the explaination
Web Dynpro controllers come in two distinct types those that have a visual interface, and those that do not. Those controllers that have no visual interface are known as custom controllers, and those with a visual interface are known as view controllers.
Custom controllers should be used sparingly. They are designed to encapsulate a unit of functionality that requires no direct interaction with the user. In practice, you will find that the number of situations in which a custom controller is required is low.
There is however, one notable exception to this rule. Whenever you create a Web Dynpro component, you are implicitly creating a special custom controller called the component controller. A Web Dynpro component has one, and one only component controller. As with all custom controllers, the component controller has no visual interface, and relies on the existence of one or more view controllers to provide it with a visual interface.
Important: At runtime, a component instance may have one and one only instance of each of its defined custom controllers. In other words, all custom controller instances are singletons with respect to their parent component instance.
Remember that just because you can create a custom controller, does not make it is a good idea to do so. Before creating a custom controller, ask yourself whether its presence will simplify or complicate the architecture of your component. If possible, always aim for simplicity of design!
Important: If a component contains multiple custom controllers, then the order in which the WDF instantiates them is indeterminate. Do not make any assumptions about the instantiation order!
A component controller is a special form of a custom controller and should be considered the central point of control for a component. Within the scope of a component, the component controller is a singleton class, hierarchically superior to all its view and custom controllers