Bottom of Page | Previous Page | Next Page | Contents
Creating and organizing projects
When you create a new HATS project, a set of folders is created to help
you organize your HATS files. The highest level folder has the same name as
the name you give to your project when you create it. In that folder are other
high-level folders that contain objects defined in your HATS project:
- Project settings
- Screen Customizations
- Transformations
- Templates
- Screen Captures
- Macros
- Source
- Common
How to work with the contents of each of these folders is explained in
this book.
You can create folders within these high-level folders to help organize
your project. For instance, as you create screen captures for your project,
you might want to create folders under the Screen Captures folder to organize
and group the captured screens. To create a folder, right-click on one of
the high-level folders in the tree and select New
HATS > Folder. To move a file into a different folder, right-click on
the file and select move, or you can use the drag-and-drop method. You can
create folders under any of the high-level folders to help organize your files.
HATS projects, created in HATS Studio, are extensions of Web projects in
the WebSphere Studio workbench. For more information about Web projects, open
the Help perspective in the WebSphere Studio workbench and select Application Developer Documentation. Expand the sections as follows to
find information on Web projects: Concepts > Projects
> Web projects.
By default, all HATS applications are stored in one Enterprise Archive
file, HATS.ear. When you assemble your applications and deploy them on WebSphere
Application Server (WAS), the HATS.ear file contains a Web Archive (.war)
file with the resources to run each application, as well as one copy of the HATS run-time
executable code. If you prefer, you can organize your applications differently,
either each in its own .ear file, or in some other combination.
Note:
If your .ear file contains the .war files for multiple applications,
which is the default setting, your WebSphere Application Server (WAS) administrator
must use WAS administration to configure the server with Module Visibility set to Application. If the server
is not configured this way, your applications will not run. Your end users
will get the following error message in their browser: HTTP 404 - File
not found when trying to run an application.
Which .ear file your project files go into is determined when you create
the project. On the first panel of the Create a HATS Project wizard, you can
keep the Use default Enterprise Application project check box checked, in which case project files are created within HATS.ear,
or you can clear the check box and specify a different .ear file to contain
your project's files. In HATS Studio, you cannot choose a different .ear file
after the project is created. However, you can move projects from one .ear
to another, using the WebSphere Studio application.xml editor.
To share HATS project files with other developers in a team environment,
IBM recommends the use of a repository such as Concurrent Versions System
(CVS). Using a repository is easier and more robust than importing and exporting
individual projects in zip files.WebSphere Studio supports several repositories.
For more information, please refer to the WebSphere Studio documentation and search
on "repository" or "CVS."
To move a project, follow these steps:
- Click the Navigator tab of the HATS Studio to
display the .ear files.
- Expand the .ear file to which you want to move a project. Expand the META-INF
folder and locate the application.xml file.
- Start the WebSphere Studio application.xml editor by double-clicking
the application.xml file.
- In the application.xml editor, click the Modules tab to display the .war files for your projects.
- Click Add to display the Folder Selection dialog.
- Select the project you want to add to the .ear file.
Note:
Make
sure you select the project, and not the .ear file with the same name.
- Click OK.
If you want to move a project to another machine
with WebSphere Studio installed, you must export the project as a .zip file
before sending the project to another machine. The following steps explain
how to export a project and import it into a WebSphere Studio installed on
another machine.
To export the project from WebSphere Studio to a .zip
file:
- Click the Navigator tab of the HATS Studio.
- Select File > Export to open the Export
wizard.
- Select Zip file, and click Next.
- Check the box for the project you wish to export.
- In the Zip file field, type in the destination
to where you want to export the file. You can also select an export destination
by clicking Browse.
- Click Finish.
To import the project in a .zip file into WebSphere Studio:
- Create a new HATS project using the same name as the project
you are importing.
- Select File > Import to open the Import
wizard.
- Select Zip file, and click Next.
- In the Zip file field, type in the location
of the .zip file. You can also select the location by clicking Browse.
- Click Browse next to the Folder field, and select the name of the new HATS project you created.
- Click Finish.
- When the .zip file is being imported, click Yes to all to overwrite existing files.
The new project will contain the original HATS project.
Consider the effect of the following on your server machine when deciding
how to arrange your projects:
- Disk space
- If you create each project in its own .ear file, it has its own copy
of the HATS run-time code, of which there is one copy per .ear file. The run-time code is approximately 16 MB, so you can multiply that by
the number of projects you have to see how much disk space is consumed on
your WAS machine for each project.
- Maintenance
- If you update a project and re-deploy it, you are re-deploying all the
projects in that ear file.
- Applying service
- If an update is required to the HATS run-time executable code, it must
be applied to each copy of the run-time code in each .ear file.
- Logging and tracing
- Logging and tracing are controlled at the level of the .ear file, not
at the individual HATS application level. If each HATS application is
in its own .ear file, you can control its logging and tracing settings independently
of any other applications. If you have several HATS applications in one
.ear file, logging and tracing settings apply to all HATS applications in
the .ear file. Messages for all HATS applications in the .ear file are inserted
into the same log file, and trace information for all HATS applications
is inserted to the same trace file.
See Troubleshooting HATS for more
logging and tracing information.
- License tracking
- License tracking is also controlled at the level of the .ear file, not
at the individual HATS application level. If each HATS application is
in its own .ear file, license tracking is done independently of other applications.
If you have several HATS applications in one .ear file, license tracking
is performed for all HATS applications in the .ear file. Information about
license usage is kept for all HATS applications in the .ear file, and is
inserted into the same license usage file.
See Troubleshooting HATS for
more information on license tracking.
[ Top of Page | Previous Page | Next Page ]