Create a basic HATS project

 

+
Search Tips   |   Advanced Search

 

 

Contents

  1. Overview
  2. Start HATS Studio
  3. HATS Welcome page
  4. Start HATS functions
  5. HATS tips
  6. Develop your HATS project
  7. Create a HATS project
  8. Preview your project

 

Overview

This section shows how to create a simple, working HATS application that uses default values.

All of the steps in developing a HATS application are performed using the WebSphere Studio workbench. The workbench is the user interface and integrated development environment from which you launch wizards to create resources, view lists of resources, and use editors to modify resources. It also contains help information about both HATS and WebSphere Studio.

When you start WebSphere Studio, you see a single window in which one or more perspectives are displayed. A perspective is a collection of views and editors that allow you to create, edit, view, and run resources which belong to a specific type of project--in this case a HATS project. More than one perspective can be open at a time, although you can only view and work with one at a time.

At the far left of the WebSphere Studio window is a shortcut bar that allows you to open new perspectives and move between perspectives that are already open. The name of the active perspective appears in the title of the window, and the toolbar contains icons associated with the active perspective.

 

Start HATS Studio

To start the HATS Studio...

Start | Programs | IBM WebSphere HATS | HATS Studio.

This starts WebSphere Studio with the HATS perspective open. The HATS perspective includes two main areas:

The first time you start the HATS Studio, you will see a HATS tip, welcoming you to HATS and giving pointers about getting started. Use the check boxes on the tip windows to control how many tips you see.

If you start WebSphere Studio and the HATS perspective does not appear, you can open the HATS perspective by clicking...

Window | Open Perspective | Other | HATS

If you close or rearrange some of the windows in the HATS perspective, your arrangement is saved. When you return to HATS Studio later, it will be restarted the way you left it. To restore the original HATS windows, close the HATS perspective and reopen it, or click Window > Reset Perspective.

 

HATS Welcome page

The HATS Welcome page tutorial guides you through the process of developing a Web application using HATS. As you develop the application and customize it, it is known as a project. When you assemble the project into a J2EE-compliant .ear file, it becomes a WebSphere application. The application is transferred to the WebSphere Application Server and installed on a user specified server.

Each section on the Welcome page can be expanded by clicking the plus-sign icon. Each section contains links that start HATS functions, as well as links to relevant information in Getting Started and represents a stage in the process:

  1. Create your first project links to the Create a Project wizard and introduces the Run on Server function, which enables you to preview the project.

  2. Modify the template helps you update the template you chose as your project default.

  3. Edit the default rendering and global rules describes the conversion rules used by the default transformation, and provides information on the related function, global rules.

  4. Customize a screen introduces the host terminal screen and the Create a Screen Customization wizard. You can create a simple transformation to see how it changes your host screen.

  5. Work with macros and Integration Objects explains how macros can be used in your projects, and introduces Integration Objects. Integration Objects are also macros, but they are in a Java wrapper. You can create Integration Objects from macros in your projects.

  6. Explore advanced functions of HATS deepens your knowledge about basic HATS concepts and introduces the project editor.

  7. Prepare your project for production shows you how to assemble the project into a WebSphere application and transfer it to WebSphere Application Server.

  8. View the library of online information for HATS provides links to the HATS documentation as well as the HATS Web site.

As you use other HATS functions, the Welcome page is covered by editors or other tools. Each page in the editor window is given a tab at the top to enable you to move from one page to another. You can return to the Welcome page by clicking the Welcome to HATS tab, or by clicking the Welcome page icon in the main toolbar. You can double-click any tab to toggle that tab's page between its initial size and a full-screen view.

 

Start HATS functions

HATS Studio provides several ways to start each HATS function. You can:

In many cases, you can start a HATS function in a way that creates linkage between HATS resources. For example, you can create a screen customization based on a screen capture by right-clicking on the screen capture and selecting...

New HATS | Screen Customization

The screen customization's properties will default to those of the screen capture.

 

HATS tips

To turn HATS tips on/off...

