Hastmail 2 has kicked off with a bang. And by bang I mean a bunch of late night coding. We have svn setup for the new code at sourceforge, and porting useful Hastymail 1 code has begun. The framework we are building from provides many basic web application mechanics, so the porting effort is focused on the back end functionality, like talking to the IMAP and SMTP servers. So far almost 1/3 of the IMAP related code has been ported, reviewed, and improved. I'm excited! I have yet to determine a satisfying metaphor to describe what it's like coding to the IMAP rfc, but when I do it will be rife with ambiguity if nothing else. Having not dug into the bowels of that dastardly document in a few years I almost washed away that clinging chill it evokes that eats away at your belief that you can read and understand the English language. Here is quick list of tips for anybody diving into the verbal quagmire that is the IMAP protocol RFC:
- Once you understand a bit, scroll 2.5 pages down and you will find something that contradicts it.
- If that fails scroll 2.5 pages up.
- MUST means MAY and MAY means MUST.
- If you think you understand something, you are wrong. Mr Crispin will surely elaborate your
wrongness on the IMAP list if you are not yet convinced that you are wrong.- "implementation independent" should have a footnote that reads "Sorry client writers, we are going to leave
this up to the server writers, good luck handling all the possibilities!".- Drink copious amounts of alcohol. Now this thing is making some sense!
Seriously though, handling IMAP properly makes DB work look like childs play (oh SQL, how I miss your easy to understand semantics!). When I look over the Hastymail IMAP functions I cringe a little less when I compare it to the protocol parameters. No matter how you slice it the code just ends up looking dirty. The new version of our IMAP libs I think looks a bit less dirty, and with some luck will be more compliant and better functioning than what we have now. Anyone in need of some eye punishment can browse this bad boy here:
http://hastymail.svn.sourceforge.net/viewvc/hastymail/trunk/hastymail2/
(the IMAP specific code is in lib/imap_class.php)
| No Images with this post |
| No comments posted yet |