JASPA says “Hello World”

JASPA is a JavaScript cross-compiler written in PHP.

Write robust object-orientated applications in a strongly-typed language (modelled on AS3) and compile it into regular JavaScript to run in a web page, or any other environment that implements a JavaScript engine.

Download JASPA from SourceForge
https://sourceforge.net/project/showfiles.php?group_id=243463

The JASPA project is split into two main components:

  1. The compiler
  2. The cross-browser abstraction API

1. The compiler

The compiler is API-neutral; Its job is to compile object-orientated code written in the JAS syntax, and convert it to regular, clean JavaScript suitable for running in any ECMAScript-compliant host program, such as a web browser. The compiler comes in two flavours: A command line compiler, which is the most useful; and also a web-based compiler which is handy in development and testing, or when a command line is not available.

The compiler is largely complete, but there is still some work to do to support some outstanding language features.

 2. The cross-browser abstraction API

If you want to build web applications with JASPA, the compiler needs to know about all the objects and methods exposed by the browser. This is easily achieved by writing native class interfaces, much like intrinsic classes in ActionScript. However, browser scripting today poses the same huge problem that it did 10 years ago; Vendors don’t all provide the same API. Hence a comprehensive abstraction layer is required to provide a single, standardized interface that works across all modern browsers.

Although the JASPA compiler is largely complete and pretty stable, work on this API is still very much in progress.
More about all of these topics will be organized into further blogs. In the mean time, please have a go with the compiler and let me know what you think of it.