Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
6$3 6.,//6
&21)(5
1)(5(1
(1&(
&(
6$3 81,9(5
9(566,7<
:25.6
:25.6++23
Learning Objectives
$V D U
UHHVX
VXOOW RI WKLV Z
ZRRUNVKRS \RX ZLOO
Understand the Serverside Scripting model BSP
Know how to use the BSP Extensions...
...and the Model View Controller concept
See the way to Web Dynpro development in ABAP
35,17 2 1 '(0
'(0$1
$1''
sponsored by 1
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
Agenda
BSP Extensions
Summary
%DVLFVRI%XVLQHVV
6HUYHU3DJHV
35,17 2 1 '(0
'(0$1
$1''
sponsored by 2
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
BSP Application
%63 $SSOLFDWLRQ BSP Page
Business Server Pages <html>
...
BSP
BSP Page
BSP
which define the Web UI and <% loop at
contain serverside scripting itab.... %>
35,17 2 1 '(0
'(0$1
$1''
sponsored by 3
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
Demo
'HPR
'DWDEDVH$FFHVVLQ
%63$SSOLFDWLRQV
35,17 2 1 '(0
'(0$1
$1''
sponsored by 4
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
<%@page language="abap"%>
Layout
<html>
<body>
<table border=1>
<tr> The layout part contains
<th>Carrier</th> script code mixed with
<th>Connection</th> static formatting directives
<th>Date</th> (e.g. HTML).
</tr> The data sources declared
<% data: wa like line of flights. as page attributes are
loop at flights into wa. %> directly accessible in the
<tr> initialization and layout
<td> <%= wa-carrid %> </td> step.
<td> <%= wa-connid %> </td>
<td> <%= wa-fldate %> </td>
</tr>
<% endloop. %>
</table>
</body>
</html>
Event Handler
2Q,QLWLDOL]DWLRQ
called before the
page is rendered
for data retrievel
2Q,QSXW3URFHVVLQJ
handling of the user
input
2Q&UHDWH
at first creation of
the page
35,17 2 1 '(0
'(0$1
$1''
sponsored by 5
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
Page Attributes
Application Class
BSP Application
Application Class
Attributes
Methods
An instance of the application class is
created at every request to the page
(stateless) and is available in all events
and in the layout
35,17 2 1 '(0
'(0$1
$1''
sponsored by 6
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
MIME Repository
&RQWDLQV DUELWUDU\
ILOHV WKDW DUH XVHG E\
%63 $SSV
Images
Backgrounds
Static HTMLs
Style sheets
...
,V SDUW RI WKH
LQIUDVWUXFWXUH
Translation
Transport
,V DFFHVVLEOH YLD
+773
+DQGOLQJ8VHU
,QWHUDFWLRQ
35,17 2 1 '(0
'(0$1
$1''
sponsored by 7
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
HTML Forms
texts
your Nickname:
<input type=text name="nickname">
list boxes
<input type=submit name="Submit">
</form>
Demo
'HPR
35,17 2 1 '(0
'(0$1
$1''
sponsored by 8
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
complex initialization
coding for events coming
from an arbitrary number
of other pages
In most cases the next PriceInfo.htm NotAvail.htm
35,17 2 1 '(0
'(0$1
$1''
sponsored by 9
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
Layout
...
<form method="post">
<input type=text name= "carrier" value="">
<input type=submit name="OnInputProcessing" value="Search">
</form>
...
Layout
...
<form method="post">
<input type=text name= "carrier" value="">
<input type=submit name="OnInputProcessing(select)" value="Search">
<input type=submit name="OnInputProcessing(exit)" value="Exit"> more then one submit
</form>
...
button can be
distinguished by an
arbitrary event name
Input Processing that is available as
case event_id. InputProcessing
EVENT_ID in the Input
when 'select'. Processing
data: carr TYPE string.
carr = request->get_form_field( 'carrier' ).
navigation->set_parameter( name = ‘sel_carr'
value = carr ).
navigation->goto_page('flights.htm' ).
when 'exit'.
navigation->exit( exit_url='http://www.sap.com' ).
endcase.
35,17 2 1 '(0
'(0$1
$1''
sponsored by 10
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
%63([WHQVLRQV
BSP Extensions
Uniform look&feel
Built-in functionality
Scrolling
Sort
...
Reusable rendering
Browser-independent
<table> <htmlb:tableView
id ="table"
...75 lines of HTML table ="<%=FLIGHTS%>"
...tons of javaScript rowCount ="15"
headerVisible="true"
...some scripting design ="ALTERNATING"
</table> />
BSP Extension
HTML
element
SAP AG 2002, SAPSkills Conference, Klingels / 22
35,17 2 1 '(0
'(0$1
$1''
sponsored by 11
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
7DJ /LEUDULHV
Well known from JSP
User defined tags linked
with
Program coding that
generates at runtime the
HTTP response
Predefined UI elements
(TableView, TreeView,
InputFields,...)
Demo
'HPR
35,17 2 1 '(0
'(0$1
$1''
sponsored by 12
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
7KH JRDO
Unified UI for the
whole application
Identify typical
patterns
List – Detail
Search
Form
Build special
composite
Extensions
35,17 2 1 '(0
'(0$1
$1''
sponsored by 13
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
BSP page
<ext:doSomething />
0RGHO9LHZ&RQWUROOHU
35,17 2 1 '(0
'(0$1
$1''
sponsored by 14
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
Model-View-Controller (MVC)
Handle
Handleevents
events
Update application
Update applicationdata
data
Request
Define control flow
Define control flow
Controller
Model
Defines
Definesapplication
applicationdata
data
Usually
Usually connectedto
connected to
business
businessfunctionality
functionality
Response
View
Visualization
Visualizationof
ofthe
the
application
applicationdata
data
BSP page
BSP page
Request
events
<form ...>
<input
application->
...>
</form>
Response
Application Class
Attributes
Methods
35,17 2 1 '(0
'(0$1
$1''
sponsored by 15
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
Model-View-Controller in BSPs
BSP Controller
Request
METHOD
DO_REQUEST
...
CALL_VIEW
Application Class
Attributes
Methods
BSP View
Response <form ...>
<input
...>
</form>
Demo
'HPR
35,17 2 1 '(0
'(0$1
$1''
sponsored by 16
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
...>
...
Parts of a page CALL_VIEW
</form>
aggregated during
runtime BSP View
BSP View
<form ...>
<input <form ...>
...> <input
</form> ...>
BSP Controller </form>
BSP Controller METHOD
Request DO_REQUEST
METHOD ... BSP View
DO_REQUEST CALL_VIEW
Response CALL_VIEW <form ...>
CALL_CONTR <input
...>
</form>
Demo
'HPR
35,17 2 1 '(0
'(0$1
$1''
sponsored by 17
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
35,17 2 1 '(0
'(0$1
$1''
sponsored by 18
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
Portal
Web Services
WD WD WD WD WD WD
Dynpro
Services Controls Services Controls Services Controls
Common Native
.NET .NET J2EE J2EE ABAP ABAP
Runtime Web AS
Services Services
Web Dynpro Web Dynpro
Unified UI Elements Unified Rendering
Designtime Runtime
WD Tools (SE80)
Project Application WD
Browser Modeler
Generator Runtime
View
Controller
Model for ABAP
/Context
Designer Editor
Editor
Design Gen.
time Runtime
Objects Objects
Database
SAP AG 2002, SAPSkills Conference, Klingels / 38
35,17 2 1 '(0
'(0$1
$1''
sponsored by 19
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
)XQFWLRQDOLW\
Hierarchical editing of Viewset hierarchy
Hierarchical/table editing of navigational links
Wizards for optimizing complex operations
Property box
No graphical support
35,17 2 1 '(0
'(0$1
$1''
sponsored by 20
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
Trigger events
Construction /
manipulation
of UI Tree
using Metadata API
Render (UR)
SAP AG 2002, SAPSkills Conference, Klingels / 41
Controller Editor
)XQFWLRQDOLW\
Tabstrip for entities (e.g. events, validators, eventhandlers,… )
Wizards for frequently used tasks
Integrated method editor (syntax check, …)
Automatic code generation
Synchronization of
declarative and coded parts
Separation of generated
and manually implemented
parts
35,17 2 1 '(0
'(0$1
$1''
sponsored by 21
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
Context Editor
)XQFWLRQDOLW\
Hierarchical editing of context
nodes/attributes
Data binding
Drag and drop support
Property box
Context view for View
Designer
Pattern-based UI Design
$VVHPEO\OLQH 'HYHORSPHQW RI
8,V
35,17 2 1 '(0
'(0$1
$1''
sponsored by 22
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
,VVXH
You want to develop a web application based on Web AS 6.20. This is why you
have chosen Business Server Pages as the means to create your application.
You want to stay consistent with SAP's strategic Web Dynpro approach, and
you expect that you can extend and modify your application in later releases via
Web Dynpro tools. You are aware that BSP is one of the runtimes of Web
Dynpro.
'R
V
Further Advice
35,17 2 1 '(0
'(0$1
$1''
sponsored by 23
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
Summary
4 $
35,17 2 1 '(0
'(0$1
$1''
sponsored by 24
6$3 7HFKQ
7HFKQLLFDO (G
(GXXFDWLR
FDWLRQQ &RQ HUHHQFH
&RQIIHU
September 30 – October 2, 2002
Bremen, Germany
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express
permission 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
software vendors.
Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® 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®, Informix
and Informix® Dynamic ServerTM are trademarks of IBM Corporation in USA 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®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and
other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.
HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium,
Massachusetts Institute of Technology.
JAVA® is a registered trademark of Sun Microsystems, Inc.
JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and
implemented by Netscape.
MarketSet and Enterprise Buyer are jointly owned trademarks of SAP Markets and Commerce One.
SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com and other SAP products and services mentioned herein as 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 trademarks of their respective companies.
35,17 2 1 '(0
'(0$1
$1''
sponsored by 25