Skip to content

Overhaul database schema and abstraction layer

cketti edited this page May 3, 2011 · 1 revision

Overhaul database schema and abstraction layer

The goal of the project is to be able to store the structure of arbitrary complex MIME messages in the database for easy access and to be able to reconstruct a byte-identical copy of the original message. This is needed for common email encryption systems like PGP/MIME and S/MIME; but also for seemingly simple tasks like export of a single message or viewing the message source.

Additionally the database abstraction layer will be changed to better utilize the help Android provides with it's API.

Draft schedule

Prior to the GSOC start: Discuss the current drawbacks of the database schema with the other K-9 Mail developers and draft a new one.

Week 21: Write up/finalize the new database schema with feedback provided by my mentor and/or the other project members. (D1)

Week 22-23: Modify LocalStore (K-9 Mail class) to use the new database schema. Due to the design of LocalStore most of the other parts of the code should be unaffected by this change. (D2)

Week 24-26: Implement a ContentProvider that can be used to access the message database. This will enable us to simplify the UI code a lot later on. Implement a helper class that uses the newly created content provider to create the Message objects that represent an email. With this helper class I can change LocalStore to use the new content provider. (D3)

Week 27-29: Change MessagingController (central class in K-9 Mail) to use the new content provider based code instead of using LocalStore. This is the first step to get rid of LocalStore. This also brings us closer to the design of the AOSP Email application. (D4)

Week 30-31: Change the rest of the code base (mostly UI code) to use the new content provider based system. After this we should be able to retire LocalStore for good. (D5)

Week 32-33: Buffer in case one of the tasks takes longer than anticipated. This is also the time to clean up code, write missing Javadoc documentation, and prepare a merge with the master branch.

Deliverables

See above (deliverables are marked with Dx, e.g. D1). I'll try to implement the changes gradually so there will be a working version most of the time.