on 03-15-2007 4:09 PM
Hi All.
After going through all docs and tutorials, I don't understand when and why will we use a Custom Controller? Can someone please give me a perfect example for usage of a custom controller?
Thanks .
HI Aisha.
In my opinion the custom controller is just used to have a better grouping of
certain functionalities in a component. Which means you
have some views which share the context and methods of a
certain custom controller in order to goup this views.
Cheers,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<b>When should a custom controller be used?</b>
Custom controllers should be created only when their presence will simplify the overall structure of the component. The principles to follow for deciding when a custom controller is needed are:
<b> Reuse</b>
Create a custom controller if you have identified a reuse case for a specific unit of code required by several other controllers within the component.
<b> Task separation</b>
To avoid placing too much coding in the component controller (and thereby potentially increasing its initialization time), place coding dedicated to a specific task into a separate custom controller
Regards,
Azaz Ali.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Custom controllers are used to encapsulate units of functionality that are shared by several controllers
and require no direct user interaction. A custom controller is always instantiated as a singleton with
respect to its parent component.
Custom controllers should be used sparingly!
Before implementing a custom controller, consider carefully whether its presence will simplify or
complicate the overall architecture of your application. Custom controllers should only be added in
situations that will optimize or simplify the architecture of your application.
Thanks
Anuj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.