Bridging Worlds
Let's say you have massive amounts of Javascript.
Let's say you want to make the logic contained therein available to another language.
How would you go about that?
What we chose was compiling Omar Kilani's php-js extension which makes Mozilla's Javascript engine available as PHP extension.
This was totally sufficient in our case to extend existing testing procedures around the Javascript code. Developers can now run "make test" on the development server which will cause Javascript code to be tested. Thus we have incorporated something which was originally manual client-side testing into a completely automated test system.
Additionally, we will be able to avoid writing the same business logic in two languages. Instead, common parts can be written in JS and executed from another scripting language.
There are also modules for Perl and Python which embed the SpiderMonkey JS engine. Feel free to post links to other bindings.
