Pluggable JavaScript models to use on the server and in the browser