Complex BSP applications that are based on the MVC Design Pattern have many extensive components. Each individual part, consisting of a complex BSP application, contains precise application logic and well thought out presentation logic. It makes sense to create the individual BSP components as reusable modules. These reusable modules are:
· Controllers
· One or more views
· A Model
Together they form a component.
Components are only available for stateful BSP applications.
The use of components is integrated in the MVC design pattern.
You are in SAP Web AS 6.20.
A component consists of a controller, whose class is derived from CL_BSP_CONTROLLER2, as well as one or more views, which can result in regular nesting. This is outlines in the following graphic:
Central features of components are:
· With components, there are complex call sequences during an HTTP request.
· The individual parts, of which a page in the browser consists, are dynamically assembled during runtime.
· One component can call a different component. It should therefore be placed in a view. This is done using the <bsp:call> element.
· Initialization can be called by the controller using method create_controller. This method is available for all controller classes. It creates a controller or finds an existing one.
· The parent controller contains a list of the individual sub-controllers and forwards all input to the relevant controller. This is done by prefixing all IDs with the path of the controller IDs.
· The controller has a hierarchical tree. Every controller controls its view or views, its model as well as the list of sub-controllers.
· Basis class CL_BSP_CONTROLLER2 controls the sub-controllers. The controller developer is responsible for controlling the view and the model.
If you want to use data binding functionality, you can add a model class to your component. For more information see Data Binding.
...
1. Creating the top-level controller
4. Determing the Input Processing