Internet Technologies:cxp

Build and execution core Foundation

A CXP (*.cxp or *.layout) file is automatically compiled at runtime when the view (URL ending with .cxp) is requested by the client, typically by a browser. Of course, compiling must be done only the first time the view is requested. Future requests just load the DLL and execute the code inside it. It is even possible to configure CXP so that multiple view requests are serviced by the same cxp-worker process, hence avoiding the overhead of loading of the DLL. This leads to super-fast view delivery times.

The cxc-builder is used to perform the CXP build process. The table below lists all files which are created during the transpile/compile/link cycle of the cxc-builder.

CXP file types
File Description
hello.cxp.20180817-62777310.dll*) The resulting DLL which contains the executable code of the CXP page/view
hello.cxp.20180817-62777310.lst*) The cxc-builder list file
hello.cxp.obj The intermediate obj file of your view
hello.cxp.prg The PRG code resulting from the CXP page/view transpilation process

Note: *) CXP does not use the name of your CXP page as the name of the class. Instead the filename is mangled and extended with a timestamp. This is required to allow CXP to load different versions of the page at the same time.

You can find these files under the .\cxp-application directory. By default, all files except the DLL are cleaned up automatically. To avoid deletion, add the following XML markup to your global.config file in the root directory of your website.

<buildmanager> 
<behaviour trace="yes" clean="no"/> 
</buildmanager> 

The following are some best-practice rules for analyzing errors in the CXP build process.

Always have trace="yes" and clean="no" in your global.config of your development environment. This ensures that tracing is enabled leading to detailed information about the execution and build of your CXP pages. In addition, runtime or compile time errors show the problematic line of code and the source code. Of course, do not forget to ensure clean="yes" before deployment.
In case you can not find the reason for a syntax error in your CXP page, simply look into the <filename>.cxp.prg file. You can use the command line compiler xpp.exe to re-compile the .prg to see the syntax error again.
You can use cxc-builder @<filename>.cxp.<date>-<microseconds>.lst to perform a manual build of your CXP page from the command line.
Consult the log files under \programdata\alaska software\logfiles\cxp20\... for information about CXP internals.
In the event you are still lost, simply send these logs along with your problem description and the problematic CXP page to the Alaska Software technical support.
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.