Lamson - email app coding without the palm sweat
Doing what Java never did
"Can you integrate this with my e-mail?" It's one of the more dreaded questions in software development. For any programmer who has been around the block a few times, it evokes a long repressed fear of Sendmail m4 macros or Outlook COM objects. When a non-technical managerial type asks this question in a group meeting, and your boss assures him that Internal System from Hell X can easily be integrated with the company's e-mail system, your palms sweat.
As a development platform, e-mail has gone neglected for decades. Its esoteric implementation details and specifications are regarded by many in the IT business as voodoo, best left to old-granddad programs like Sendmail or Postfix. Zed Shaw hopes to change that with his new project, Lamson. (The name Lamson is a throwback to the early 20th century pneumatic tubes used to shuttle messages between offices. It was originally called Son of Sam, but Zed's dog convinced him to change it).
Developers in the Ruby on Rails community will remember Zed as the author of the Mongrel server, which gained popularity for being the first Rails production server for grown-ups. Zed started the Lamson project after struggling to set up an e-mail list, which on its face seems like an easy task. However, old code that everyone is afraid to touch, such as e-mail list servers, has the tendency to make anything you want to do outside of the most basic example damn near impossible.
"After banging my head on something as simple as a single list for some friends I realized that this crap hadn't changed since I last used it 10+ years ago," he tells The Reg.
"I then got thinking about how it should work, and realized that doing an email application should be like every other modern application we build today. There should be a simple start for a developer, clear documentation, a framework, a modern language, well defined protocols, commented code, and you should be able to extend it without painful configuration. You know, a lot like Django, Rails, or Cocoa, .NET, or just about any other platform today."
With Lamson, writing an application that centers around e-mail becomes a painless exercise. Anyone familiar with modern web application development will understand the idioms: Lamson uses finite state machines to keep track of users' interactions with the application, templating to generate message text, and makes it easy to use what you know about Model-View-Controller development to write your e-mail app. All safely contained within the confines of Python, it protects you from having to rusty-hatchet your way through some ghastly XML configuration file for an enterprise messaging library whose name prominently contains the letter "J."
Indeed, the Java world has taken a stab at e-mail, but has failed miserably.
"They didn't provide a full stack or try to clean things up. They missed out on the idea of providing a modern server and a modern framework for using the server. I think that's probably just how Java guys did things back then," Zed explains.
Sponsored: Virtualization security options