Some people worried that I was not blogging anymore. No, I have simply been very busy in my free time working on tinymail. Here is an update.
Since the last months, I’ve been proof of concept designing and implementing tinymail, a E-mail framework for mobile and embedded devices that also implements and defines lots of ready-to-use user interface components of most typical mail user agent. It does this in a highly adaptive and flexible way. Indeed using flash flash buzzword buzzword “design patterns” and other modern software development techniques like unit testing.
Since the last three weeks I feel that I started designing and refactoring tinymail for real use. I started getting the API (it’s updated indeed) and its design the way I really want it. I started to make sure that reference counting is absolutely correct. API and reference counting aren’t things which you want to change a lot once you started doing releases.
That’s why I have to make sure that both are right from the start, good. Some recent changes:
There used to be two APIs for getting folders from two types. They where not capable of running asynchronously. There was one API in a store-account type for getting the root folders. And there was one API in the folder type for getting child folders.
Every sane developer who cares a little bit about design, makes a folder-store interface and lets both types implement that interface. I did that for tinymail. I also added a query mechanism. Because sometimes you want folders that are subscribed, sometimes you don’t. Sometimes you only want folders that contain “comp.lang” (for example in case your account is for a NNTP server).
Just like when you are getting headers, I designed it by letting the developer pass his own list implementation. Returning a list is often the wrong thing to do: if you return a list, the implementation of that list is fixed defined by the framework (this isn’t adaptive nor flexible). In tinymail those lists are typically implemented by types that also implement GtkTreeModel. This means no silly copying items from one list-type to another list-type. And it means that the list itself can be the containing type that keeps a reference on its items. A doubly-linked list obviously can’t do that. A doubly-linked list is also a hell for language binding your framework to a higher programming language.
Think model view controller (you know, that *thing* that you learned at school during the Java course). The list instances that you will feed the tinymail framework with, will also be the list-models of your list-views. And you can implement those models yourself (the default libtinymailui library, libtinymailui-gtk, uses the GtkTreeModel API for this). The idea is that for example in .NET, you will use the IList type for this. The .NET bindings will indeed let the list-type binding proxies implement IList.
It’s now also possible to get folders asynchronously. You never know how slow your connection will be on a mobile device. Here’s a functional test that illustrates it. And this is a synchronous version of it. Both tests recursively walk all the folders and print them on your screen.
I finished most of it before I went on holiday, but there are now also fully functional Python bindings for tinymail. They make it possible to write a functional E-mail client in a few seconds. Three people are also working on .NET bindings.
Lots of work went into adding lots of unit tests. These are very simple to implement. Actually can everybody help with this. If you too want a great E-mail framework with standard user interface components for E-mail clients, join the mailing list and get in touch. Doing unit tests will of course get you familiar with the implementations. Most people have no idea how much a developer knows when a simple stupid test succeeds of fails.
I also added lots of pages to the tinymail development pages. They are wiki pages so you can change them if you have something interesting to add or if you want to correct something. A few interesting pages are: library image sizes, how much memory will tinymail use, debugging tips, memory testing and monitoring tinymail, features and facts, a list with todo items. New pages are added constantly. The webpages are the central communication tool of the developers (there are a few contributors indeed).
About a release. A month ago I promised some guys a release in two months or at the same second Nokia releases Modest, an E-mail client being build on top of tinymail. The iterations of changes are, however, going very fast. We’ll see. Not much normal users will care a lot about a release anyway. They are just waiting for an E-mail client that doesn’t suck. Tinymail is not their E-mail client. It’s a framework for building their E-mail client.