A NEW TODAY IS DAWNING!

TB0028 - The bphrx Application

Number: TB0028

Availability: As of BuildPro 8.00, developer users.


Summary

The bphrx application relies on new and enhanced BuildPro functionality that was introduced in 8.00. This document outlines some features of bphrx.
 

The Application

The bphrx application is provided in every BuildPro installation. Click here for the latest version.

The bphrx application is based on typical features found in a Human Resources business application. While bphrx in no way provides complete functionality it addresses many real-life application issues. These include:

  • The ability to run the application on any UNIX or Windows platform without modification.
  • The ability to run on ISAM, Oracle, Informix and SQL Server without modification. Although no embedded SQL has been used, the application isolates areas where such code could be implemented allowing us to address that in a future release.
  • Built-in installation / configuration. Start-up code checks for existing application configuration files and data. If none existing, it offers to create demonstration data and default configuration data.
  • Single file distribution. To simplify distribution and installation, all application components and auxiliary data are loaded in the application archive (bphrx.tdy).
  • Support for both Windows and Web Interfaces. The application high-lights the ability to serve both Windows and Web users depending on the tasks they are likely to perform from that interface.
  • Common code for Windows or Web user interfaces. User interface functionality is clearly separated from common back-end procedures.
  • All data is read using indexed access. Many examples assume unlimited database table size.

     

Application Configuration File / Demonstration Data

To simplify distribution and installation, the application checks for existing data file and configuration details. The *FILESZ() communication area is used to determine the existence of the bphrx data directory and data files.

The TEXT command is used to read an application specific configuration file: bphrx.ini. The SPLIT command is used to effortlessly parse parameter and value pairs (parameter=value as in DefaultEP=HRMenu). See functions hrxInit and ReadConf.


Password Encryption

The User table controls access to the application for Web users. Upon receipt, passwords encrypted using the *MD( ) comm area and compared to stored passwords. See function W_SignIn2.

Note. It is advised not to store clear text passwords in any application. Using a one-way encryption, your application can always check if a given password is valid, but not print the contents of the password at a later date. A user who forgets a password will have to have the password reset.
 

Common Data Retrieval to XML Data

Records from the Employee and Division tables can be extracted into XML document subsets (see functions getDivision and getEmployee). Using the XML Assistant as a starting point, common functions were created to extract data into XML format. By default the XML subsets include both column details and record data. Once in XML, the data can be transformed for various other uses (see below). XML and TEXT commands are used to create the XML subsets providing both speed and efficiency.

Find example XML subsets of the Division and Employee data here.


Use of XML Transformations

The common XML data subset are transformed using the XML *TRANSFRM command. The bphrx application uses transformations in several areas:

  • To create a multi-column list view, employee data is transformed using a common style sheet datatolist.xsl. The result is the appropriate data required by BuildPro to generate a multi-column list box. See function ExpSelect.
  • To populate nodes within a Windows tree view, the same employee data is transformed using a specific style sheet emptotree.xsl. In this case the result is only a portion of the data required to create a full tree view document as required by BuildPro. The result is merged (XML *MERGE) into a complete treeview document. See functions ExpPopulate and ExpSelect.


Intermediary Transformations

Building on this same method, several transformations can take place in a chain of events. In this case the application vendor has identified that the data of the Leave Liability Report is required for several different purposes / views. This is performed in several steps:

  1. The relevant employee data is retrieved using the common functionality. In this case it is data for a specific division. See function getEmployee.
  2. The raw data is transformed in to a common report format using an XSL style sheet.
  3. Additional specific calculations are applied to complete the report data (statistical data added). See function HRXLiability.
  4. The report data is then transformed into several views:
     
  • HTML for browser viewing using this style sheet. See function W_HRXLiability1
  • Office XML for viewing in Excel. (Download the file and open in Microsoft Excel). Stylesheet is here. See function W_HRXLiability2
  • BuildPro Window formats using transformation to view hourly (XSL, result) or monetary (XSL, result) views. See function Llr_Select.
  • Supplied "as-is" for further processing in a XML-enabled third party application like Visual Basic or Crystal Reports.


Web-API Integration

The application assume three type of access methods:

  1. Windows users running a stand-alone or client-server architecture.
  2. Web users access the application from a web browser.
  3. From other applications such as XML enabled ERP systems or a portal. In this case the application acts as a service allowing most of the user interaction to occur in the third party application.

Core features of the application are surfaced as Entry-Points that can be accessed from the local or a remote system.