In our system, the code which exists on the client side (in Flash and Javascript) mirrors the code that exists on the server side (e.g. in Python or PHP), normally with respect to the models, the methods available for those models, and the unit tests written for them. This becomes a problem in systems where you want to minimize data transfer (e.g. multiplayer games).
I do not want to write the same code and unit tests redundantly for both the client and server, but I don't know of any standard solutions to deal with this.
Basically, I want a language/compiler which can produce models and methods for three main languages: Actionscript, Javascript, and any server language.
Does something like this exist?