02 Controllers

Embed Size (px)

DESCRIPTION

Webdynpro Controllers

Citation preview

  • 7/21/2019 02 Controllers

    1/11

    Page 1

    Original MVC design for decoupling presentation and application logic

    Request

    Response

    Model View Controller (MVC)

    Controller

    Model

    View

    User Interaction Layer

    Business Interaction Layer

    Binding Layer

    Visualizes the application

    data without caring how itwas generated.

    Generates the application

    data without caring how it

    will be displayed.

    Binds the user and business

    interaction layers together. All

    intermediate processing is

    performed here.

  • 7/21/2019 02 Controllers

    2/11

    Page 2

    We !ynpro Co"ponent#rc$itecture

    Business Logic

    (Models)

    Component

    Controller

    odel 1

    odel 2

    Contains Usage

    declarations

    !sag

    e

    declarations

    W e ! y n p r o C o " p o n e n t

    Co"ponents

    Custom

    Controller

    Component "nterface

    "nterface

    Controller"nterface #iew

    $indow

    $indow

    Controller

    View

    %ayout

    View

    Controller

    M

    M

    M

    M

    M

    "nterface #iew

    %#& We !ynpro uses principles of MVC paradig"

    Controller $andle

    t$e user input and

    steers t$e

    application

    Views define t$e

    layout

    Model $olds and

    pro'ide t$e

    usiness logic

  • 7/21/2019 02 Controllers

    3/11

    Page &

    !ifferent types of controller

    'hree types of controller

    Custom / Component controller

    (ach $eb )ynpro component has at least one global controller *

    the component controller +default, Custom controllers are a -ind of additional global controllers to

    capsulate sub function from the component controller * typically to

    structure bigger components 'hey do not ha#e a #isual interface

    View controller

    (ach #iew has eactly one #iew controller/ which processes the

    actions performed by the user in the #iew

    Window controller (ach window has eactly one window controller. "t beha#es li-e a

    #iew controller +plugs, and is usable from other controllers +li-e a

    custom 0 component controller,

  • 7/21/2019 02 Controllers

    4/11

    Page

    Co""on eatures for allControllers

    Controller

    I"ple"entation

    %tandard

    oo*

    Met$ods

    init

    Instance

    Met$ods

    Call_BAPI

    Conte+t

    oot 3ode

    RequiredControllers

    Controller

    Interface

    Ot$er W!

    Controllers

    Custo"

    Controller

    Business

    Logic

    (Models)

    Created by eplicit declaration or coding Created by the $eb )ynpro 4ramewor- +$)4,

    Co"ponent

    Usage Ot$er W!

    Co"ponents

  • 7/21/2019 02 Controllers

    5/11

    Page 5

    W$ere are t$e Co"ponent ,Custo" Controller-

    Business Logic

    (Models)

    Component

    Controller

    odel 1

    odel 2

    Contains

    .+ternally

    Visile

    Internally

    Visile

    Usage

    declarations

    !sage

    declarations

    W e ! y n p r o C o " p o n e n t

    Co"ponents

    Custom

    Controller

    Contains

    !sage

    declarations

    Component "nterface

    "nterfaceController

    "nterface #iew

    $indow

    $indow

    Controller

    View

    %ayout

    View

    Controller

    M

    M

    M

    M

    M

    M

    Plugs

    ethods

    Contet

    "nterface #iew

  • 7/21/2019 02 Controllers

    6/11

    Page 6

    Component 0 Custom Controllers *(#ent 7andlers

    Co"/ , Custo" Controller

    I"ple"entation

    %tandard

    oo*

    Met$ods

    InstanceMet$ods

    .'ents

    Conte+t

    oot 3ode

    Required

    Controllers

    Controller

    Interface

    Ot$er W!

    Controllers

    Custo"

    Controller

    BusinessLogic

    (Models)

    Created by eplicit declaration or coding Created by the $eb )ynpro 4ramewor-+$)4,

    Co"ponent

    Usage Ot$er W!

    Co"ponents

  • 7/21/2019 02 Controllers

    7/11Page 8

    $here are the View Controllers9

    Business Logic

    (Models)

    Component

    Controller

    odel 1

    odel 2

    Contains

    .+ternally

    Visile

    Internally

    Visile

    Usage

    declarations

    !sag

    e

    declarations

    W e ! y n p r o C o " p o n e n t

    Co"ponents

    Custom

    Controller

    Contains

    !sage

    declarations

    Component "nterface

    "nterfaceController"nterface #iew

    $indow

    $indow

    Controller

    View

    %ayout

    View

    Controller

    M

    M

    M

    M

    M

    M

    Plugs

    ethods

    Contet

    "nterface #iew

  • 7/21/2019 02 Controllers

    8/11Page :

    View ControllerView

    View Controllers * Action 7andlers

    I"ple"entation

    0a'igation

    &lugs

    %tandard

    oo*

    Met$ods

    InstanceMet$ods

    #ctions

    Conte+t

    oot 3ode

    Required

    Controllers

    Controller

    Interface

    Ot$er W!Controllers

    Custo"

    Controller

    Business

    Logic(Models)

    Created by eplicit declaration or codingCreated by the $eb )ynpro 4ramewor- +$)4,

    Co"ponent

    Usage Ot$er W!

    Co"ponents

    Layout

  • 7/21/2019 02 Controllers

    9/11Page ;

    View Controllers * 3a#igation Plugs

    View Controller

    I"ple"entation

    0a'igation

    &lugs

    View

    %tandard

    oo*

    Met$ods

    InstanceMet$ods

    #ctions

    Conte+t

    oot 3ode

    RequiredControllers

    Controller

    Interface

    Ot$er W!Controllers

    Custo"

    Controller

    Business

    Logic

    (Models)

    Created by eplicit declaration or coding Created by the $eb )ynpro 4ramewor- +$)4,

    Co"ponent

    Usage Ot$er W!

    Co"ponents

    Layout

  • 7/21/2019 02 Controllers

    10/11Page 1