Framework for reusing backbone code on the client and server