Should I share classes on the server with the client? I am fortunate being able to use the same programming language on both the server and client (javascript). I would therefore like to share my code and classes between server and client, like Half Life (and possibly others) did. To make things simple, suppose I have an MMO with a Player and an Enemy class, with a position, velocity, and health. var Player function() this.health 100 this.x 0 this.y 0 var Enemy function() this.health 100 this.x 0 this.y 0 I know ideally these should inherit from each other (or use a CES system). But my question is as follows Since these classes will be used on the client and server (since both client and server needs to know about these entities) with some but not all shared logic, would it not be crazy to define two separate classes on both the server and client? What are the advantages and disadvantages of sharing classes between server and client? Are there any helpful websites with tips tricks for this approach?