In this post I’ll talk a bit about the architecture of Opo Perspective. I wrote in my first post that this application should be very flexible and extensible. Here are some thoughts about this topic. Most of the ideas presented here are already realized, have a look at the source on CodePlex.
The mail messages’ way
The following graphic illustrates how a mail message makes it’s way from the mail server to the web page (click for larger view).

The MailStore is an external place, where the mail messages are received from. This could be any sort of mail server or, if the mail server is running on the same system for example, a directory with the mail messages.
The MailCache is an internal respository where the messages are saved. Messages displayed in the webmail are retrieved from the MailCache.
This is done through the MailService where also could be dealt with some business logic .
IPerspectivePipeline
There are two places where a PerspectivePipeline comes into play. The first one is intended to filter, tag, delete, … mails that are stored in the MailCache. In the graphic there's a SpamPipilinePlugin, which searches the message's header for such inserted by spam filters and adds a "Spam" tag to the message. This is one example how the pipeline could be used.
The second pipeline is intended to manipulate the message before displaying. One possibility would be to convert links in the text body of the message to html hyperlinks so they can be clicked within the message. Or we could prevent images from beeing shown initially and insert a link at the top of the message that loads the images on demand.
Since all involved classes are based on interfaces it's easy to write your own mail store, mail cache or pipeline plugin.
Because messages in Opo Perspective are based on the same interface (IPerspectiveEntity) like contacts, appointments etc. the same plugins can be used for these as well.
205ecd63-d10a-493f-8ea2-c8a809caff23|1|5.0