The Big Scribe Re-write
Date: 8/2/2008
Yes. I'm in rewrite number 4 of Scribe. I've taken an extremely pessimistic view of what I can achieve and aimed low. Let me explain, in all the previous efforts I was trying to replace the backend at the same time as changing the API between the objects in memory and the disk storage interface. This was always problematic because there is too much going on at any one time and it unravels and I lose momentum and the rewrite dies...

So this time, a new idea. Don't re-write the backend, just use the existing mail2 code BUT fix the object's so that they have a clean interface to the storage code. The system I've built on for the last n years has been one with a less than ideal architecture. And now I'm finally ripping that up and replacing it with the new. The in memory objects for Mail, Folders, Calendars, Contacts etc all derive from the "Thing" class (yes I know... original) and they include all sorts of data members that get written to disk. This meant that the "Thing" objects were the only code that knew how to read and write themselves to the mail2 file. The mail2 code didn't know what it was storing. So for me that meant I couldn't read/write the objects to a different back end easily. Now I've separated out the serialization code from the "Thing" objects into a pure virtual API that glues the Things to their mail2 backend. But of course can be replaced with any other backend that implements the glue API.

So that could be a Sqlite database, an MBOX store... or a MAILDIR folder. Or a caching IMAP implementation.

Anyway, currently the app boots, loads a folder and shows email. It's not sending or receiving yet, but I think I'm close to getting that working. Receiving should be easy, sending... uh less so. Because in the object hierarchy shuffle the Mail object lost it's "MailMessage" parent which the sending code uses to encode the outgoing mail. That means more mucking around for me when preparing a message for SMTP. But no doubt I'll have that licked in short order.

One of the releases in the next few weeks will be off this new architecture. And it'll suck. Seriously it'll be a big backward step compared to the latest v1.90 test2 release. Because lots and lots of code has changed... challenging, application wide refactoring. And I won't get that right first go... it'll need lots of field testing, and it won't even do any new tricks to start with either. It'll be the same old UI and feature set... just with more bugs, missing features and crashes. You like? Well it had to be done, and I'm giving the beta testers fair warning that all hell will break loose in the following releases.

So there. More updates to follow.
08/02/2008 8:18am
Receiving works. :)

I really feel like this is going to work now... once sending is done it's not far to "general usability", and if I can use it for day to day email then I'm officially over the hump.
08/02/2008 8:23am
Just fixed the "find" function.
08/02/2008 10:26am
I have to slowly "port" each object across to the new API. I'm mostly done with the filter object now. It's non trivial in that it has collections of other objects. But I'm striping out all the deprecated code which makes it easier to work on. The new filter's are XML based, which is just a string. Strings are easy to work with :)
09/02/2008 6:14am
Yay sending works. But attachments are completely busted... and there aren't any contacts yet either.
09/02/2008 10:27am
Contacts are now working... wahoo.

So close.....
09/02/2008 11:13am
Good work,
I'm eager to test this release for you

keep going
10/02/2008 8:53pm
Ok the calendar now works, which completes all the major objects minus a few obscure features. I'm going to try and use it this week and see what turns up bug wise. Then if that shakes out the obvious stuff I'll make a release towards the end of the week.
11/02/2008 5:57am
And now attachments work... which makes it an alpha. All the basics working, a few missing things here and there and tons on bugs.
13/02/2008 10:55am
Ok there is a build available of v2, download from the Scribe page.

I've added the version to bugzilla in anticipation.
15/02/2008 2:24pm
we're getting past the basics and to the more mail2 file related issues in the bugdb.
Email (optional): (Will be HTML encoded to evade harvesting)
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.