JASPA FAQs

Here are some answers to questions that I imagine would be frequently asked about JASPA if anyone was asking any.


I don’t get it; what does it do?
It generates regular JavaScript from code written in a language called JAS, which is practically identical to AS3. You can write packages and classes, and take advantage of all your favourite OOP features, and JASPA will convert this into code that will run perfectly in a web browser or any other environment that implements a compliant JavaScript engine.

Can I convert my Flash projects into HTML sites?
No. JASPA really has nothing to do with Flash. The JAS language adopts the syntax of AS3; the relationship ends there.

Why doesn’t JASPA compile my ActionScript successfully?

Firstly, the JAS language is not ActionScript – It is modelled very closely on it. Full details of supported language features here.
Secondly, the API available in the Flash Player consists of objects that are unknown to JASPA. If you want to reference a class called MovieClip, you’ll have to write one.

I love JQuery/Scriptaculous/etc.. Why should I use JASPA instead?

JASPA is not an effects library, and it is not designed to make your life easier. It is designed to empower you. If you think JQuery is the bees knees, then you should probably keep using it. However, if you want to write serious application logic that must run in JavaScript then JASPA is your man.

Is JASPA free / open source?
The API code written in JavaScript and JAS is open source. It’s released under the GNU General Public License, and the cross-browser API has even got its own Sourceforge project. The compiler software written in PHP is free (as in gratis), but not strictly open source. You can use the compilers free of charge as much as you like and generate JavaScript for any purpose you wish, but the PHP code is not distributed with a recognized free software license.

What does JASPA stand for?
Offically: “JavaScript; Advanced Syntax with PHP”, but originally just a mish mash of JavaScript/ActionScript/PHP

Does JASPA improve performance?
No. JASPA is a code generator, not a runtime engine. The code it generates cannot be any more efficient than whatever JavaScript engine executes it. Furthermore, JASPA is designed with robustness in mind, so you will probably find the code generated is quite long-winded and heavier than anything you would write from scratch.

Why is the compiler written in PHP?
The shortest answer is that I am a PHP developer. I’m sure if I was a Java developer it would be written in Java. It has some advantages being written in PHP. If you don’t have access to a command line, the compiler can be run through the browser. Also there may be future development of JASPA that integrates more tightly with PHP.