Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 11

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.

Model

Generates the application


data without caring how it
will be displayed.

Business Interaction Layer


Request
Response

User Interaction Layer

Controller

Visualizes the application


data without caring how it
was generated.

Binding Layer

View
Page 1

Web Dynpro Component


Architecture
SAP Web Dynpro uses principles of MVC paradigm
Component Interface
Interface
Controller

Interface
Interface
viewview
M

Views define the


layout
Model holds and
provide the
business logic

Window

Window
Controller

Component
Controller

M
Contains

Usage
declarations

View
Layout

View
Controller
M

Custom
Controller

Usage declarations

Controller handle
the user input and
steers the
application

Components

Model 1

Model 2

Business Logic

W e b

Page 2

D y n p r o

C o m p o n e n t

(Models)

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)

Page 3

Common Features for all


Controllers
Controller
Implementation
Context

Standard
Hook
Methods
init

Root Node

Required
Controllers
Controller
Interface

Component
Usage

Page 4

Custom
Controller

Business
Logic
(Models)

Instance
Methods
Call_BAPI

Created by explicit declaration or coding

Other WD
Controllers

Other WD
Components

Created by the Web Dynpro Framework (WDF)

Where are the Component /


Custom Controller?
Externally
Visible

Component Interface
Interface
Controller

Interface
Interface
viewview

Internally
Visible

Contains

Window

Window
Controller

Component
Controller

Plugs

Contains

Usage
declarations

Methods

Context
Page 5

View
Layout
W e b

View
Controller
M

D y n p r o

Custom
Controller

C o m p o n e n t

Usage declarations

Usage
declarations

Components

Model 1

Model 2

Business Logic

(Models)

Component / Custom Controllers


Event Handlers
Com. / Custom Controller
Implementation
Standard
Context
Hook
Methods
Root Node

Required
Controllers

Created by explicit declaration or coding


Page 6

Custom
Controller

Controller
Interface
Business
Logic
(Models)

Instance
Methods
Events

Other WD
Controllers

Component
Usage

Other WD
Components

Created by the Web Dynpro Framework


(WDF)

Where are the View Controllers?


Externally
Visible

Component Interface
Interface
Controller

Interface
Interface
viewview

Internally
Visible

Contains

Window

Window
Controller

Component
Controller

Plugs

Contains

Methods

Context
Page 7

View
Layout
W e b

Usage
declarations

View
Controller
M

D y n p r o

Custom
Controller

C o m p o n e n t

Usage declarations

Usage
declarations

Components

Model 1

Model 2

Business Logic

(Models)

View Controllers Action Handlers


View

View Controller

Layout

Implementation
Context
Root Node

Standard
Hook
Methods

Required
Controllers
Controller
Interface

Other WD
Controllers
Custom
Controller

Business
Logic
(Models)

Instance
Methods
Actions
Navigation
Plugs

Created by explicit declaration or coding


Page 8

Component
Usage

Other WD
Components

Created by the Web Dynpro Framework (WDF)

View Controllers Navigation Plugs


View

View Controller

Layout

Required
Controllers

Implementation
Context
Root Node

Standard
Hook
Methods

Controller
Interface

Other WD
Controllers
Custom
Controller

Business
Logic
(Models)

Instance
Methods
Actions
Navigation
Plugs

Created by explicit declaration or coding

Page 9

Component
Usage

Other WD
Components

Created by the Web Dynpro Framework (WDF)

Where are the Window Controllers?


Externally
Visible

Component Interface
Interface
Controller

Interface
Interface
viewview

Internally
Visible

Contains

Window

Window
Controller

Plugs

Contains

Usage
declarations

Methods

Context
Page 10

View
Layout
W e b

View
Controller
M

D y n p r o

Custom
Controller

C o m p o n e n t

Usage declarations

Usage
declarations

Component
Controller

Components

Model 1

Model 2

Business Logic

(Models)

Window Controller Architecture

Window

Window Controller
Implementation

view

Context

Root Node

view
view

Standard
Hook
Methods

Required
Controllers
Controller
Interface

Component
Usage
view

Created by explicit declaration


or coding
Page 11

Navigation
Plugs

Custom
Controller

Business
Logic
(Models)

Instance
Methods
view

Other WD
Controllers

Other WD
Components

Created by the
Web Dynpro Framework (WDF)

You might also like