title: EventCallbackMethod overhead w/GUI App w/ electron
body: <p>hopefully you can help me to reduce my handler overhead ;-)</p>
  
  <p>Currently I'm writing an GUI App with electron, using a SQLite Database and displaying the stuff on GUI.</p>
  
  <p>The workflow currently goes a little like this:</p>
  
  <ul>
  <li>user clicks on a Button in the GUI</li>
  <li>button calls a JavaScript Function</li>
  <li>function calls ipc.SendSync(...)</li>
  <li>which calls DB.getCustomers(), which is a wrapper for Database stuff</li>
  <li>result is then JSON.stringify'ed to get it through ipc event arguments</li>
  <li>which is parsed and rendered as a table</li>
  </ul>
  
  <p>I want to get rid of wrapping all the:</p>
  
  <pre><code>ipc.on('db-getCustomers', function (event, arg) {
    console.log('my-getCustomers  got called');
    event.returnValue = JSON.stringify(dataBase.getCustomers());
  });
  </code></pre>
  
  <p>Is there any way I can avoid all the overhead/boilerplate of this? Skipping the IPC wrapping and JSON stringify/parse?</p>