 |
|  |
|
|
|
|
The PJX Analyzer is a utility that determines the contents of a Visual FoxPro application by
examining the application's PJX file and associated files. The information from that examination
is concisely displayed through a graphical user interface or printed reports.
The information gathered by PJX Analyzer provides initial metrics for the size and complexity of
a VFP application. This is a necessary (though not entirely sufficient) element of estimating the
level of effort involved in a conversion or rewrite of a VFP application to another platform such
as .NET. Please contact us at info@vfpconversion.com or (832) 717-4445 x 13 to get more
information.
|
|
PJX Analyzer Pro will perform the examination of an application’s project and display major statistics and metrics
determined during the application examination and includes a suite
of eleven analytic subsystems. Each analytic subsystem contains a flexible GUI and printed report to facilitate a
detailed analysis of the respective application components.
Results of a PJX Analyzer examination are stored in "XML files" which can
be e-mailed to EPS Software for further analysis at
|
|
|
The PJX Analyzer examines the application's PJX file to determine the number of:
- Class Libraries (VCX)
- Forms (Screens) (SCX)
- Programs (PRG)
- Reports (FRX)
- Labels (LBX)
- Database Containers (DBC)
- Free tables (DBF)
- Menus (MNX)
- RQBE Queries (QPR)
- Icon files (ICO)
- Text files (TXT)
- FoxPro Libraries (FLL)
- FoxPro Applications (APP)
- Other files (e.g. MNX, BMP, MSK, GIF)
The PJX Analyzer reduces the detailed application
metrics to determine project-wide metrics including:
- Number of classes, procedures, functions and ActiveX controls.
- Number of commands, average number of
commands per procedure (or function or method), and maximum number of commands per
procedure/function/method.
The project-wide statistics and metrics are available in both the PJX Analyzer PRO
and Lite versions. Detailed statistics and metrics are available in the PJX Analyzer
PRO version.
|
|
The PJX Analyzer will examine the application's class libraries (VCX) to determine the contained classes.
The PJX Analyzer will then determine for each class in the class library the number of:
- Commands
- Procedures
- Functions
- Containers
- PageFrames and Pages
- OptionGroups and OptionButtons
- CommandGroups and CommandButtons
- Grids
- Other UI controls (e.g. textBox/editBox/checkBox/button)
- ActiveX controls
- Class libraries external to the class library being examined
- The number of SET RELATION commands
- The number of SET FILTER commands
- The number of macro expansions (&) and EVALUATE() commands
Metrics:
- Most Commands - The largest number of commands
in any procedure, function or method in a class.
- Nesting Depth - The container nesting depth
for a given control.
- Subclassing Depth - The number of times
VFP must invoke a ParentClass before a control is completely instantiated.
|
|
|
The PJX Analyzer will examine the application’s forms/screens (SCX) to determine the number of contained:
- Control Types (by BaseClass)
- Commands
- Procedures
- Functions
- Containers
- PageFrames and Pages
- OptionGroups and OptionButtons
- CommandGroups and CommandButtons
- Grids
- Other UI controls (e.g. textBox/editBox/checkBox/button) and baseclasses for those
controls
- ActiveX controls
- External class libraries
- The number of SET RELATION commands
- The number of SET FILTER commands
- The number of macro expansions (&) and EVALUATE() commands
- The PJX Analyzer will also determine if the form has a private data session.
Metrics:
- Most Commands - The largest number of commands
in any procedure, function or method in a form.
- Nesting Depth - The container nesting depth
for a given control.
- Subclassing Depth - The number of times
VFP must invoke a ParentClass before a control is completely instantiated.
The PJX Analyzer examines any VCX classes referenced by the form to determine if there are additional controls
within the VCX classes, not explicitly referenced by the form. Container nesting and subclassing metrics
include the impact of VCX classes on the form. However the count of procedures and functions, and the
commands/most-commands metrics are restricted to the forms. Procedures, functions and commands in referenced
VCX classes are not counted because they are counted in the VCX metrics.
|
|
The PJX Analyzer will examine the application's program files (PRGs) to determine
the number of:
- Command lines
- Classes
- Procedures
- Functions
- Most command lines per procedure or function
- The number of SET RELATION commands
- The number of SET FILTER commands
- The number of macro expansions (&) and EVALUATE() commands
|
|
The PJX Analyzer will examine the application's report and label forms (FRX and
LBX) to determine the number of contained:
- Controls
- Controls with expressions (code)
- Groupings
- Variables
- ActiveX Controls
- The PJX Analyzer will also determine if the report form has a private data session.
The PJX Analyzer will examine the application's database containers (DBCs) to determine
the number of:
- Contained tables
- Views
- Relations
- Stored procedures
- Connections
The PJX Analyzer will examine the application's free data tables (DBFs) to determine
the number of:
|
|
|
The PJX Analyzer will determine the individual ActiveX controls used by the application
and the number of times each ActiveX control is instantiated in the application.
New in version 1.7, PJX Analyzer stores metrics of all methods at the method level.
“Methods” are procedural Procs and Funcs (functions) as well as class methods.
Identifying method information includes:
- File name
- Class name
- Method Name
Metrics stored are:
- Commands (for that method)
- Trigger Phrase (first one found in the method)
Method metrics data can be substantially larger than the rest of the PJX Analysis data (often hundreds of
times more data) and takes proportionally longer to load. It often takes method metrics more than a minute to
load, yet the rest of the PJX Analysis data can load in seconds. If you have PJX Analyzer PRO and you’re
interested in method statistics, check the “Load Method Stats” checkbox on the “Project” page before clicking the
“Get Project Information” button. If you’ve already gotten the Project Information without method statistics,
you can still get the method statistics by checking the “Load Method Stats” checkbox.
A trigger phrase is a string that can be parsed out of the method code in a VCX class or SCX form, or
anywhere in a PRG.
Trigger phrase search/metrics were implemented in response to the need to determine project velocity in a
project where a DBF data store was being upsized to SQL Server, but the VFP code was being retained.
To assist in determining project velocity, the development team was instructed to add specific trigger phrases
to comments inside of methods (e.g. “CONVERTED – FRED – June 31, 2008”). By running PJX Analyzer against the
VFP code on a weekly basis, the project manager developed and maintained metrics on the number of methods
converted, number of methods converted by developer and size of the methods converted by developer.
- Check the “Trigger Phrases” checkbox on the Project Tab to enable Trigger Phrases searches.
Add appropriate Trigger Phrases to the “Phrases” grid in the Methods tab, and then run the PJX Analyzer against the target project.
The first trigger phrase encountered in a method is captured and stored with the number of commands for that method. The results
of the Method analysis can be exported to an Excel spreadsheet.
Method Analysis/Trigger Phrases are available only in PJX Analyzer PRO.
|
- Commands The number of VFP commands (versus the number of lines of code). Often code is
broken across multiple lines and separated with comments and blank lines. This is a highly desirable practice
which can dramatically enhance code legibility, especially with SQL queries. However, variations in style will
lead to inconsistent metrics regarding the actual quantity of code. The PJX Analyzer ignores non-command lines:
- Comments (“*”, “&&”)
- Blank lines
- TEXT/ENDTEXT blocks
- “END” commands (e.g. ENDIF, ENDDO, ENDSCAN)
… And concatenates command lines that are broken with line continuation characters (“;”).
Therefore, the number of commands is the actual number of VFP commands, regardless comments and coding
style.
- Most Commands The largest number of commands in any procedure or
function in a class, form or program file.
- Nesting Depth The container nesting depth for a given control. For example the textbox at
the end of MyForm•PageFrame1•Page1•cntHoldAddress•txtZipcode
would be nested four levels deep.(Hint: Count the dots). The PJX Analyzer determines
the deepest nesting and the average nesting for all controls in a class or form.
The container nesting depth analysis applies only to forms and visual class libraries.
- Subclassing Depth In the PJX Analyzer, the subclassing metric is the number of times VFP must
invoke a ParentClass before a control is completely instantiated (e.g. A credit card textbox control that is
optimized to validate credit card numbers is subclassed from a textbox class which is subclassed from the VFP
textbox base class. The credit card textbox control has a subclassing metric of two). The PJX Analyzer
determines the deepest subclassing depth and the average subclassing depth for all controls in the class.
The subclassing depth analysis applies only to forms and visual class libraries.
- Data Reduction The transformation of raw data into a more useful form of data.
Results of the PJX Analyzer project examination are stored in a set of XML files. The XML files are written to
the PJX Analyzer’s directory. The XML files can be moved to another directory and accessed via the PJX Analyzer
without rerunning the examination. However, if a new examination is run and a previous examination’s XML files
are in the PJX Analyzer directory, the old XML files will be erased when the new examination is run.
The PJX Analyzer was developed with Visual FoxPro version 8. It has been tested
with VFP versions 8 through 9 (SP1) on Windows XP Pro SP2.
|
|
|
|
|
|