Use HATS

Here is one possible sequence of steps for transforming your legacy applications to Web applications:

  1. Create your company's HTML template to match your corporate Web pages.

    Default rendering can render your uncustomized screens in a way that preserves the original layout of the host screen and it can also be adjusted so that many/most of your host screens can be transformed using one set of transformation rules. The existing company-wide links and (JavaScript) menus will work, in many cases with little or no modifications, as they do with the rest of the corporate Web pages. The legacy host data matches the style and colors of the company's Web pages and HATS automatically adds rich controls, such as links, HTML buttons, and HTML tables, to improve end user productivity.

  2. Create a few global rules to provide richer HTML controls, such as calendar controls, drop-down lists, and valid value selections to help end users quickly enter only valid information.
  3. Customize some of these legacy screens to simplify them, remove unused items, and automatically extract and populate data to simplify end user input. Provide screen-specific HTML controls for a higher degree of productivity for the end user.
  4. Combine multiple host screens into a single, richly formatted HTML page with macros. You can present multiple pages of output as a single page and also provide a single input Web page, which then populates multiple host pages with data. You can create new corporate applications with the powerful environment within WebSphere Studio; these new applications integrate seamlessly with your legacy HATS applications, passing data between them.
  5. Continue to use these macros and click to extend them into reusable business objects (Java beans, Enterprise JavaBeans (EJB), or Web Services). Then use HATS and WebSphere Studio wizards to create Web pages (running within their corporate template) that call these new business objects. The Web pages can use your traditional Model I, or the newer, open, Struts standard for Model 2-based Web pages. Business objects now provide a simple encapsulation for the necessary information for this transaction. WebSphere Studio wizards also create SQL queries, and business objects to execute these SQL queries.

If you are an existing Host Publisher customer, you can migrate and keep all of the Web pages you have created and quickly add the HATS default transformation to Web-enable the remaining host screens.

The foundation of HATS is the HATS Studio. The HATS Studio provides you with all of the necessary tools to extend an existing host application to the Web. The resulting host application can be accessed by end users with standard Web browsers.

 

Understanding HATS key concepts and objects

This section explains key concepts and objects of HATS, some of which are described in Understanding HATS application processing. Many key objects in HATS are created using a wizard, but are viewed or modified after creation using an editor.

Project

A collection of HATS resources that are created using wizards in HATS Studio and customized using HATS Studio editors. These resources are assembled into a HATS application. There can be two types of HATS projects, a HATS EJB project and a HATS project.

Event

A set of criteria regarding the state of an application that triggers one or more actions.

Screen customization events are triggered by recognition criteria that can be modified by the user.

An application event is triggered by instances in the application's life cycle. The user cannot control when these application events occur.

Action

A step that is taken when an event occurs, such as when a host screen is encountered that matches the screen recognition criteria specified for a screen customization. A list of actions is part of the definition of each screen customization and application events.

Screen customization

A HATS resource with two parts: a set of screen recognition criteria, and a list of actions to be taken.

Screen recognition criteria

When you create a project, you set screen recognition criteria that HATS uses to match host screens. Host screens can be recognized by any combination of criteria including how many input fields or total fields are on the screen, the coordinates of the cursor's position, and text strings on the screen within a defined rectangle or anywhere on the screen. You can also use global variables, color, region to value and region to region criteria for screen recognition criteria.

When a host displays a screen, HATS searches to see whether the current host screen matches any of the screen recognition criteria you set in any screen customizations in your project. If HATS finds a match, the defined actions for the screen customization are performed.

For more information on setting screen recognition criteria, see Edit a screen customization.

Transformation

A JSP file that defines how host components should be extracted and displayed using components and widgets in a Web presentation. Applying a transformation is one of the possible actions of a screen customization.

Host components

Host components are HATS objects responsible for recognizing elements of the host screen (such as command lines, function keys, and so on) that you choose to present to the end user of the HATS application. Use the set of host components that HATS supplies, or you can create your own host components.

Widgets

Widgets are HATS objects responsible for creating the HTML output for host components in the HATS presentation. For example, you can convert function key host components into button widgets so that the end user sees the function keys as buttons in the HATS application. Use the widgets that come with HATS, or you can create your own.

Connection

