Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 10368|回复: 0
打印 上一主题 下一主题

Mail client architecture overview

[复制链接]

165

主题

269

帖子

957

积分

认证用户组

Rank: 5Rank: 5

积分
957
跳转到指定楼层
楼主
发表于 2017-1-18 19:55:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
https://developer.mozilla.org/en ... chitecture_overview

The mail reader
Gecko (XUL and HTML rendering)
RDF
(dynamic widgets)
JS
(menus, events)
libmime
Mail Datasources
Mail JavaScript
Folder/Message management
msgdb

IMAP/NNTP/POP3
Necko
(networking)
Sections in grey refer to modules outside of mail/news
The base Module
The base module provides a generic interface to a set of protocol-independant messaging services. This includes management of accounts, folders and messages.
The base module consists of the following basic building blocks
  • Account Management - The Account Manager is the root object of the server/folder/message hierarchy. It manages individual accounts on mail servers and the identity of users as used to send mail.
  • Folders - Mail folders contain messages and folders. All folders have folder indexes.
  • Messages - Messages are always stored and streamed in RFC822 format. Whenever multiple messages are stored in one file, the berkeley mailbox format is used.
  • Datasources - Datasources are the glue code that reflect mail data such as folders and messages into RDF. RDF will use the datasource to create user interfaces based on this data. Datasources are also used to run commands that operate on this mail data.
  • Events - As data changes throughout the mail application, the event system notifies key components such as datasources and the URL system of these changes.
  • Mail Window Management - Each mail window maintains a certain amount of state to aid in view navigation, progress display, etc.
  • URL display and dispatching - In order to perform network operations such as downloading new mail, copying and moving messages, and displaying messages from a remote server, the URL system interacts with necko and reflects it's state to the mail window.
There are also a number of protocol independant subsystems that have a symbiotic relationship with base:
  • libMIME - for dealing with RFC822 messages and their MIME parts. This library has the cabability to stream messages to an HTML renderer such as Gecko, manage individual parts of messages, and so forth.
  • msgdb - A message database for a given folder is a summary of some of the key attributes in a folder such as the Author and Subject.
Finally, there are larger modules outside of the mail client that are mail-oriented. Most of these modules have little dependancy on the mail reader itself:
  • Compose - The mail compose module is responsible for anything that has to do with sending mail. This includes the mail compose window, creation of RFC822 messages from the data a user has entered, and sending the messages via SMTP.
  • Address book - The address book contains lists of people and all attributes associated with them such as their e-mail address, phone number, etc.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-4-26 00:21 , Processed in 0.055739 second(s), 19 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表