Browser Independence

Team-Fly

One of the first things to do when starting to develop an intranet/Internet application is to determine to which brand of browsers the users of your application will have access. If you are working solely with an intranet application, you may have policies within your company that specify which browser the workers should use. However, if your application will be accessible for the Internet, then you can expect multiple browsers to be used.

If you are developing an ITS transaction or an HTML (Hypertext Markup Language) page with a Java applet that will be used solely in an intranet and your company only uses one browser, you are free to use browser-specific extensions that are not part of standard HTML. Examples of HTML extensions are shown in Table 17.1.

Table 17.1 HTML Extensions

Vendor

HTML Extension

Explanation

Netscape

<blink>

Makes text blink

Netscape

<q>

Quotation

Netscape

<embed>

Creates a console for a sound player

Microsoft

<Marquee>

Moves text across the screen

Microsoft

<iframe>

Independent frame

Microsoft

<bgsound>

Specifies an audio file

If you are developing HTML pages that need to support multiple browsers, the best course of action is to use the standards posted by the W3C (World Wide Web Consortium) HTML validation service. This service will check to ensure that all of the source code at the designated URL is compliant with the latest standards. The URL for this site is http://validator.w3.org, and it appears in Figure 17.1.

Caching and Synchronization of Data

Most Web browsers enable the user to navigate between Web pages by using the Back and Forward buttons or sometimes a History function. The expiration date of the Web page determines whether the page can be taken from the browser cache or must be regenerated by making a request to the Web server.

click to expand

Figure 17.1: HTML validation from the W3C

Note 

When a page is displayed in a browser, the browser can hold this page in memory for quick retrieval at the user's request. This process is referred to as caching. SAP also uses caching for database, program, and screen access.

An HTML template can request with either of the following operations:

  • Post. Pages generated by an HTTP POST operation are always cached. The Web browser uses POST operations whenever an HTML FORM statement specifies METHOD='POST'.

  • Get. Pages generated by GET operations are never cached. The ITS explicitly sets a no-cache option in the HTTP header when the page is sent to the Web browser, regardless of the caching options set in the Web browser. The Web browser uses GET operations for hypertext links and FRAMESET documents.

Because the synchronization of data between the Web page and SAP depends on the type of HTTP (Hyptertext Transfer Protocol) operation, you need to be careful when you use hyperlinks in ITS transactions. The user can click on the hyperlink and then press the Back function on the browser. In this scenario, the underlying SAP transaction is not informed about the Back operation. To get around this problem, you should check for the function code AWSS, which ITS sends when it wants to synchronize a Web transaction. In the ABAP program of the screen, you can then call the function module ITS_GET_SYNC_INFO, which returns an internal table containing the assignment of subscreen areas and subscreens for the ITS.

SAP has its own caching as well. Most SAP caching is done for database files and SQL calls to these files. Though SAP does take care of any potential problems, such as multiple people reading and writing to the same record, you can tune this caching to make tools like ITS run faster. The basic approach here is to control the number of rows ahead (from zero rows to all rows) that SAP buffers for a standard SQL call. For optimal performance you usually do not want to turn off the buffering (set the number of read ahead rows to zero), since the communication between the database server and the application server and then to your external application will be slow. By allowing buffering, the data is already up at either the application server or, in the case of Java, the Orbix server, which will make your applications run more quickly.


Team-Fly


Java & BAPI Technology for SAP
Java & BAPI Technology for SAP
ISBN: 761523057
EAN: N/A
Year: 1998
Pages: 199

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net