title: Synchronous vs Asynchronous code with Node.js
body: <p>We are working with node, mainly for an internal project and to understand the best way to use the technology.  </p>
  
  <p>Not coming from a specific asynchronous background the learning curve can be a challenge but we are getting used to the framework and learning the process.</p>
  
  <p>One thing that has polarised us is when the best time to use synchronous code vs asynchronous code is. We are currently using the rule that if anything interacts with IO then it has to be asynchronous via call backs or the event emitter (thats a given), but other items which are not in any way using IO can be constructed as synchronous functions (this will depends as well on the heaviness of the function itself and how blocking it actually is) but is this the best approach to take when working with Node.js?</p>
  
  <p>For instance, we are creating a Hal+JSON builder, which currently exists within our code base.  It is synchronous simply because all it is doing is creating some rather smallish object literals and nothing more, there are no external dependencies and certainly no IO interactions.  </p>
  
  <p>Is our approach a good one to take or not?</p>