title: architechture when getting objects from server side
body: <p>When wanting to get something from the server, I've done something a couple of times that just feels wrong, and my question is if there's some better way to do it. </p>
  
  <p>On the clientside I do;</p>
  
  <pre><code>socket.emit('getToy');
  </code></pre>
  
  <p>And on the serverside:</p>
  
  <pre><code>socket.on('getToy', function(){
     socket.emit('newtoy', thetoy);
  });
  </code></pre>
  
  <p>It feels like there should be some way to do;</p>
  
  <pre><code>socket.emit('getToy', function(thetoy){
      //play with the toy
  });
  </code></pre>
  
  <p>What are the best practices to do in this situation?</p>