Integrating client and server code