Delivering green-screen applications to mobile devices using Rational Host Access Transformation Services

Overview

With HATS, access to host applications can be modernized and delivered to users without any impact to the existing, proven host applications. HATS does this by dynamically transforming and delivering 3270 applications running on IBM® System z™ platforms, as well as 5250 applications running on IBM® System i™ platforms to Web, portal, or rich client users. It also exposes key business processes and data as Web services.

Using HATS, you can create Web applications and rich client applications that provide an easy-to-use graphical user interface (GUI) to improve usability and leverage reuse of 3270 and 5250 host applications.

You can develop HATS Web applications, including portlets, with an interface that matches a company’s Web or portal GUI standards, and users can access them through their Web browsers. HATS Web applications can also be developed to provide access to host applications from mobile devices such as cellular phones, data collection terminals, and personal digital assistants (PDAs).

Mobile device support

Using Microsoft® Internet Explorer Mobile, users with mobile devices can access Web applications. However, mobile devices have different characteristics than more traditional workstation client devices. These different mobile device characteristics place different requirements on the Web application:

• A more traditional client device has a relatively large screen size (for example, 1024 x 768 pixels). However, the screen size of a typical mobile device is relatively small (for example, 320 x 240 pixels).
• Also, a traditional client device typically supports the use of a mouse or keyboard for user interaction, whereas a mobile device may only have the keys provided on a cellular phone.
• Finally, a traditional device generally has more processing power, memory, and a higher-speed connection to the Internet than does a mobile device.

With HATS, you can develop a Web application to provide access to 3270 and 5250 host applications from mobile devices. The process for developing a HATS Web application for a mobile device is the same as developing any HATS Web application, with some considerations due to the different characteristics of the mobile device and its Web browser.

HATS V7.1 (and later) includes several new functions to aid in developing a Web application to meet the requirements of mobile devices. These new functions, as well as other HATS functions, are discussed in this article.

The remainder of this article discusses two approaches that you can use with HATS to provide access to 3270 and 5250 host applications from mobile devices:

• With the first approach, you use HATS to develop a Web application that dynamically transforms host screens to modern graphical Web pages that meet the requirements of mobile devices.
• With the second approach, you use HATS Integration Objects to access the host applications and create customized Web pages to provide access from mobile devices.

HATS provide functions to develop web applications that meet requirements of mobile devices

Using screen transformations to support mobile devices

HATS V7.1 screen transformation functions provide you the ability to develop HATS Web applications to support mobile devices. The supported browser is Internet Explorer Mobile (V5.0 or later).

Creating a project

When you create a project for a HATS application that you intend for use by mobile devices, you should select the Optimize options for mobile devices option on the first page of the Create a Project wizard, as shown in Figure 1.

 
Figure 1 Creating a project for mobile devices

Selecting this option initializes the project with options that work best for mobile devices. Some options (for example, printing, keyboard, asynchronous update, and other options) are not supported for mobile devices, and are therefore disabled.
When you optimize a project for mobile devices, the option for selecting a project theme is not provided. In this case, you can think of the mobile device option as being a theme itself.

Default rendering

After you create a project optimized for mobile devices, you will notice some of the differences from a project for a typical Web application. For example, in the project settings a second rendering set (named compact) is created and set as the default, and the Use compact rendering option in selected.
In general, the default rendering set attempts to preserve the original host screen structure while extending functionality by automatically adding GUI controls (such as links, buttons, and tables) to improve user productivity. However, to allow default rendering of host screens to be displayed on mobile devices, the Use compact rendering option is supplied to allow a certain amount of compacting. With compacting, the amount of HTML and blank space is reduced, which may possibly display a different structure of the original host screen.

With compact rendering the amount of HTML and blank space is reduced

In the compact rendering set, notice that the Drop-down (selection) widget, instead of the Link widget, is used in default rendering for selection lists. This is done to preserve space on what is presumed to be a small screen mobile device. For example, the selection list on the host screen shown in Figure 2 is transformed by default to be a drop-down list, as shown in Figure 3.

 
Figure 2 Selection list on host screen