A set of parameters used by HATS to connect to host applications. There are two sets of connections in HATS, transformation (default) and background. Each HATS application has one default connection for the host application whose screens HATS will transform. Background connections are any connections other than the default connection. HATS does not transform screens from background connections.

Global Rules

Rules specifying the project-wide replacement of a certain type of host input field with a particular widget using transformation fragments. The transformation fragment contains the content with which you would like to replace all occurrences of a pattern in any given transformation.

Default Rendering

The method used by HATS to render parts of the host screen for which no specific transformation is specified.

Text Replacement

Text replacement is used to transform text on your legacy host system into images, HTML, or other text on your Web page.

Template

A JSP file that enables you to enhance the appearance of your project. When creating a HATS project, you select a template to use as the default template for your project. The template can contain company logos and information and links to other Web pages. You can select from the sample templates that are provided with HATS, or you can design custom templates for your projects using the wizards and editors in HATS Studio. You can choose which template to apply to the host screen when a transformation is applied or you can download templates based on an existing Web site.

Business logic

Any Java code invoked as an action in an event, such as a screen customization. Business logic is specific to the application.

Global variable

A variable used to store a value that can be used throughout the lifetime of a browser session. The value of a global variable can be extracted from a host screen or defined by the developer. Global variables can be used in templates, transformations, screen customization actions, or recognition criteria. They can also be shared among applications in an enterprise archive (EAR) file. Global variables can be arrayed or indexed and can also be used in macros, business logic and Integration Objects.

Macro

An XML script that defines a set of screens and certain actions that should be taken on those screens. Use macros to automate end user interactions with the host. You can record and play macros to skip screens, loop, prompt users for data input, and extract host screen information.

A macro can be played as an action of a HATS event. It must be the last action defined for a screen customization. For information on playing macros as an action of a screen customization, see Actions.

Integration Objects

Java objects created from a macro that can be used as building blocks for WebSphere applications. Integration objects are Java beans that encapsulate interactions with legacy data sources. These legacy data sources include terminal-oriented applications that use 3270, 5250, and VT data.

Host terminal

A connection in HATS Studio to a live host. Using the Host terminal, you can capture screens, create screen customizations and transformations, and record and edit macros. You can also play previously recorded or imported macros.

Display terminal

A host screen used by the HATS administrator or developer to observe interactions between a HATS application and a host application at runtime.

Screen capture

An XML representation of a host screen, used to create or customize a screen customization, transformation or global rule.

Run on Server

A function in HATS Studio that enables you to run your project on the WebSphere Studio internal WebSphere Application Server and see the output. This function is also known as the WebSphere Test Environment (WTE).

Print support

The ability for a developer to specify a printer session to be associated with a host session, and enable the end user to view host application print jobs, send them to a printer, or save them to disk. Print support is available only for the default connection.

Keyboard support

The ability for a developer to enable an end user to use a physical keyboard to interact with the host when the application is run in a Web browser. The developer also decides whether to include a host keypad, an application keypad, or both, in a project. If the keypads are included, the developer decides which keys are included and how those keys and the keypad appear in the Web browser.

Keypad support

The host keypad is a table of buttons or links that enable the end user to interact with the host as if they pressed the physical keys on a keyboard. However, the end user can still use the physical keys on the keyboard instead of the buttons or links on the host keypad.

The application keypad is a table of buttons or links that enable the end user to perform tasks related to the application, such as viewing their print jobs or refreshing the screen.

 

Understanding HATS application processing

Before creating a HATS project, understand how HATS processes host applications. As users access each screen of an application, HATS processes the application as described in the following steps. Figure 1 shows the flow of these steps. Key concepts are described in Understanding HATS key concepts and objects.

  1. When the host displays a screen, HATS compares the host screen to the set of screen recognition criteria defined in each of the project's enabled screen customizations, in the order defined by event priority, until a match is found.
  2. When a match is found, HATS performs the actions defined for the screen customization. These actions can include:

  3. If no screen recognition criteria match the host screen, HATS processes the unmatched screen event. The default action of this event is to display the host screen using the default transformation and applying the default template. The default transformation uses the rendering settings defined in the project settings.
  4. As the host presents each new screen of an application, HATS begins at Step 1 again and proceeds through all steps. Figure 1 shows how HATS processes screens.

    If a macro uses skip-screen processing, those screens are not subject to this process.

HATS screen processing flowchart

 

Home