Beruflich Dokumente
Kultur Dokumente
The main benefits of the multi-tiered distributed application model are: Components can be reused Availability of a unified security model Flexible transaction control September 2006 20
Web Container
As mentioned before, the Web container consists of Servlets and JSPs. Servlets are Java programming language classes. A Servlet can be thought of as an applet that runs on the server side, without a user interface. Java Servlets allow clients to execute programming code on the SAP J2EE Application Server. Servlets are request/ response oriented. HTTP Servlets receive a request in the form of an HTTPServletRequest object and return a response in the form of an HTTPServletResponse. JSP pages are text-based documents that execute as Servlets, but allow a more natural approach to creating static content. Java Server Pages cleanly separate Web content (HTML and XML) from programming code by allowing Web developers to move programming logic into components. This means that Web application developers can concentrate on developing components while content developers build the HTML presentation. Furthermore, Java Server Pages simplify dynamic page development with tags. Java Server Pages technology encapsulates much of the functionality required for dynamic content generation in easy-to-use, JSP-specific XML tags. These tags can be used to access components, download applets and perform other functions that would be difficult to develop with programming code. Additionally, you can create a set of custom tags, for instance, that access database functions or some other business logic. Our Internet Sales application uses these custom tags for certain purposes, for example, translation, completion of a URL, iteration, and so on.
September 2006
21
E-Commerce Framework
E-Commerce 5.0 is based on the SAP J2EE platform designed to support the requirements of modern, extendable, e-business oriented, enterprise application systems. SAP J2EE provides component-based, scalable application architecture. This chapter gives you a rough overview of the E-Commerce Framework to help you to understand the main framework concepts. This is a prerequisite for the following paragraphs, in which each layer is discussed in more detail. You need this information to understand the programming model of the ECO application, as well as possible customer-extensions to the standard application.
September 2006
22
Firewall
Firewall
Java Stack
ERP OLTP
APO
BW
Optional Backends
September 2006
23
The picture below shows the architecture of SAP E-Commerce for mySAP ERP 2005.
Firewall
Firewall
Java Stack
APO
BW
In case you use an older ERP or R/3 release, the architecture of SAP E-Commerce for mySAP ERP might be different, since the IPC Engine has to be installed in an SAP Web Application Server ABAP 7.0, which has to be installed seperately.
The ECO architecture pictures above containe some components that are only required for special processes or are optional. It might be possible that some components are not required in your system landscape.
September 2006
24
Development and Extension Guide SAP E-Commerce 5.0 With SAP J2EE the presentation of data in E-Commerce is carried out exclusively on the client layer via the Web Browser. The HTML data is dynamically generated via Servlets and Java Server Pages (JSPs). A SAP J2EE Servlet Engine processes the dynamic generation of the HTML data as a server-side process. The Web browser is merely responsible for presenting the generated data. The server-side interaction layer processes user requests and calls the server-side business logic and the respective business applications. The resulting data is then forwarded to the server-side presentation layer, which generates the pages to be displayed by the browser. Communication between the SAP J2EE platform and the SAP CRM (ERP) system takes place via the SAP Java Connector. As mentioned above, Java technology is limited to the front-end area, that is, to layout design and the interaction logic of the Web shop. Business logic (such as order processing with partner determination, text determination, and so on) remains in the SAP CRM (ERP) system. Internet Sales is a full SAP J2EE compliant application but has been released on SAP J2EE Engine only. Other runtime environments have not been tested and are therefore not supported.
Layered Architecture
The ISA application architecture consists of the following layers: Server-side interaction and presentation layer Business Object layer Provides business functionality backend Business Objects not aware of backend system details. Business Logic Service layer (BLS) Manages the backend depended part of the application. Additional generic services are used throughout all layers: Loggon/Tracing Extended Configuration Management Used for configuration of the various layers. For example, connection parameters, backend object implementation classes, and so on.
...
Logging / XCM
CRM / R3 Catalog
IPC
DB
...
September 2006
25
Interaction Layer
"Controller"
Controller ActionServlet (Servlet)
r u eq t es
"Model"
dispatch Actions BO
forward
te da up
config
BO
Browser
BO
re s po
ns
JSPs "View"
retrieve BO
The above diagram gives an overview of the internal processes within the interaction and presentation layer when an HTTP request is sent to the ISA application by a client (usually web browser). All client HTTP requests are routed through the central controller Servlet ActionSevlet. This Servlet acts as a central dispatcher, routing all incoming requests to appropriate Actions. The dispatching mechanism is configured externally. Actions represent a server-side processing unit and are accessed via a common interface. They act as a mediator between the HTTP world and the Business Objects. After calling the appropriate Business Object(s) the process control returns to the ActionServlet. Depending on the return value of the called Action and the external configuration, an appropriate JSP (or other Action) is called, in order to present the result of the calculation to the user. After mixing the static HTML content with the dynamic content the result is sent back to the client.
September 2006
26
Business Objects are managed by Business Object Managers (BOM). A BOM is used as a central access point for accessing Business Objects. When Actions are accessing a Business Object they have to obtain a reference to it from the BOM.
Session Context
Action
BO Layer
Business ObjectManager
<<creates>>
Order
Basket
<<creates>>
Item
September 2006
27
<<create>>
BasketCRM
BasketR3
Struts tags are not used and are not supposed to be used in customer projects.
JSPs
This chapter covers the server-side aspects of the ISA framework. Besides custom tags there are no ISA specific extensions which can be discussed here.
September 2006
28