Notice the drop-down widget for the select list in the following figure.

 
Figure 3 Default rendering of selection list as a drop-down

Depending on the mobile device, when the drop-down widget is selected, the items in the selection list may be displayed on a separate page.

Also, in the compact rendering set, notice that recognition and transformation of dialogs is activated. In the host screen shown in Figure 4, the area contained within the simulated box is recognized as a dialog.


 
Figure 4 Host screen dialog

By default, only the dialog area of the screen is transformed for display on the device, as shown in Figure 5.

 
Figure 5 Default dialog transformation

Application keypad

Additional options have been added to both the Application Keypad and Host Keypad settings. By default, the application keypad is displayed as icons in mobile device projects.

Figure 6 shows the default application keypad displayed as icons in the top right corner.

 
Figure 6 Default application keypad displayed as icons

Host keypad

By default, the host keypad is displayed as a drop-down list. You can select which keys to display in the Host Keypad. At a minimum, you should include the Enter key for the default transformation and all custom transformations, because keyboard support is disabled in mobile projects. Figure 7 shows the default host keypad displayed as a drop-down list with a Submit button.

 
Figure 7 Default host keypad displayed as a drop-down list with a Submit button

Depending on the mobile device, when you select the host keypad drop-down list widget, the host keys you defined for the default transformation may be displayed on a separate page.

Screen customizations and transformations

Use HATS screen customization and transformation functions for a truly usable and optimized application for mobile devices. You can create an easy-to-use Web browser interface that makes only necessary functions available, and hides the rest. Using HATS, you can transform host screens (like the one in Figure 8) into Web pages that are much easier to read and navigate (such as the one shown in Figure 9).


 
Figure 8 Complex host screen

With HATS, you can hide the complex interface from the end user, prompt for only required fields, and supply drop-down lists of valid values. You can display results using different HTML widgets, which makes results much easier to read and understand. You can limit what information displays, and collect results from multiple screens and display them on a single, scrollable Web page.


 
Figure 9 Web transformation of host screen

HATS’ ability to combine screens, skip unnecessary screens, enter information, and run macros on behalf of the end user, streamlines transactions by reducing the number of keystrokes and workflow steps needed to complete the transaction. These streamlined transactions with graphical user interfaces make it possible to extend the use of host application functions to users with mobile devices.

Using Integration Objects to support mobile devices

You can use HATS' powerful macro and Integration Object capabilities to build pre-defined transactions for the user. Using Model 1, Struts, Java™Server Faces (JSF) Web pages, or Web services as the interface, these pre-defined transactions can prompt the user for input (such as an account number or a part number). Then, on behalf of the user, HATS drives the host application to complete the transaction.

With HATS you can build pre-defined transactions for the user

This capability enables the information to be externalized for access by mobile devices, but controls what the user is allowed to see and do. It also allows you to develop HATS applications for mobile devices that support Web browsers other than those supported by HATS screen transformation capabilities.
If a transaction is performed by multiple host applications, HATS can combine interaction with all of them through a single Web interface. For example, you may have one host application that processes new order information, and another that processes customer account or history information. With HATS you can provide communication with both applications through a single Web interface. Users never know that they are using two different applications.
To implement a HATS Web-driven host transaction, you create a HATS macro to provide programmed navigation through the host screens that make up your host transaction. Next, from the macro, you generate a HATS Integration Object (IO), which is a bean that encapsulates and provides a programming interface to execute the macro. Then you generate Web pages through which users can invoke the IO from their mobile devices.

Creating HATS macros

HATS macros are easily created in the HATS Toolkit. You record a macro using the Host Terminal wizard as you navigate through host screens using a live host connection, as shown in Figure 10. Using the macro, you can prompt the user for input to a host screen input field, navigate through other screens, and extract data from screens to return to the user’s mobile browser.

 
Figure 10 Recording a HATS macro using the Host Terminal

