I agree with your comments about Luna. About the #ifdef proposal, I think a better solution might be that your server-side model object has a method like getSlaveObject() that gives you a version of the model that is acceptable to be seen on the client side.