cancel
Showing results for 
Search instead for 
Did you mean: 

component controler

Former Member
0 Kudos

In what case we will create component(custom) controler.

is there any problem initially use component controler.

what is diff between componet controler and custom controler.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi see this link

Custom Contoller

Custom controllers are used to encapsulate units of functionality that are shared by several controllers

and require no direct user interaction. Such controllers therefore have no visual interface.For instance, a custom controller could be used, when a BAPI is called, and the information returned requires some sort of intermediate processing before it can be displayed.

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.

Component controller

The component controller is a special custom controller that is automatically created when a component is created. It is this controller that drives the functionality of the entire component.

When should a custom controller be used?

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:

Reuse

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.

Task separation

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

Thanks,

Tulasi

Answers (4)

Answers (4)

Former Member
0 Kudos

while developing the application we need to left the default component controler !!

instead of component controler if we use custom contrler its make improve the performence of application.

Former Member
0 Kudos

Hi

Basically both Component Controller and Custom Controller are same

If both are same then question is why extra Custom Controller is provided?

One of the reason is

This is to enhance application performance by sharing data with Component Controller.

Context of controllers share data with each other which is to be provided to diff parts of application without putting burden on Component Controller which is heart of application. So we can create no of custom controllers in our application.

In other reason we can say

To increase re usability of block of code used in custom controller.

Component Controller

Each Web Dynpro component is supplied with a corresponding Component Controller per default. This controller is responsible for retrieving the data required; accordingly, it must be able to map the corresponding input and output structures of the Web Dynpro model. For the structure mapping you need to bind the context of the component controller with the created Web Dynpro model.

Custom Controller

A custom controller is a special type of controller of a Web Dynpro application, which the Web Dynpro application developer can create explicitly if required. Like all other controller types, the custom controller contains a context class, which is automatically generated when the custom controller is defined. Furthermore, the custom controller contains imported packages and methods that are then relevant to all classes in a Web Dynpro application. You can define more than one custom controller for a Web Dynpro application.

Mandeep Virk

PradeepBondla
Active Contributor
0 Kudos

Hi,

here are many situations when you need custom controllers over component controller.

Suppose you have one DC and you want to make some part of this DC as Public which may include Local context nodes, elements, methods or model context with specified methods to process some functionality. By Interfacing a custom controller with all the exportable methods and context you reach to a certain level of security.

In this case you are distributing your module in multiple custom controllers which ultimately reduces complexity of programming, code and obviously execution time.

This is up to the developer, if he/she wants to create custom controllers or not, but yes in certain situations you should go for custom controllers. It is always good to have multiple custom controllers when you are using single DC for different modules.

[Know the difference between custom controller and component controller|/message/5838006#5838006 [original link is broken]]

[ why we need Custom controllers in Model Applications|;

PradeeP

Edited by: pradeep bondla on Jul 23, 2008 6:29 AM

Former Member
0 Kudos

Hi Jagadeesh,

Please refer to this Thread for the details about Custom and Component Controllers.

Link: [;

Hope this helps.

Regards,

Palani