Upload
others
View
13
Download
0
Embed Size (px)
Citation preview
J2EE for ABAP Programmers
Jeff Gebo SAP Labs, LLC
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 2
SAP Developer Network – sdn.sap.com
The central hub for the SAP technology communityEveryone can connect, contribute and collaborate-consultants, administrators and developersFocus around SAP NetWeaver and SAP xApps
High quality of technical resourcesArticles, how-to guides, weblogs, collaborative areas, discussion forums and downloads, toolkits and code-samples
A collaboration platform, not a one-way streetSAP experts from customers, partners and SAP
SDN is powered by SAP NetWeaver™Built on the SAP Enterprise PortalFeaturing collaboration capabilities of SAP Knowledge Management
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 3
Learning Objectives
Focus: Get a J2EE Overview using the ABAP Paradigm
As a result of this Know How Call, you will be able to:Receive an understanding of J2EE and all the J2EE Buzz-WordsUnderstand how J2EE compares to ABAPLearn what SAP is bringing from the ABAP World to the J2EE WorldGet a learning roadmap to take your ABAP skills to the J2EE world
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 4
Agenda
Web AS OverviewJ2EE & ABAP CombinedSystem Architecture
Web ProgrammingJSPs ~ BSPsServlets ~ BSP Controllers
Business ProgrammingEnterprise JavaBeans ~ BAPIs/RFMs
SAP Enhancements for Business DevelopmentJava Dictionary ~ ABAP Data Dictionary Open SQL for Java ~ Open SQL for ABAPJava Development Infrastructure ~ ABAP Development Infrastructure
ABAP to J2EE Learning Roadmap!
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 5
Two Personalities in One Web Application Server
Web Application ServerBoth, a Fully Compliant J2EE and an ABAP personalitySingle, comprehensive and unified environment
BenefitsPreserve customer’s investments in the existing software and skillsOffer customers business-strength access to J2EE Reducing deployment costs
TrainingAdministration & MonitoringSystem and End User Support
Bring Enterprise and Web Developers on One Common PlatformOpens Larger Talent Pool
Web Application Server
ABAPABAPJ2EEJ2EE
BrowserBrowser
Internet Communication ManagerInternet Communication Manager
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 6
SAP Web AS - Server and Cluster Architecture
J2EE CentralServer
Central ServicesInstance
J2EE CentralInstance
ServerProcesses
J2EEDispatcher
SDM
EnqueueService
MessageService
J2EE Server
J2EE Instance
Use a central DB as configuration and application store-> stabilityUse the Enqueue Server as reliable lock handler-> stabilityUse the Message Server as message hub-> scalabilityUse SDM (Software Delivery Manager) to keep track of deployed software components-> supportability
ServerProcesses
J2EEDispatcher
J2EE Database
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 7
Java Language - J2EE and ABAP
DeveloperStudio
Web Dynpro
Java Dictionary
Open SQL for Java
Java is an object-oriented programming language – So is ABAP!
Source code is compiled into byte-codeByte-code is interpreted by a Java Virtual Machine (JVM)
Java is platform independent – So is ABAP!
J2EE (Java 2 Platform Enterprise Edition)Platform which simplifies and accelerates developing, deploying and managing n-tiered business applications using Java technologies
ABAPlanguage
Javalanguage
JavaVM
Com
pile
r
ABAPVM
Com
pile
r
ABAP Runtime
TransportOrganizer
Function Builder
Dictionary
…..
Workbench(SE80)
JDK
J2EE ABAPEnvironment
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 8
J2EE vs. ABAP – Programming ModelJa
va Database
Web ContainerJSP Pages/ Servlets
EnterpriseJavaBeans
J2EE Server
WebBrowser
ApplicationClient
DynproTechnology
ICM / ICFBSP Pages /
BSP Controllers
ModulePool
WebBrowser
SAPGUI
Database
Functions,Classes,& BAPIs
ABAP Stack
AB
AP
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 9
J2EE Server
EJB Container
Client
Web Container
Database
J2EEServices
JNDI JDBC
JMS .....
EJBsServlets / JSPs
Web containerManages the execution of JSP page and servlet components for J2EE applications
EJB containerManages the execution of enterprise beans for J2EE applications
J2EE ServicesFoundation for implementation of multi-tier enterprise applications
J2EE Architecture Overview
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 10
Agenda
Web AS OverviewJ2EE & ABAP CombinedSystem Architecture
Web ProgrammingJSPs ~ BSPsServlets ~ BSP Controllers
Business ProgrammingEnterprise JavaBeans ~ BAPIs/RFMs
SAP Enhancements for Business DevelopmentJava Dictionary ~ ABAP Data Dictionary Open SQL for Java ~ Open SQL for ABAPJava Development Infrastructure ~ ABAP Development Infrastructure
ABAP to J2EE Learning Roadmap!
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 11
JavaServer Pages (JSP)
<%@ page import="flightdemo.generated.*" %><%@ page import="flightdemo.*" %><html> <head> <title> FlightAnswerList </title> </head> <body> <jsp:useBean id="flightdemoBean" scope="session“class="flightdemo.FlightdemoBean" /><h1> Answers for Request </h1> <table border=1> <th>From</th> <th>To</th> <th>Date</th> <th>Time</th> <%-- Loop through the list and display the fields for which table headings are defined above --%><% FlightdemoBean bean = new FlightdemoBean();
bean.setAirportFrom("Frankfurt"); bean.setAirportTo("New York"); bean.searchFlights();
BapisfldatTypeList list = bean.getFoundFlights(); BapisfldatType[] entries = list.toArrayBapisfldatType(); for(int i=0; i<entries.length; i++) { %>
<tr> <td>
<%=" " + entries[i].getAirline()%></td> <td><%=" " + entries[i].getAirportfr()%></td> <td>…. <%=" " + entries[i].getConnectid()%></td> </tr> <% } %></table> </body> </html>
Response
Servlet JSP
BrowserWeb Container
JSP Page is text file thatIs written with markup language (HTML, XML, WML)Includes Java code to bring dynamic information to the pageWill always be converted to servlet at execution time
JSP Page hides HTTP complexity from programmer
HTTP Request
generate
lJSP ~ Layout of BSP page
Java ~ ABAP
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 12
HTTP Servlet
Servlet is a Java class thatHandles HTTP communication Runs on a Web server Generates dynamic Web pages
Servlets can directly access resources like Enterprise JavaBeanscomponents, JDBC data sources …
HTTP Request
Servlet
HTTP ResponseWeb Container EJB Container
Browser
Servlet ~ BSP Controller
Java ~ ABAP
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 13
Agenda
Web AS OverviewJ2EE & ABAP CombinedSystem Architecture
Web ProgrammingJSPs ~ BSPsServlets ~ BSP Controllers
Business ProgrammingEnterprise JavaBeans ~ BAPIs/RFMs
SAP Enhancements for Business DevelopmentJava Dictionary ~ ABAP Data Dictionary Open SQL for Java ~ Open SQL for ABAPJava Development Infrastructure ~ ABAP Development Infrastructure
ABAP to J2EE Learning Roadmap!
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 14
Enterprise JavaBeans Definition
An Enterprise Java Bean is a server-side component that encapsulates the business logic of an application
EJBs always execute within an EJB container, which provides system services to EJBs
These services include transaction management, persistence, pooling, clustering and other infrastructure
J2EE ServerEJB Container
EJBEJB
EJBEJB
EJBEJB
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 15
Types of Enterprise Beans
EnterpriseJava Bean
Message-driven BeanSession Bean Entity Bean
StatelessSession Bean
StatefulSession Bean
Container-managed
persistence
Bean-managed
Persistence
Related to the user sessionSession bean is not persistent
Handles the persistencein a object-oriented mannerRepresent a businessobject
Message basedReceive asynchronous JMSmessages
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 16
Agenda
Web AS OverviewJ2EE & ABAP CombinedSystem Architecture
Web ProgrammingJSPs ~ BSPsServlets ~ BSP Controllers
Business ProgrammingEnterprise JavaBeans ~ BAPIs/RFMs
SAP Enhancements for Business DevelopmentJava Dictionary ~ ABAP Data Dictionary Open SQL for Java ~ Open SQL for ABAPJava Development Infrastructure ~ ABAP Development Infrastructure
ABAP to J2EE Learning Roadmap!
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 17
J2EE doesn’t cover everything!
To adopt J2EE for large business applications, SAP… must extend the programming model… has to provide new features… must integrate existing non-J2EE open standards… has to provide a highly productive development infrastructure
Presentation Layer
Business Layer
Bus
ines
s A
pplic
atio
n
IntegrationLayer
Servlet JSP
EJB
Persistence
JDBC Open SQL
Web Dynpro
Web Services
SQLJ
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 18
SAP NetWeaver Developer Studio
Eclipse is an Open Source project
Eclipse consists ofa complete Java (J2SE) IDEan open Tool Integration Framework
SAP’s Java IDE can be extended by 3rd party Eclipse tools
Already many tools availableStrong industry drive
Your SAP Java IDE can be extended by 3rd party Eclipse tools and own Eclipse tools
Java J2EEWeb
Services
JavaDictionary
JavaPersistence
WebDynpro
SAP Integration Framework
Eclipse Plugin Framework
� Developer Studio – SE80
Java ~ ABAP
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 19
J2EE Perspective
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 20
Open SQL for Java
Java Program
Relational Persistence (SQL) Object Relational Persistence
Relational Database System
Open SQL Engine
Open SQL / JDBC
Open SQL / SQLJ
JDO *
EJB (CMP)
SQL Trace
Statement Cache
Table Catalog
Table Buffer
Vendor JDBC
Native SQL / JDBC DB Access Layer
Open SQL Processor
* Not supported in the SAP Web Application Server 6.30 Release
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 21
Development Environment ABAP/Java
CentralServer
Dev.Client
ABAPComplete central environmentfor build and testInstant build
MinimalComplete
Continuous integration test
Connect
JavaIndependent from central server
AvailabilityPerformanceOffline usage
Local files and foldersLocal test environment
CentralServer
Dev.Client
Dev.Client
Dev.Client
Check in / out
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 22
SAP Java Development Process
Developer Studio
Local Build ToolLocal J2EE Test
System
Local File System
CBSDTR Server
Change Management System
Central J2EEDev System
inact
act
1b
2
1c
3a
Build3c
3b
6a
DevelopmentConfiguration
1a
3d
6b 7a 7b
6d
5
Build6c
Loca
l Dev
. Env
ironm
ent
Cen
tral
Dev
. Env
ironm
ent
4
8
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 23
Deployment and Change Management for Java
SoftwareDelivery Manager
ProductionProductionSAP J2EE
Engine
J2EE Server
Change ManagementService
Distribution RoutesScheduling & Propagation
Distribution TrackingImport ControlVersion Control
SoftwareDelivery Manager
QualityQuality AssuranceAssuranceSAP J2EE
Engine
BuildService Software
Delivery Manager
DevelopmentDevelopmentSAP J2EE
Engine
Software
Archives
SAP NetWeaver
DeveloperStudio
Change
Requests
Support
Package
SAP Service
Marketplace
Patches
DTR
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 24
Agenda
Web AS OverviewJ2EE & ABAP CombinedSystem Architecture
Web ProgrammingJSPs ~ BSPsServlets ~ BSP Controllers
Business ProgrammingEnterprise JavaBeans ~ BAPIs/RFMs
SAP Enhancements for Business DevelopmentJava Dictionary ~ ABAP Data Dictionary Open SQL for Java ~ Open SQL for ABAPJava Development Infrastructure ~ ABAP Development Infrastructure
ABAP to J2EE Learning Roadmap!
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 25
ABAP to J2EE Learning Roadmap
Learn ABAP Objects and Object Oriented Programming!SAP Offers Course: BC401 ABAP Objects
Learn ABAP Web Programming – based on ABAP ObjectsSAP Offers Course: NET200 SAP Web Application Server: Developing BSP Applications Go to http://service.sap.com/education to sign up for the above classes
Take basic Java Courses
Take J2EE Classes – be on the look out for SAP’s own J2EE Class.
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 26
Java & J2EE Resources
Web Sites
SAP Developer Network – http://sdn.sap.com/
Sun's New to Java Site –http://java.sun.com/learning/new2java/index.html
Sun’s J2EE Learning Site –http://java.sun.com/j2ee/learning/index.html
Java eBook – http://www.mindview.net/Books/TIJ/
Java World – http://www.javaworld.com/
The Server Side – http://www.theserverside.com/
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 27
More Java & J2EE Resources
Books
Core Servlets and JavaServer Pages – a great book showing how to do basic J2EE web programming.
Java for the Web with Servlets, JSP, and EJB: A Developer's Guide to J2EE Solutions – Web development using JSPs, Servlets, and EJBs.
Professional EJBs – learn all about the details of EJBs.
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 28
Summary
J2EE defines standards for developing multi-tier enterprise applications
J2EE handles many details of application behavior automatically,without complex programming
Like transaction and security handling
Take your time and follow the learning map if you want to have a crack at it
J2EE does not fulfill all requirements for business applications
SAP provides a sophisticated infrastructure for development and deployment
Take your time and follow the learning map if you to take your ABAP skills to the J2EE world
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 29
Questions?
Q&A
© SAP AG 2003, TechED Basel 2003, JAVA102_EMEA, Benny Schaich/Jeff Gebo 30
Copyright 2003 SAP AG. All Rights Reserved
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 AG and Commerce One.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver 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 the trademarks of their respective companies.