This document contains useful configuration advices for developing applications with Application Designer. It covers the following topics:
Do not place your development in the standard web application cis. Always use a parallel web application so that cis is the "Application Designer reference" aside your own development.
Advantage: if installing Application Designer upgrades, you are always sure that these will never directly touch your development system. You can install upgrades inside the cis directory, have a look at them and then explicitly decide to take them over into your development web application.
Important:
If you take over, always take over the whole reference web
application, not parts of it.
By default, Tomcat administers its web applications within the directory tomcat/webapps. For each web application, there is one corresponding directory. For example, Application Designer is represented by directory cis.
You do not have to follow this structure. You can also decide to have your installation directory in a directory which is completely separated from your Tomcat installation.
There may be several reasons to do so:
You may want to move the web application directory into your development project directories, i.e. you do not want to have your development objects distributed on several locations of your hard disk.
You may want to have different Tomcat installations (for example, different versions) and use the same web application inside these Tomcat installations.
Create the file abcde.xml in the directory conf/Catalina/localhost. Define the file in the following way:
<Context docBase="C:/Development/project/webui/webapp" privileged="true" antiResourceLocking="false" antiJARLocking="false"> </Context>
In this example, the web application abcde (this is
the name of the file) is located in the directory
C:/Development/project/webui/webapp. The directory that is
defined by docBase
is the web application directory which is
internally structured in the following way:
webapp/cis /cisdemos ... ... /WEB-INF ...
Software AG constantly publishes patched installation versions. With each patch, there is a brief documentation on the fixes that were done with the patch. The Application Designer build of a certain version always includes all patches of previous builds.
When installing a build, you have to follow a certain procedure in order to correctly take over the files of the new build and to save some information that you might have changed and which may get overwritten:
Start the installation wizard of the corresponding Application Designer build and select a temporary directory (c:/temp/buildYYYYMMDD) as the destination. As a consequence, the wizard will install a directory structure such as the following:
c:/temp/buildYYYYMMDD /tomcat /webapps /cis /cis /cisdemos ...
Make safety copies of all configuration files that Application Designer always delivers as part of the installation and that you may have changed. Application Designer offers a tool for this; see Creating Safety Copies of Configuration Files for more information.
Copy the content from the cis directory into your own web application.
Regenerate your layout definitions. You can do this
either by using the Layout Manager in the development workplace (open your project(s) and regenerate all layout definitions as described in the Development Workplace documentation under Generating HTML Pages) or by using Ajax Developer;
or - and better: define a script (batch) in which you call the Application Designer
class
com.softwareag.cis.gui.generate.HTMLGeneratorWholeDirectory
in order to regenerate all layout definitions of one project in one step.
See also
Java API
for HTML Page Mass Regeneration in the
Development Workplace documentation.
If you have defined your own style sheet using the Style Sheet Editor, proceed as described in the Development Workplace or Ajax Developer documentation under Regenerating Your Own Style Sheet from the Style Sheet Template.
We strongly recommend that you use ANT for automating the upgrade of an installation. All steps (taking over the files and regenerating the layouts) can be easily defined using an ANT script. See Using ANT for Upgrades in which details are explained and a sample ANT script is provided.
In case you created your customized configuration files with the names user_*.xml, you simply have to make sure to keep your user_*.xml files. In addition, you have to make a safety copy of the file web.xml. For information on how to create custom configuration files with the names user_*.xml, see Customizing Configuration Files.
In case, you modified Application Designer's default configuration files, you can create safety copies as described below.
A Configuration Manager is available for managing the core configuration files and which helps you to keep them consistent through upgrades of Application Designer. This tool is designed for "non-ANT-minded" developers. All "ANT-minded" developers should refer to the ANT way of upgrading your system.
We recommend using ANT. Nevertheless, the description of the Configuration Manager is provided below.
All configurations that are delivered with each Application Designer build and that you might modify on your own are critical when it comes to applying new builds. Use the Configuration Manager that comes with Application Designer as described below.
To create safety copies of the configuration files
Invoke the demo workplace.
In the navigation frame, choose the
button.In the Configuration node, choose Configuration Manager.
A list of all critical files is shown.
From the
menu, choose .The system automatically creates copies of the current files. The name of each copy includes a timestamp.
After having created the safety copies, you can, for example, upgrade your system to a new Application Designer build by copying/installing it over your existing application.
To check the differences after an upgrade
After the upgrade, start the Configuration Manager once again (as described above).
Invoke the context menu for a safety copy and choose the
command.The differences between the new version of the file and the saved version are shown.
You can edit the current file on the left side and take over changes from the right. Save the file by choosing
from the menu.Note:
You can choose the button
to better see what has changed.
When working in teams, you typically you use a central source versioning system (for example, CVS, Perforce, Visual Source Safe or others).
The resources to be synchronized are:
Adapter Java Sources
The location of the source files is up to you.
Layout Definitions
Each Application Designer project has a set of XML layout definitions that represent
the layout of pages. The definitions are transferred to generated HTML by using
the Application Designer development tools. The definitions are stored in the
xml directory of a project.
Translation Information
If using the standard multi language management, literal translations
are stored in comma-separated files in the project's
multilanguage directory.
Help Texts
If using the standard online help management, help texts are stored in
the project's help directory.
Other Web Resources
Typically you have images and additional HTML pages that you use in
your project. For example, your project has a subdirectory
images that contains all GIF and JPG files.
Configuration Files
It may also make sense to share configuration files. For example, you
may modify the web.xml file in
order to access EJBs. In this case, you may centrally define the
web.xml file and automatically synchronize it through the
source code versioning system. The same may apply for all other configuration
files.
Typically you define the build process to consistently build up a system out of its resources. You may use simple scripts to do so, or you may use tools such as ANT.
See the Java API documentation for the following classes in order to find information on how to automate the generation of Application Designer layouts into HTML pages:
com.softwareag.cis.gui.generate.HTMLGenerator
com.softwareag.cis.gui.generate.HTMLGeneratorWholeDirectory