Design Documentation


One major goal of the LogicMail project will be to post useful design documentation when and where it makes sense. The idea is to keep the code organized and well thought out, and to encourage planning of major features. Since the 2.0 goals involve a major redesign of the application, this page will be where that design is documented. Consider this a living document, to be updated throughout the design and development process.

The original version of LogicMail was a simple UI coupled to a mail protocol client, using some rudimentary threading. This got the job done, but made it impossible to add any more advanced features to the application. Furthermore, users tended to assume that more was going on under the covers, and that it would not be so difficult to add certain features. The 2.0 project aims to add a real application architecture underneath LogicMail, which will eventually make it possible to implement all sorts of advanced features in the application.

The above diagram is a bit dated, but its generally accurate in illustrating the new high-level design of LogicMail. This design breaks the application down into the following layers:

  • User Interface
  • Account/Folder/Message Unified Data Model
  • Asynchronous Mail Engine
  • Mail protocol implementations

These layers are being implemented by refactoring existing code where possible, and writing new code where necessary. However, at this point, most of the original code exists within the mail protocol layer, a little bit of the UI, and some of the utility classes. Unit test coverage will be maximized to facilitate quality, as this new design will be much harder to fully test as a complete application.

Package structure

The layers of the application closely align with the Java class package structure shown above. Therefore, this structure will be used as a branching off point for pages that explain all the different pieces of the design.

LogicMailTop-level, containing application startup code.
LogicMail.uiUser interface layer, containing all code responsible for interacting with the user.
LogicMail.modelMail object model layer, containing the application's internal data model.
LogicMail.messageMessage object model, providing a  MIME-oriented way of dealing with message data.
LogicMail.mailMail store and protocol layer, containing all code that talks to mail servers.
LogicMail.confConfiguration classes.
LogicMail.utilUtility code, handling everything from object serialization to string parsing.