Hi,
it's nice to see a few people signed up for the mailing list so I thought I'd briefly say hi to everyone and also give a little context.
I created this list and published a little GitHub page (
http://emailjs.org) due to an email exchange I had with Andrew Sutherland. It was clear that the
whiteout.io mail client and the Firefox OS mail client were facing similar challenges and that it made sense to share code/costs of the lower level email protocol stack.
When Felix and I started work on whiteout mail last year, we ported Andris Reinman's libs like simplesmtp and inbox to chrome packaged apps by writing a set of shims for node.js apis. The idea was to provide a thin layer between the node apis (like buffer, net/tls) required in Andris' libs and the native chrome apis (like ArrayBuffer, chrome.socket). It turned out though that this layer was not thin at all and that it would increase the complexity and overhead in the app considerably.
We thought about multiple solutions to this problem and decided to go with Andris' new browser based ports which were targeting Firefox OS apis (like ArrayBuffer, and the Raw Socket Api). In order to get the libs to work in the platforms we're targeting, we wrote a simple shim for the tcp-socket api (
https://github.com/whiteout-io/tcp-socket) and refactored the stringencoding polyfill from Joshua Bell to a UMD module (
https://github.com/whiteout-io/stringencoding). Over the last few weeks we've been working with Andris to get the libraries feature complete and ready for production. We've increased the test coverage, enabled travis-ci builds for all github repos and have integrated the libraries to be in next week's v0.10.0 release of the whiteout mail app.
It's of course still early days but the result looks quite promising. All modules use the UMD pattern, which means that they can be loaded with AMD, common.js or globally in the browser. This not only allows us to do headless integration tests under node.js, but also use the same code on the client and the server. We've reduced our dependency footprint to a fraction (no more node-buffers, yay!) and the chrome packaged app download size has been reduced by about 400k. The app also feels faster (though I have yet to do CPU and memory profiling to verify this) and we've solved many mail encoding bugs in the process. So thanks a lot to Andris and Felix for making this happen!
I'm looking forward to other projects adopting the libs in their apps. If you're targeting Firefox OS, node.js, node-webkit or chrome packaged apps, the libraries should work out of the box. If you're having any trouble, let us know if we can help out in any way!
Kind regards,
Tankred
Grafinger Str. 6