After recording, you can edit your macros using the same Host Terminal wizard, or by using either the Macro Editor or the Advanced Macro Editor supplied with the HATS Toolkit.

Creating Integration Objects

When you create an Integration Object (IO) for a macro, it creates a Java™ programming interface to execute the macro. The interface accepts the input expected by the macro, drives the macro, and supplies as output the output supplied by the macro.
Once you have created a macro, it is easy to create an IO by simply right-clicking the macro in the HATS Projects view and selecting Create Integration Object. In the HATS preferences, you can indicate that IOs be created automatically whenever you save a macro.

The next step in developing your IO application for mobile devices is to create Web pages that allow the mobile device user to submit input and receive output from the host application by driving the IO, and ultimately the macro. To do this, simply right-click the Integration Object and select Create Model 1 Web Pages, Create Struts Web, Pages, or Create JSF Web Pages, as shown in Figure 11.

 
Figure 11 Creating a Web page to drive an Integration Object

In the Create Web Pages wizard, you can specify which input properties to display on the Web page, as well as the input controls to use, as shown in Figure 12. You can also specify which output properties to display, including output controls.

 

Figure 12 Defining input properties displayed on the Web page

Because 3270 and 5250 host applications are connection oriented, you may want to use connection pooling in conjunction with Connect and Disconnect macros to optimize performance and response time when running your IO.
When you specify connection pooling in your application, and specify that HATS use Connect and Disconnect macros, HATS maintains a pool of host connections that are already signed on and ready to run your IO upon request. Using this technique eliminates constant signing on and off of the host system when running your IO.
Once you deploy your application, users can simply use their mobile device browsers to access the URL for your Web page, and enter whatever input you have allowed for, as shown in Figure 13.


 
Figure 13 Web page that drives the HATS Integration Object

When the user submits input on the Web page, this allocates a connection from the connection pool and drives the IO, which in turn drives the macro and the host application, as shown in Figure 14.

 
Figure 14 Host macro driven using input submitted by the user

Using the input submitted by the user, the macro navigates the host application and extracts the requested output.


 
Figure 15 Data extracted to return to the user

The IO then passes the extracted output back to the user’s mobile Web browser, and the connection is returned to the connection pool waiting for another input request, as shown in Figure 16.

 
Figure 16 Host data returned to the mobile device Web browser

Migrating and testing mobile projects

As you begin to modernize access to your 3270 and 5250 host applications, it is likely that you will have different HATS applications for traditional Web browser users versus mobile browser users. However, if you develop a HATS Web application for traditional users, and you want to use the same, or a similar, application for mobile users, you must manually develop a separate HATS project for mobile use.
Migrating
One approach for creating a HATS Web application for mobile use, which application is similar to an existing traditional HATS Web application, is to perform the following steps:
1. Create a new HATS project and select the option Optimize options for mobile devices.
2. Copy all of the screen captures, screen customizations, and macros from the existing project to the new mobile project.
3. Create new screen transformations in the mobile project to support the requirements of your mobile devices.
4. Modify the screen customizations to apply the appropriate new screen transformations.
5. If you use Integration Objects (IOs), regenerate the IOs from the macros that you copied, and recreate the Web pages that drive the IOs to support the requirements of your mobile devices.

Testing

You can test your HATS mobile device applications the same way that you test traditional HATS Web applications, using the internal test servers provided with the Rational Software Delivery Platform. You can use the internal Web browser provided with the Rational Software Delivery Platform, or external Web browsers. It is recommended that you also use mobile device emulators (for example, Microsoft Device Emulator V2 or later) to create a more realistic mobile device testing environment. You should also test with real mobile devices.

The complete article about developing mobile application using Rational HATS can be read at the developerworks at the IBM site: http://www.ibm.com/developerworks/rational/library/08/0916_hardison/
Geef feedback:

CAPTCHA image
Vul de bovenstaande code hieronder in
Verzend Commentaar