Public Prexonite Beta Preview

Here it comes, the first public distribution of Prexonite. I call it a “beta preview” as it is no longer in alpha state (all major features are working; at least all unit tests pass.) but there is little to no documentation. I’m still working on both the API and the language reference.

The preview consists of two *.zip archives: The sources (including unit tests and all dependencies) and pre-compiled binaries of the runtime (Prexonite.dll) and the standalone host (Prx.exe).

Ah, and by “little to no documentation” I mean partial (20%) XML documentation. Heck I don’t even have a readme.txt. If you have any questions, please ask (through comments or using the e-mail address in the LICENSE.txt file) me.

Prexonite as a web scripting language

The Host

I built an HTTP application server (using the HttpListener) in C# that hosts the Prexonite Scripting Engine. An apache webserver is used to forwards all requests to files that end in ".pxs" (using mod_rewrite and mod_proxy) to that app server.

The Prexonite host then compiles the requested file, executes it's main function and returns the output produced by the script to the web server / user. Capturing the output is done by replacing the standard print and println commands with custom ones that print to the response stream. Additional commands provide access to GET, POST and cookie data. To make access to those parameters easier, I also created corresponding classes. They all implement the IObject interface to intercept object member calls from the script. This not only bypasses the (usually) slower late binding but also allows me to add some syntactic sugar*.

The Script

Prexonite web scripts work exactly like the ones for Prx.exe, except that they have access to a couple of additional commands.

Prexonite Script:
  1. function main does println("Hello World");


I haven't written that many web scripts so far. One of them compiles all other scripts it finds, extracts their meta information and generates some sort of meta data index file. This file is then used by another script to display a "table of contents" with descriptions, extracted from the individual files.

More »