You are on page 1of 14

Web Dynpro Controllers

Contents:
Model View Controller The roots of Web Dynpro The architecture of the different Web Dynpro Controllers

SAP AG 2005, Title of Presentation / Speaker Name / #

Web Dynpro Controllers: Unit Objectives

After completing this unit, you will: Have further understanding of the Model View Controller (MVC) design paradigm Understand the different kinds of Web Dynpro controllers and what they are used for

SAP AG 2005, Title of Presentation / Speaker Name / #

Model View Controller (MVC)


Original MVC design for decoupling presentation and application logic
Binds the user and business interaction layers together. All intermediate processing is performed here.
Generates the application data without caring how it will be displayed.

Model

Business Interaction Layer


User Interaction Layer

Request Response

Controller

Visualizes the application data without caring how it was generated.

Binding Layer

View
SAP AG 2005, Title of Presentation / Speaker Name / #

Web Dynpro Component Architecture


SAP Web Dynpro uses principles of MVC paradigm
Controller handle the user input and steers the application Views define the layout Model holds and provide the business logic
Window Window Controller
M Contains Usage declarations M

Component Interface Interface view Interface view


M

Interface Controller

Component Controller Usage declarations Components

Model 1

View Layout

View Controller
M

Custom Controller

Model 2

Business Logic

W e b

D y n p r o

C o m p o n e n t

(Models)

SAP AG 2005, Title of Presentation / Speaker Name / #

Common Features for all Controllers


Controller
Implementation Context
Root Node

Required Controllers Controller Interface

Other WD Controllers
Custom Controller

Standard Hook Methods


init

Instance Methods
Call_BAPI

Business Logic (Models)

Component Usage

Other WD Components

Created by explicit declaration or coding


SAP AG 2005, Title of Presentation / Speaker Name / #

Created by the Web Dynpro Framework (WDF)

Different types of controller


Three types of controller Custom / Component controller
Each Web Dynpro component has at least one global controller the component controller (default)
Custom controllers are a kind of additional global controllers to capsulate sub function from the component controller typically to structure bigger components They do not have a visual interface

View controller
Each view has exactly one view controller, which processes the actions performed by the user in the view

Window controller
Each window has exactly one window controller. It behaves like a view controller (plugs) and is usable from other controllers (like a custom / component controller)
SAP AG 2005, Title of Presentation / Speaker Name / #

Where are the Component / Custom Controller?


Externally Visible Internally Visible
Contains Usage declarations Window Component Controller Usage declarations Component Interface Interface Interface viewview
M

Interface Controller

Window Controller
M

Components

Plugs
M

Contains

Usage declarations

Model 1

Methods

View Layout

View Controller
M

Custom Controller

Model 2

Context W e b D y n p r o C o m p o n e n t

Business Logic

(Models)

SAP AG 2005, Title of Presentation / Speaker Name / #

Component / Custom Controllers Event Handlers


Com. / Custom Controller
Implementation Context
Root Node

Required Controllers Controller Interface

Other WD Controllers
Custom Controller

Standard Hook Methods Instance Methods Events

Business Logic (Models)

Component Usage

Other WD Components

Created by explicit declaration or coding


SAP AG 2005, Title of Presentation / Speaker Name / #

Created by the Web Dynpro Framework (WDF)

Where are the View Controllers?


Externally Visible Internally Visible
Contains Usage declarations Window Component Controller Usage declarations Component Interface Interface Interface viewview
M

Interface Controller

Window Controller
M

Components

Plugs
M

Contains

Usage declarations

Model 1

Methods

View Layout

View Controller
M

Custom Controller

Model 2

Context W e b D y n p r o C o m p o n e n t

Business Logic

(Models)

SAP AG 2005, Title of Presentation / Speaker Name / #

View Controllers Action Handlers


View
Layout

View Controller
Implementation Context
Root Node

Required Controllers Controller Interface

Other WD Controllers
Custom Controller

Standard Hook Methods Instance Methods Actions Navigation Plugs

Business Logic (Models)

Component Usage

Other WD Components

Created by explicit declaration or coding


SAP AG 2005, Title of Presentation / Speaker Name / #

Created by the Web Dynpro Framework (WDF)

View Controllers Navigation Plugs


View
Layout

View Controller
Implementation Context
Root Node

Required Controllers Controller Interface

Other WD Controllers
Custom Controller

Standard Hook Methods Instance Methods Actions Navigation Plugs

Business Logic (Models)

Component Usage

Other WD Components

Created by explicit declaration or coding


SAP AG 2005, Title of Presentation / Speaker Name / #

Created by the Web Dynpro Framework (WDF)

Where are the Window Controllers?


Externally Visible Internally Visible
Contains Usage declarations Window Component Controller Usage declarations Component Interface Interface Interface viewview
M

Interface Controller

Window Controller
M

Components

Plugs
M

Contains

Usage declarations

Model 1

Methods

View Layout

View Controller
M

Custom Controller

Model 2

Context W e b D y n p r o C o m p o n e n t

Business Logic

(Models)

SAP AG 2005, Title of Presentation / Speaker Name / #

Window Controller Architecture


Window Window Controller
Implementation
view view view Context
Root Node

Required Controllers Controller Interface

Other WD Controllers
Custom Controller

Standard Hook Methods Instance Methods

Business Logic (Models)

view Navigation Plugs Component Usage Other WD Components

view

Created by explicit declaration or coding


SAP AG 2005, Title of Presentation / Speaker Name / #

Created by the Web Dynpro Framework (WDF)

Web Dynpro Controllers: Unit Summary

You should now be able to: Understand the basic concept of the Model View Controller (MVC) paradigm Understand the different kinds of Web Dynpro controller and what they are used for

SAP AG 2005, Title of Presentation / Speaker Name / #

You might also like