iTP Active Transaction Pages (iTP ATP) Programmer's Guide
iTP Active Transaction Pages (iTP ATP) Programmer’s Guide—522292-002
6-1
6
Designing and Debugging ATP
Applications
This section provides guidelines for designing and debugging ATP applications. It
includes the following subsections:
•
Designing for Performance on page 6-1
•
Security Considerations on page 6-3
•
Writing Robust Scripts on page 6-3
•
Debugging ATP Applications on page 6-3
Designing for Performance
The following application design and implementation approaches will contribute to the
optimal performance of your applications.
•
Define Caches
Set environment variables to define page, SQL Statement, and TUXEDO field table
caches, as described in ATP Environment Variables
on page 2-12.
•
Limit Use of Dictionary
When instantiating atp.dictionary objects, specify the message names
required. Otherwise the whole dictionary will be read and converted to JavaScript
objects. Alternatively, you can use code generated by the dview sample program to
remove the requirement for reading the DDL dictionary and building large object
trees at run time. For more information about these options and their relative
benefits, see atp.dictionary Object Usage Considerations
on page 4-26.
•
Specify FML Fields
When instantiating atp.fml_table objects for large FML tables (more than fifty
items), specify the fields required in the atp.fml_table constructor. By default,
the whole FML table is converted to JavaScript objects. Or consider having multiple
smaller field tables. For more information, see atp.fml_table Object
on page 4-41.
•
Avoid eval Operator
Minimize use of the JavaScript eval operator. Use parseInt, parseFloat,
object[property] notation where possible. You can refer to properties of an
object by using array subscript notation; for example, obj.prop is the same as
obj[prop]).