Window | Preferences | HATS | Show HATS tips

 

Develop your HATS project

To develop a HATS project using default values...

  1. Create a HATS project, with default values, using a wizard in the HATS Studio.

  2. Preview the project by using the Run on Server function.

  3. After creating the HATS project and previewing it, customize your application.

  4. Assemble the application and transfer the server.

 

Create a HATS project

Begin on the Welcome to HATS page. If the Welcome to HATS page is not displayed, click the Welcome to HATS tab at the top of the editor pane.

  1. Click the link to launch the Create HATS Project wizard.

  2. In the New Project window:

    1. Type the name of the application you are creating.

      You cannot use double-byte characters in the names of HATS files, or GB18030-specific characters in the names of HATS resources. This is not a HATS restriction; it exists because of the .

    2. Type a description of the application. This is optional; you can keep notes here or use it however you want.

    3. Leave the Use default location, the Use default Enerprise Application project, and Add administration support boxes checked.

    4. Click Next.

  3. In the Connection Settings window:

    1. Type the name of the host where the host application is located. This can be a hostname, a domain name (such as myhost.mycompany.com), an alias, or an IP address.

    2. If your host is an iSeries machine, change the type to 5250.

    3. Accept the default values for the other fields on this panel.

    4. Click Next.

  4. In the Select Default Template window, use the drop-down list to review the templates that are provided with HATS. Choose one to use as a starting point for your project. Click Finish. You will see a progress bar as HATS creates the project.

You have created a simple HATS project.

 

Preview your project

Begin on the Welcome page. If the Welcome to HATS page is not displayed, click the Welcome to HATS tab at the top of the editor pane.

  1. In the HATS Project View on the left side of the screen, single-click the name of the project you just created.

  2. In the Welcome page, click Preview your HATS project using the Run On Server.

  3. The Server Selection window opens, where you select the server on which to run your application. Select Use an existing server, and select the WebSphere Test Environment server.

WebSphere Studio creates an internal server to show your project. You will see a progress bar as the server is established. When you preview your project, you are using the WebSphere Studio Run on Server function. This function runs your project on your local machine, on a copy of the WebSphere Application Server product that is embedded in WebSphere Studio. This server is also called the WebSphere Test Environment.

HATS displays a Web page on which you can see what your application will look like. The Web page is divided into two main areas:

When you preview a newly created HATS project, you see what your host application looks like when the default transformation is applied. This transformation is part of each project and uses default rendering to provide an automatic conversion of your host application pages into Web pages. Part of what you will do with the HATS Studio is to design transformations that will improve the conversion of your host application pages into meaningful, usable Web pages.

When you preview your project, the Web browser opens in the HATS perspective. If you make changes to your project, do not open another Run on Server window to view the updates; instead, click the Refresh button on the Web page that is already displayed.

Some of the changes you make may not appear when you use the Run on Server function until you rebuild the project or restart the server. You can turn on the workbench preference by clicking Window > Preferences > Workbench > Perform build automatically on resource modification. This will cause your project to be rebuilt when you make changes, so that the changes will appear immediately when you use the Run on Server function.

To view the application as the end user would see it, copy the URL from the HATS browser into a browser. The Web browser in the HATS Studio opens with a URL similar to the following: http://localhost:9080/myapp/. To enable other users to see the Web page from a different machine, give them a URL containing the TCP/IP address of the machine that is running HATS Studio. For example, change the URL http://localhost:9080/myapp/ to http://myworkstation.mycompany.com:9080/myapp/.

Next, you'll want to modify your HATS project. For example, you'll want to put your own company name into the template, and you'll want to define widgets (fields, input areas, and other GUI controls) in the application area. As you develop your HATS application, you can use the preview screen to test it and to see how it will look to an end user. Here's the sequence of steps you'll typically follow:

  1. Create the HATS project.

  2. Preview it.

  3. Make changes based on what you saw in the preview.

  4. Refresh the preview screen.

  5. Repeat until you're satisfied.

Continue with the instructions in Customize your HATS project.

 

Home