Solutions for redundant server and client code?
        Posted  
        
            by Fragsworth
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Fragsworth
        
        
        
        Published on 2010-04-25T15:31:01Z
        Indexed on 
            2010/04/25
            15:33 UTC
        
        
        Read the original article
        Hit count: 335
        
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?
© Stack Overflow or respective owner