Top Banner

of 80

Web Dynpro for Beginners

Apr 14, 2018

Download

Documents

Diego Güizzo
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/30/2019 Web Dynpro for Beginners

    1/80

    Web Dynpro forBeginners

  • 7/30/2019 Web Dynpro for Beginners

    2/80

    Web Dynpro Basics

    NetWeaver Developer Studio

    first Exercise

    Netweaver Development Infrastructure

    Using Webservices with Web Dynpro

    Web Dynpro Applications inside the EnterprisePortal

  • 7/30/2019 Web Dynpro for Beginners

    3/80

    SAP AG 2005, Web Dynpro Product Management / 3

    Web Dynpro

    Web Dynpro is the standard

    programming model for building

    SAP NetWeaver user interfaces

    (UIs).

    SAP UI F k R d

  • 7/30/2019 Web Dynpro for Beginners

    4/80 SAP AG 2005, Web Dynpro Product Management / 4

    SAP UI Framework Roadmap:From ABAP to Web Dynpro

    ABAP UIs

    ITS Technology (SAP GUI, Flow Logic)

    Business Server Pages (BSP) UIs

    HTML Business for Java (HTMLB)

    Business Blueprint Pattern (BSP)

    Web Dynpro Foundation

    Web Dynpro Pattern

    NetWeaver 04ITS UIs (Web GUI, IACs)

    1991 ... ...

  • 7/30/2019 Web Dynpro for Beginners

    5/80 SAP AG 2005, Web Dynpro Product Management / 5

    Web Dynpro in SAP NetWeaver 04

    The Web Dynpro Runtime

    Environment is placed into the

    Web Dynpro Container part of

    the SAP J2EE Engine

    All Web Dynpro Projects(Deployable Objects, Web

    Dynpro Development

    Components) containing

    running Applications are

    deployed into this Web Dynpro

    Container

    SAP NetWeaver

    COMPOSITEAPPLICATIONFRAMEWORK/xApps

    PEOPLE INTEGRATION

    Multi-channel access

    Portal Collaboration

    INFORMATION INTEGRATION

    Business Intellig.

    Master Data Management

    Knowledge Mgmt

    PROCESS INTEGRATION

    Integration

    Broker

    Bus. Process

    Management

    APPLICATION PLATFORM

    J2EE / Web DynproWeb Dynpro

    DB and OS Abstraction

    ABAP

    LIFECYCLEMANAGEMENT

    ...

  • 7/30/2019 Web Dynpro for Beginners

    6/80 SAP AG 2005, Web Dynpro Product Management / 6

    Web Dynpro Main Goals

    Web DynproMeta-Data

    Web DynproTools

    Web Dynpro Runtime

    J2EE.NET ABAP

    Deliver an Enterprise Quality

    Web Development Environment

    minimize coding, maximize design

    support reuse of components

    separate layout and logic

    support arbitrary backends

    Achieve Independence...

    from platform

    from UI technology

    Improve User Experience through a

    "High Fidelity Web UI"

    browser based, zero footprint screen updates w/o page reloads

    client-side dynamics

    performance through caching

    personalization Multi Device Internet

  • 7/30/2019 Web Dynpro for Beginners

    7/80 SAP AG 2005, Web Dynpro Product Management / 7

    Development Layers: Advantages and Examples

    EP

    WD

    Application

    Web Dynpro

    Designtime

    Web Dynpro Runtime

    Web Dynpro Metadata

    Easy integration into

    SAP Enterprise Portal

    Sophisticated business

    Web applications

    Efficient tools within SAP

    NetWeaver Developer Studio

    Performant user-interface

    development services

    Platform-independentmetadata generation

    Adapt Portal theme for

    Web Dynpro application

    The user-interface

    technology for SAP EP

    Wizards and

    graphical tools

    Integration into

    SAP Web AS

    Declarativeprogramming

  • 7/30/2019 Web Dynpro for Beginners

    8/80 SAP AG 2005, Web Dynpro Product Management / 8

    Web Dynpro Programming Paradigm Some Building Blocks

    Model-View-Controller Architecture

    ModelModel : encapsulates the business logic and persistence

    ViewView: defines certain part of the User Interface

    ControllerController: handles events, updates the model, shows next view

    Generic UI-Services Valuehelp, Message Management

    based on datatype information

    Maximized Declaration Minimized Coding

    Declaration of UI-Design and Screen flow (navigation)

    Declaration of data structures and data flow (contexts,

    databinding and context-mapping)

    Reusable Components

    Construct Web Applications from Patterns

  • 7/30/2019 Web Dynpro for Beginners

    9/80 SAP AG 2005, Web Dynpro Product Management / 9

    Design pattern for decoupling presentation and logic of an

    application

    Request

    Response

    Handles events

    Updates application data

    Defines control flow

    Model View Controller (MVC)

    Controller

    Model

    View

    Defines application data

    Usually connected to

    business functionality

    Visualizes the application data

  • 7/30/2019 Web Dynpro for Beginners

    10/80 SAP AG 2005, Web Dynpro Product Management / 10

    Web Dynpro Zoom-in: 10 x

    BrowserSAP

    J2EE Server

    mySAP.com

    Backend

    Web

    DynproClient

    Web Dynpro

    Runtime

    Web Dynpro is onlyfor the user interface

  • 7/30/2019 Web Dynpro for Beginners

    11/80

    SAP AG 2005, Web Dynpro Product Management / 11

    Web Dynpro Zoom-in: 10 x 10 x

    Web Dynpro

    Client

    (JavaScript)

    Web Dynpro Runtime

    Single channel betweenclientand runtime

    Web DynproApplication

    Web Dynpro

    Application

    Web Dynpro

    Application

    Layout

    +

    Output Data

    Input Data

    +

    Action

    Buffers for

    delta mgmt

    http

    Client generates HTMLand displays itwithout

    page reloads

    10 10 10

  • 7/30/2019 Web Dynpro for Beginners

    12/80

    SAP AG 2005, Web Dynpro Product Management / 12

    Web Dynpro Zoom-in: 10 x 10 x 10 x

    Web Dynpro Application

    Web Dynpro

    Component

    Web DynproComponent

    Web Dynpro

    Component

    Model

    W b D Z i 10 10 10

  • 7/30/2019 Web Dynpro for Beginners

    13/80

    SAP AG 2005, Web Dynpro Product Management / 13

    Web Dynpro Zoom-in: 10 x 10 x 10 x

    Web Dynpro

    Component

    ComponentController

    Custom

    Controller

    Model

    InterfaceView

    View

    Controller

    View ViewController

    ViewView

    Controller

    Component

    Interface

    Controller

    Model

    Separation of model, view and controller

    W b D Z i 10 10 10 10

  • 7/30/2019 Web Dynpro for Beginners

    14/80

    SAP AG 2005, Web Dynpro Product Management / 14

    Web Dynpro Zoom-in: 10 x 10 x 10 x 10 x

    Component

    Controller

    ModelInterface

    View View

    Controller

    Coding CodingLayout

    Nested

    Views

    Navigation

    Links

    Context

    Model

    Data

    Global

    Data

    Local

    Data

    Context

    Model

    Data

    Global

    Data

    Model

    Data

    UI-

    Elements

    W b D Z i 10 10 10 10

  • 7/30/2019 Web Dynpro for Beginners

    15/80

    SAP AG 2005, Web Dynpro Product Management / 15

    Web Dynpro Zoom-in: 10 x 10 x 10 x 10 x

    Data Binding

    Component

    Controller

    ModelInterface

    View View

    Controller

    Coding CodingLayout

    Nested

    Views

    Navigation

    Links

    Context

    Model

    Data

    Global

    Data

    Local

    Data

    Context

    Model

    Data

    Global

    Data

    Model

    Data

    UI-

    Elements

    Data Binding: Filling UI-Elements with (context-)data

    Web Dynpro Zoom in: 10 x 10 x 10 x 10 x

  • 7/30/2019 Web Dynpro for Beginners

    16/80

    SAP AG 2005, Web Dynpro Product Management / 16

    Web Dynpro Zoom-in: 10 x 10 x 10 x 10 x

    Component

    Controller

    ModelInterface

    View View

    Controller

    Coding CodingLayout

    Nested

    Views

    Navigation

    Links

    Context

    Model

    Data

    Global

    Data

    Local

    Data

    Context

    Model

    Data

    Global

    Data

    Model

    Data

    UI-

    Elements

    Model

    Data

    Context Mapping

    Context Mapping: Referencing other context elements

    Web Dynpro Zoom in: 10 x 10 x 10 x 10 x

  • 7/30/2019 Web Dynpro for Beginners

    17/80

    SAP AG 2005, Web Dynpro Product Management / 17

    Web Dynpro Zoom-in: 10 x 10 x 10 x 10 x

    Component

    Controller

    ModelInterface

    View View

    Controller

    Coding CodingLayout

    Nested

    Views

    Navigation

    Links

    Context

    Model

    Data

    Global

    Data

    Local

    Data

    Context

    Model

    Data

    Global

    Data

    Model

    Data

    UI-

    Elements

    Model Binding

    Creating Context Structures based on Model Classes / Relations

    Web Dynpro Zoom in: 10 x 10 x 10 x 10 x 10 x

  • 7/30/2019 Web Dynpro for Beginners

    18/80

    SAP AG 2005, Web Dynpro Product Management / 18

    Web Dynpro Zoom-in: 10 x 10 x 10 x 10 x 10 x

    Controller Coding

    Layout ContextControls

    Actions

    The coding is in J ava everything else is

    platform-independent !

    Error handlers

    Event handlers

    Methods

    Inbound plugs

    Validators

    Declarative data flow: Binding & Mapping

  • 7/30/2019 Web Dynpro for Beginners

    19/80

    SAP AG 2005, Web Dynpro Product Management / 19

    Declarative data flow: Binding & Mapping

    MasterViewOpportunities

    Goals

    ...

    Products

    Category

    Product IDQuantity

    ...

    Valuation

    ...

    MasterViewContext

    DetailView

    ProductsCategory

    Product ID

    Quantity

    ...

    DetailViewContext

    databinding

    Sales

    ...

    Opportunities

    Goals

    ...

    Products

    Category

    Product ID

    Quantity

    ...Valuation

    ...

    ...

    CustomContext

    contextmapping

    Components = Reusable building blocks

  • 7/30/2019 Web Dynpro for Beginners

    20/80

    SAP AG 2005, Web Dynpro Product Management / 20

    Components = Reusable building blocks

    Web Dynpro Application

    Web Dynpro

    Component

    Components cancombine arbitrary

    structures ofviews andcontrollers

    Interface

    ViewView

    Controller

    Custom

    Controller

    Model

    InterfaceView

    View

    Controller

    ViewView

    Controller

    ViewView

    Controller

    Custom

    Controller Model

    Steps in building a Freestyle Web Dynpro application

  • 7/30/2019 Web Dynpro for Beginners

    21/80

    SAP AG 2005, Web Dynpro Product Management / 21

    Steps in building a Freestyle Web Dynpro application

    Identify the backend for the application.Create a model for this backend or

    include an existing model.

    Break up the UI into individual, mostly

    independent views.

    Consider which views belong to the

    same focus area. Divide the screen

    into view sets and view areas

    accordingly.

    Assign the views to view areas and

    draw the navigation paths between

    them.

    Identify all the tasks in the userinterface. If possible, assign them to

    the views controllers.

    Group the tasks that cannot beattr ibuted to any particular view.

    Add a custom controllerfor each

    group.

    Design the contexts for each controller

    and the mapping between the

    contexts, as well as between model

    and contexts.

    Define the layout for each view. Bind

    the layout elements against the viewcontexts.

    Code eventhandlers etc., first for the

    custom control lers and then for the

    view controllers.

    As an optional step, add special

    resource files (images, style sheets,

    etc.)

    Controller Anatomy of Web Dynpro Components

  • 7/30/2019 Web Dynpro for Beginners

    22/80

    SAP AG 2005, Web Dynpro Product Management / 22

    Controller Anatomy of Web Dynpro Components

    Web Dynpro Component

    Custom

    Controller

    Custom

    Controller

    Component

    Interface

    Controller

    View

    Controller

    View

    Controller

    View

    Controller

    Component Controller

    Component

    Interface

    View Controller

    DefaultDefault

    Controller

    OptionalOptional

    Controller

    Web Dynpro Controller Types

  • 7/30/2019 Web Dynpro for Beginners

    23/80

    SAP AG 2005, Web Dynpro Product Management / 23

    Web Dynpro Controller Types

    Web Dynpro knows different Controller Types

    Control

    lers

    Component Interface Controllers

    Interface for external users of a component: data transfer, eventing.

    Component Interface View Controllers

    Controller for the visual representation of a Component. Handle startup-plug, handle exit/outbound-plug of a component interface view.

    Component Controllers

    Default controller inside every Web Dynpro Component: own context,events, public methods

    Custom Controllers

    Additional controller for encapsulating separate logic. A ComponentController can be seen as the default Custom Controller.

    View Controllers

    Controller for every view with own context, public methods, plug-

    eventhandlers, action-eventhandlers managing user interaction.

  • 7/30/2019 Web Dynpro for Beginners

    24/80

    Web Dynpro Basics

    NetWeaver Developer Studio

    first Exercise

    Netweaver Development Infrastructure

    Using Webservices with Web Dynpro

    Web Dynpro Applications inside the EnterprisePortal

    SAP NetWeaver Developer Studio

  • 7/30/2019 Web Dynpro for Beginners

    25/80

    SAP AG 2005, Web Dynpro Product Management / 25

    p

    Eclipse offers everything required to develop J ava programs.

    However, integration with the application server and databasesupport is missing in XML and J SP editors for J 2EE projects.

    The SAP NetWeaver Developer Studio adds new functionalityto Eclipse through a number of Plug-Ins.

    SAP Integration Framework

    Eclipse Plug-In Framework

    UML

    Modeler

    or other3rd Party

    Tools

    Java

    Dictio-

    naryTools

    Infra-

    structure

    Tools

    Web

    Dynpro

    Tools

    J2EE

    Tools

    Web

    Services

    Tools

    J2SE

    Tools

    Persis-

    tence

    Tools

    SAP NetWeaver Developer Studio: Basics

  • 7/30/2019 Web Dynpro for Beginners

    26/80

    SAP AG 2005, Web Dynpro Product Management / 26

    p

    Based on open source Eclipse development framework

    Incremental build, ant-based build support, support for buildingarchives, state-of-the-art debugger (local and remote)

    Functionality enhanced by SAP with Plug-Ins

    Support for SAP-specific development (for example, Web Dynpro)Creation wizards, Deployment, Local test and debug environment

    File and folder-based component storage

    Fully integrated IDE-support for component development

    Flexible use of the PC + reliable server-based Infrastructure

    By seamlessly integrating the J ava Development Infrastructure theSAP NetWeaver Developer Studio combines the advantages of theABAP Workbench with the advantages of a local IDE

    SAP NetWeaver Developer Studio: Settings

  • 7/30/2019 Web Dynpro for Beginners

    27/80

    SAP AG 2005, Web Dynpro Product Management / 27

    p g

    Menu: Window Preferences ...

    SAP NetWeaver Developer Studio: Tool Set

  • 7/30/2019 Web Dynpro for Beginners

    28/80

    SAP AG 2005, Web Dynpro Product Management / 28

    Menu Window Open Perspective

    Order of all opened perspectives can be changed afterwards

    Choose your favorite perspectives viaWindow Preferences Workbench Perspective

    SAP NetWeaver Developer Studio: Views

  • 7/30/2019 Web Dynpro for Beginners

    29/80

    SAP AG 2005, Web Dynpro Product Management / 29

    We recommend thatyou always open the views Navigator,

    Outline, Properties, Tasks via Window

    Show View

    Other

    Basic for your daily work.

    For logging purposes, select thecorresponding view:

    Window Show View PDE Runtime Error Log

    Generally, task-dependent views are

    automaticallyopened with the startof the corresponding perspective.

    Close File, View, Perspective

  • 7/30/2019 Web Dynpro for Beginners

    30/80

    SAP AG 2005, Web Dynpro Product Management / 30

    Close single

    file

    Double-

    clicking thetoolbaradaptsthe size ofany view to

    screen size,and back !

    Close view

    Close perspective

    via context menu

    SAP NetWeaver Developer Studio: J2EE Perspective

  • 7/30/2019 Web Dynpro for Beginners

    31/80

    SAP AG 2005, Web Dynpro Product Management / 31

    SelectPerspective

    Create EJB

    and display

    its structure

    Select ViewSelect Editor

    Display and edit

    EJB method

    Create EJB

    method

    SAP NetWeaver Developer Studio: Editors

  • 7/30/2019 Web Dynpro for Beginners

    32/80

    SAP AG 2005, Web Dynpro Product Management / 32

    Source code editorPreview

    Depending on the type of file you are editing, the appropriate

    editor is displayed in the editor area. For example:

    J SP Editor

    XML Editor

    Project Management: Create Project

  • 7/30/2019 Web Dynpro for Beginners

    33/80

    SAP AG 2005, Web Dynpro Product Management / 33

    Choose File New

    Project

    ... etc.

    Result:

    Navigator displays allproject files (.java, .xml)

    Explorer displays projectentities, including option

    for creating and editingan entity, including toolstart

    Project Management: Import Project

  • 7/30/2019 Web Dynpro for Beginners

    34/80

    SAP AG 2005, Web Dynpro Product Management / 34

    Copy the project to the local

    file systeminto your workspace

    File Import Multiple Existing

    Projects into Workspace

    Enables you to reuse existingprojects within a newDeveloperStudio version

    Navigate one level above theproject folder; in general this isthe workspace folder

    Project Management: Remove Project

  • 7/30/2019 Web Dynpro for Beginners

    35/80

    SAP AG 2005, Web Dynpro Product Management / 35

    Web Dynpro Explorer

  • 7/30/2019 Web Dynpro for Beginners

    36/80

    SAP AG 2005, Web Dynpro Product Management / 36

    Data Modeler

  • 7/30/2019 Web Dynpro for Beginners

    37/80

    SAP AG 2005, Web Dynpro Product Management / 37

    Double click

    or

    Choose Open Data Modelerfrom the

    context menu

    Navigation Modeler

  • 7/30/2019 Web Dynpro for Beginners

    38/80

    SAP AG 2005, Web Dynpro Product Management / 38

    Double click

    or

    Choose Open Navigation Modeler

    from the context menu

    View Designer

  • 7/30/2019 Web Dynpro for Beginners

    39/80

    SAP AG 2005, Web Dynpro Product Management / 39

    Make the Properties View

    visible to show the

    properties of the selected

    Context elements.

    Choose Edit

    from the context

    menuDisplay the

    structure in theOutline view

    Controller/Context Editor

  • 7/30/2019 Web Dynpro for Beginners

    40/80

    SAP AG 2005, Web Dynpro Product Management / 40

    Choose Edit from the

    context of a WD component

    (e.g. a controller or view)

    Choose the Context tab.

    Make the Properties View

    visible to show the

    properties of the selectedContext elements.

    Message Editor

  • 7/30/2019 Web Dynpro for Beginners

    41/80

    SAP AG 2005, Web Dynpro Product Management / 41

    Choose Open Message Editorfrom

    the context ofMessage Pool.

  • 7/30/2019 Web Dynpro for Beginners

    42/80

    Web Dynpro Basics

    NetWeaver Developer Studiofirst Exercise

    Netweaver Development Infrastructure

    Using Webservices with Web DynproWeb Dynpro Applications inside the EnterprisePortal

    Guided Hands-On: Q u i c k S t a r t -Application

  • 7/30/2019 Web Dynpro for Beginners

    43/80

    SAP AG 2005, Web Dynpro Product Management / 43

    WhatWhatss coveredcovered::

    ViewView--LayoutLayout:: Designing a simple User Interface

    DataData BindingBinding: Binding UI element to context attribute

    ContextContext andand ContextContext MappingMapping:: Sharing data between views

    Navigation:Navigation: Navigating from one view to another

    SeeSee runningrunning exampleexample ......

    Scenario of the Q u i c k S t a r t -Example

  • 7/30/2019 Web Dynpro for Beginners

    44/80

    SAP AG 2005, Web Dynpro Product Management / 44

    22 ViewsViews:: SimpleSimple inputinput formform viewview togethertogetherwithwith aa confirmationconfirmation viewview

    Navigation:Navigation: UserUsercancan navigatenavigate betweenbetween bothboth iewsiews

    SharedShared DataData:: BothBoth viewsviews havehave toto shareshare thethe enteredentered namename ofof thethe useruser..

    ThisThis isis donedone viavia ContextContext MappingMapping..

    Project Structure of the Q u i c k S t a r t -Example

  • 7/30/2019 Web Dynpro for Beginners

    45/80

    SAP AG 2005, Web Dynpro Product Management / 45

    Model (Model (ModelModel Part)Part)

    notnot usedused herehere

    User Interface (User Interface (ViewView Part)Part)

    22 viewsviews:: StartViewStartView andand ResultViewResultView

    NavigationNavigation isis donedone viavia aactionsctions ,, pp lugslugsandand nnavigationavigation linkslinks

    Controllers (Controllers (ControllerControllerPart)Part)

    22 viewsviews havehave 22 vv iewiew controllerscontrollers

    EveryEvery viewview controllercontrollerhashas itsits contextcontextforforprovidingproviding datadata

    SharedShared datadata isis storedstored inin thetheccomponentomponent controllercontrollercontextcontext

    Controller Anatomy of the Q u i c k S t a r t -Example

  • 7/30/2019 Web Dynpro for Beginners

    46/80

    SAP AG 2005, Web Dynpro Product Management / 46

    Web Dynpro Component

    Component

    Interface

    Controller

    View

    Controller 1

    Component Controller

    ControllerController

    ContextContext

    View

    Controller 2

    declared

    ControllerControllerUsageUsage

    between control lers Aand B

    Controller

    A

    Controller

    B

    Component

    Interface

    View Controller

    Providing Data from Contexts to the UI

  • 7/30/2019 Web Dynpro for Beginners

    47/80

    SAP AG 2005, Web Dynpro Product Management / 47

    The contexts belong the

    corresponding controllers

    MapMap value attributes Namefrom view contexts to valueattribute Name in the

    component context

    BindBind text property of UIelement to the viewcontexts value attribute

    Name

    The entered name JohnJohn isstored in a componentcontexts value attribute.

    mapped attributesreferencereference this value.

    View

    Layout

    View 1Context View 2

    Context

    View

    Layout

    View 1

    InputField

    View 2

    TextView

    Data

    Binding

    Component

    Context

    Name

    Context

    Mapping

    original value

    =John

    referenced values

    NameName

    J ohn J ohn

    CCoo

    nn

    tt

    rr

    oo

    ll

    ll

    ee

    rr

    VV

    iiee

    ww

    ContextContext ValueValueAttributeAttribute

    Data Binding and Context Mapping

    D tD t Bi diBi di

  • 7/30/2019 Web Dynpro for Beginners

    48/80

    SAP AG 2005, Web Dynpro Product Management / 48

    MMainain contextcontext advantageadvantage: ability to declaratively bind UI element-attributes to context elements called DataData BindingBinding.

    Data Binding generically manages the population of UIelements with state information provided by the control ler

    context.

    Generally all UI element properties (except the ID property) canbe bound to the context.

    DataData BindingBinding

    Reuse of previously defined attributes and nodes from other

    contexts.

    Done by defining attribute and/or node mappings from one

    context to another.

    AdvantageAdvantage: reduction of complexity as well as reducing a

    context's scope to the minimal set of data required to fulfill atask

    ContextContext MappingMapping

    Context Mapping

    For sharing context data between two view control lers a CustomCustom or

  • 7/30/2019 Web Dynpro for Beginners

    49/80

    SAP AG 2005, Web Dynpro Product Management / 49

    For sharing context data between two view control lers a CustomCustom orComponentComponent ControllerControlleris needed, storing e.g. the original context value

    attribute.

    The view controllers context attributes are mappedmapped to the customcontrollers one.

    A corresponding ControllerControllerUsageUsage (of the custom controller) has to be set inboth view controllers via IDE.

    Based on referencereference semanticssemantics (only one original context structure isstored).

    Actions and Event Handler

  • 7/30/2019 Web Dynpro for Beginners

    50/80

    SAP AG 2005, Web Dynpro Product Management / 50

    View

    Layout Action

    public voidonActionSave(IWDCustomEvent wdEvent)

    {

    //@@begin onActionSave(ServerEvent)saveProductDetails(wdContext.currentProdDetailsElement());

    wdThis.wdFirePlugDataHasBeenSaved();

    //@@end

    }

    Event Handler

    public voidonActionSave(IWDCustomEvent wdEvent)

    {

    //@@begin onActionSave(ServerEvent)saveProductDetails(wdContext.currentProdDetailsElement());

    wdThis.wdFirePlugDataHasBeenSaved();

    //@@end

    }Custom coding!

    Navigation

    PrinciplePrinciple

  • 7/30/2019 Web Dynpro for Beginners

    51/80

    SAP AG 2005, Web Dynpro Product Management / 51

    PrinciplePrinciple

    Navigation between two views A and B can easily be done by thefollowing three steps:

    defining a NavigationalNavigational LinkLink from OutboundOutbound PlugPlug of view A to InboundInbound

    PlugPlug of view B

    defining anAction EventAction Event triggering the navigation

    f ireing the defined OutboundOutbound PlugPlug in the view controllers

    corresponding event handler

    wdThis.wdFirePlugToResultViewwdThis.wdFirePlugToResultView();();

    InboundInbound PlugPlug

    OutboundOutbound PlugPlug

    NavigationalNavigational LinkLink

    Guided Hands-On Part: The Q u i c k S t a r t Application

  • 7/30/2019 Web Dynpro for Beginners

    52/80

    SAP AG 2005, Web Dynpro Product Management / 52

    Developing the Q u i c k S t a r t Application

    Open Document Creating Your FirstCreating Your FirstWebDynproWebDynproApplicationApplication

    in temp/in temp/WebDynpro/sampleappsWebDynpro/sampleapps //

    WebDynpro_QuickStart_Tutorial_en.pdfWebDynpro_QuickStart_Tutorial_en.pdf

    You have 45 minutes45 minutes for developing the

    Welcome Web Dynpro application

  • 7/30/2019 Web Dynpro for Beginners

    53/80

    Web Dynpro Basics

    NetWeaver Developer Studiofirst Exercise

    Netweaver Development Infrastructure

    Using Webservices with Web DynproWeb Dynpro Applications inside the EnterprisePortal

    Overview: Java Development Environment

    To implement large business applications with J 2EE SAP must:

  • 7/30/2019 Web Dynpro for Beginners

    54/80

    SAP AG 2005, Web Dynpro Product Management / 54

    To implement large business applications with J 2EE, SAP must:

    Provide new features (SAP Web Dynpro, database-independent) Integrate open non-J 2EE standards

    Enhance the existing programming model

    Support a highly productive development environment

    Presentation Layer

    Business Layer

    Components in a J2EEApplication

    Integration

    Layer

    ServletServlet JSPJSP

    EJBEJB

    Persistence

    JDBCJDBC Open SQLOpen SQL

    Web DynproWeb Dynpro

    Web

    Services

    Web

    Services

    SQLJSQLJ

    Development environment

    Component Model

    Products

  • 7/30/2019 Web Dynpro for Beginners

    55/80

    SAP AG 2005, Web Dynpro Product Management / 55

    Products

    Collection of various software components

    Software Components (SCs)

    Software components and installation units

    Group development components without

    overlaps

    Development Components (DCs)

    Development objects for build process

    Group development objects without

    overlaps

    Development Objects

    Are saved as versioned files in the DTR

    DC version

    SC version

    File version

    *

    1

    *

    1

    Release1 0/1

    Product version

    *

    *

    Development Components

    Development Components (DCs)

  • 7/30/2019 Web Dynpro for Beginners

    56/80

    SAP AG 2005, Web Dynpro Product Management / 56

    DCA

    DC B

    DC Y

    ppY

    DC X

    ppX

    DC C

    ppA

    usagedependency

    usagedependency

    Development Components (DCs)

    Container for development objects

    Build unit

    Nested DCs

    DCs can be nested within each other

    (restricted access)

    Public parts

    Part of a DC that can be used by other

    DCs (DC interfacing)

    Usage dependencies

    Indicates that a DC part can be used by

    other DCs (during the build process or

    during the runtime)

    Design Time Repository

    Repository that is based on files and directories (Client/Server)

  • 7/30/2019 Web Dynpro for Beginners

    57/80

    SAP AG 2005, Web Dynpro Product Management / 57

    Repository that is based on files and directories (Client/Server)

    Access to the repository via DeltaV / WebDAV protocols

    Version management (sync/checkout/checkin/...)

    J2EE Server

    DTR Server

    LocalFile

    System

    DTR ClientBrowser/

    WebFolder Client

    WebDAV ClientDTR Client

    Eclipse

    Plug-In

    DTR Client

    Commandline

    Tool

    Developer's PC

    WebDAV

    DeltaV+DASL

    Component Build Service

    Central build process

  • 7/30/2019 Web Dynpro for Beginners

    58/80

    SAP AG 2005, Web Dynpro Product Management / 58

    Central build process

    Automatic generation of build scripts for different component types.

    "Build on demand" instead of usual "nightly builds".

    Synchronization of Archive/Assemblies.

    Synchronization of resources in development teams.

    Automatic deployment controlled via CMS.

    Change Management Service

    The Change Management Service (CMS) is responsible for

  • 7/30/2019 Web Dynpro for Beginners

    59/80

    SAP AG 2005, Web Dynpro Product Management / 59

    The Change Management Service (CMS) is responsible for

    transporting software components (changes etc.) within an SAP J avadevelopment landscape.

    Uses of the CMS include:

    Automatic deployment of builds

    Configuration of the SAP NetWeaver Developer Studio.

    Import of J ava Support Packages (supplied by SAP),

    Transport of your own J ava projects in the development landscape.

    SAP Java Development Process

  • 7/30/2019 Web Dynpro for Beginners

    60/80

    SAP AG 2005, Web Dynpro Product Management / 60

    CentralJ2EE

    server

    Local development

    environment

    Component

    Build Service

    ArchivePool

    Deployarchives

    Design Time

    Repository

    Component

    Build

    OK?

    Deploy

    File

    system

    Local J2EE engine

    Save /

    load

    Develop, build,

    and test locally

    Check-in

    changes

    Create

    Development

    Component

    Activate

    J ava

    sources

    J2EE Server

    Web Container

    EJB Container

    Naming

    ServiceService

    Naming

    ServiceService

    Naming

    ServiceService

    J2EE Server

    Web Container

    EJB Container

    Naming

    ServiceService

    Naming

    ServiceService

    Naming

    ServiceService

  • 7/30/2019 Web Dynpro for Beginners

    61/80

    Web Dynpro Basics

    NetWeaver Developer Studiofirst Exercise

    Netweaver Development Infrastructure

    Using Webservices with Web DynproWeb Dynpro Applications inside the EnterprisePortal

    WSDL Structure (simplified)

    Whatd fi iti

  • 7/30/2019 Web Dynpro for Beginners

    62/80

    SAP AG 2005, Web Dynpro Product Management / 62

    A portType describes the abstractinterface (Web service type) of theWeb service

    Each contained operation canhave an input, an output and anumber offault messages

    Different Messages are build frombuild-in or custom data types

    Data types are defined using XMLSchema

    How A binding specifies exactly one

    protocol for the operations of a

    portType

    Where A port defines the Web service

    endpoint by specifying a single

    network address

    UDDI Overview

    Universal Description Discovery and Integration (UDDI)

  • 7/30/2019 Web Dynpro for Beginners

    63/80

    SAP AG 2005, Web Dynpro Product Management / 63

    Describes how to advertise and discover a Web service

    Differentiates Web service provider, Web service and Web

    service type

    Holds metadata that can be used to search for services(names, IDs, categories, types, etc.)

    Specifies the interface for Web service registr ies

    UDDI Business Registry THE directory for Web services on the Internet

    Publicly available, free of charge

    Operated by SAP, IBM, Microsoft, and NTT Communications UDDI Version 3 Beta available now

    SAPs node at http://uddi.sap.com

    Universal Description, Discovery and Integration (UDDI)

    SOAP Structure and Features

    T t Bi di

    http://uddi.sap.com/http://uddi.sap.com/
  • 7/30/2019 Web Dynpro for Beginners

    64/80

    SAP AG 2005, Web Dynpro Product Management / 64

    HTTP, SMTP,

    Protocol specific data

    (e.g. quality of service)

    Application-specific data

    Type system

    SOAP

    Transport Binding

    Message Format

    Header

    Body

    Application Data

    Implementing a Web Service Client

    Service Provider Service Requestor

  • 7/30/2019 Web Dynpro for Beginners

    65/80

    SAP AG 2005, Web Dynpro Product Management / 65

    q

    ToolTool

    Read

    WSDL

    calls

    UDDI

    WSDL

    ClientApplication

    ClientProxy

    1

    2

    Generate

    Web Service

    Application

    3 Implement

    4SOAP

    Web Dynpro and Web Services

  • 7/30/2019 Web Dynpro for Beginners

    66/80

    SAP AG 2005, Web Dynpro Product Management / 66

  • 7/30/2019 Web Dynpro for Beginners

    67/80

    Web Dynpro Basics

    NetWeaver Developer Studiofirst Exercise

    Netweaver Development Infrastructure

    Using Webservices with Web DynproWeb Dynpro Applications inside the EnterprisePortal

    Personalization and Navigation

    Corporate

    Corporate

    My Role

    My Role

  • 7/30/2019 Web Dynpro for Beginners

    68/80

    SAP AG 2005, Web Dynpro Product Management / 68

    Top-Level NavigationTop-Level Navigation

    Detailed

    Navigation

    Detailed

    Navigation

    iViewsiViews

    My iViewsMy iViews

    Corporate

    Branding

    p

    Branding

    My PageMy Page

    From the standard to your corporate design

  • 7/30/2019 Web Dynpro for Beginners

    69/80

    SAP AG 2005, Web Dynpro Product Management / 69

    SAP Design

    Theme

    Editor

    How to integrate business applications

  • 7/30/2019 Web Dynpro for Beginners

    70/80

    SAP AG 2005, Web Dynpro Product Management / 70

    Usage of Client-side Eventing

    Works between iViews on the same portal page

  • 7/30/2019 Web Dynpro for Beginners

    71/80

    SAP AG 2005, Web Dynpro Product Management / 71

    Can transfer any string from, avoids copy and past of information

    Prerequisites:

    J2EE for EP and Web Dynpro must be reachable ful l qualified

    System for WD J2EE must be created in EP (incl. Alias)

    Usage:

    firing Events:

    WDPortalEventing.fire("namespace","event","parameter=value");

    subscribing to Events:WDPortalEventing.subscribe("namespace","event",wdThis.wdG

    etPortalEventAction()); unsubscribing from Events:WDPortalEventing.unsubscribe("namespace","event",wdThis.wdGetPortalEventAction());

    WorkProtect Mode

  • 7/30/2019 Web Dynpro for Beginners

    72/80

    SAP AG 2005, Web Dynpro Product Management / 72

    1

    2

    Web Dynpro applications can use the Work Protect mode to

    prevent, that unsaved data inside the Web Dynpro

    application is lost, if the user navigates to another portal

    page.

    Web Dynpro applications can use the Work Protect mode to

    prevent, that unsaved data inside the Web Dynpro

    application is lost, if the user navigates to another portal

    page.

    Object Based Navigation

  • 7/30/2019 Web Dynpro for Beginners

    73/80

    SAP AG 2005, Web Dynpro Product Management / 73

    In the past, where an extra column is needed ...

    Object Based Navigation

  • 7/30/2019 Web Dynpro for Beginners

    74/80

    SAP AG 2005, Web Dynpro Product Management / 74

    In the past, where an extra column is needed to navigate to details

    Object Based Navigation

  • 7/30/2019 Web Dynpro for Beginners

    75/80

    SAP AG 2005, Web Dynpro Product Management / 75

    In the past, where an extra column is needed to navigate to details

    Management Self Service (MSS) with OBN

  • 7/30/2019 Web Dynpro for Beginners

    76/80

    SAP AG 2005, Web Dynpro Product Management / 76

    With OBN, this can be achieved with a direct mouse click Actions show up

    Management Self Service (MSS) with OBN

  • 7/30/2019 Web Dynpro for Beginners

    77/80

    SAP AG 2005, Web Dynpro Product Management / 77

    Object Based Navigation

    NavigationalNavigational conceptconcept knownknown fromfrom WWW and WindowsWWW and Windows

  • 7/30/2019 Web Dynpro for Beginners

    78/80

    SAP AG 2005, Web Dynpro Product Management / 78

    clickclick andand choosechoose ooperationperation Operation is directly attached to

    the object (optically and logically)

    Operations are role sensitive

    Better User experience (more ergonomically)

    SAP delivers navigation scenarios out-of-the box. Customers caneasily modify or create navigation scenarios (open APIs)

    Timing:

    as of SP2 Dynamical link (Operation with highest prio. fires) as of NW 04 FP Context menu (List of Operations)

    Further Information

    Public Web:

  • 7/30/2019 Web Dynpro for Beginners

    79/80

    SAP AG 2005, Web Dynpro Product Management / 79

    www.sap.comSAP Developer Network: sdn.sap.com

    SAP Customer Services Network: www.sap.com/services/

    Related SAP Education Training Opportunitieshttp://www.sap.com/education/

    Copyright 2004 SAP AG. All Rights Reserved

    No part of this publication may be reproduced or transmitted in any form or for any purpose without the expresspermission of SAP AG. The information contained herein may be changed without prior notice.

    Some software products marketed by SAP AG and its distributors contain proprietary software components of other

  • 7/30/2019 Web Dynpro for Beginners

    80/80

    SAP AG 2005, Web Dynpro Product Management / 80

    software vendors.Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

    IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries,pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks orregistered trademarks of IBM Corporation in the United States and/or other countries.

    Oracle is a registered trademark of Oracle Corporation.

    UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

    Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registeredtrademarks of Citrix Systems, Inc.

    HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium,Massachusetts Institute of Technology.

    J ava is a registered trademark of Sun Microsystems, Inc.J avaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and

    implemented by Netscape.

    MaxDB is a trademark of MySQL AB, Sweden.

    SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver and other SAP products and services mentioned hereinas well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other

    countries all over the world. All other product and service names mentioned are the trademarks of their respectivecompanies. Data contained in this document serves informational purposes only. National product specifications may vary.

    These materials are subject to change without notice. These materials are provided by SAP AG and its affiliatedcompanies ("SAP Group") for informational purposes only, withoutrepresentation or warranty of any kind, and SAP Groupshall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Groupproducts andservices are those that are set forth in the express warranty statements accompanying such products and services, if any.

    Nothing herein should be construed as constituting an additional warranty.