-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture Recovery
The following includes the architecture recovered from the K-9 Mail android application. Upon analysis of the official documentation, the team decided that the k9mail module was critical and would be the basis for the architecture recovery.
The overall architecture is broken down into 4 layers: the presentation layer, the logical layer, the data layer, and the connector layer. The presentation layer dictates the user views, which are made up of activity pages and fragments. The logical layer provides the backend services such as downloading emails and the sending of emails. These actions are completed via protocols. The data layer is tasked with data storing on the device and data sharing between other components. The connector layer provides the ability for different components to communicate and interact together (MessagingController).

In the following Core Diagram, the PushService class does very little. Its purpose is to ensure that K-9 remains running while push connections are established. Next, the SleepService class is used to delay push reconnection on error. Finally, the NotificationActionService class has methods to delete, archive, move and mark messages.
In the following Account Diagram, the Account class has all the methods needed to retrieve information from the email provider's server. This includes showing respective folders and messages within these folders. Next the SearchAccount class has methods to search for specific messages.
The following message diagrams are all related. The MessagingController as a key class is responsible for syncing and handling user actions. For example, it has methods to queue synchronization of messages. A message is comprised of Parts. The type of part actually used depends on whether the message is a RemoteMessage, waiting for download, mid-download (MemoryParts) or stored in the database (LocalPart).






