Diffstat (limited to 'development/pim/pimpaper/seperation.tex') (more/less context) (ignore whitespace changes)
-rw-r--r-- | development/pim/pimpaper/seperation.tex | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/development/pim/pimpaper/seperation.tex b/development/pim/pimpaper/seperation.tex new file mode 100644 index 0000000..544d5c1 --- a/dev/null +++ b/development/pim/pimpaper/seperation.tex | |||
@@ -0,0 +1,66 @@ | |||
1 | \section{Components of Opie PIM} | ||
2 | |||
3 | \subsection{The Record} | ||
4 | With our API everything is based on a OPimRecord, this record | ||
5 | got a Identifier which is unique to the Backend it belongs, it is | ||
6 | also possible to assign a new Unique Identifier (uid) on a newly | ||
7 | created OPimRecord.\\ | ||
8 | The OPimRecord allows to assign Categories this record is in, to get | ||
9 | a Rich Text summary of the content of the Record and finally to match | ||
10 | the content of the Record with a regular expression. | ||
11 | |||
12 | \subsection{The Frontend} | ||
13 | Opie PIM got Frontends to access Todos, Events and Addressees. Using | ||
14 | the default Constructor of either OTodoAccess, ODatebookAccess or | ||
15 | OContactAccess uses the default data. These Access methods offer | ||
16 | the common load, save, clear, reload methods and have all in common | ||
17 | to query for an example record, sort a list of records for specific | ||
18 | characteristics, and to match the content against a regular expression | ||
19 | and give access to the Records inside the database/storage.\\ | ||
20 | The Frontend provide a value based Interface and operates on Records | ||
21 | that inherit from OPimRecord and add extra task specific methods to it. | ||
22 | |||
23 | \subsection{ORecordList and Iterator} | ||
24 | The result of a query or the content of the database is a ORecordList. | ||
25 | To iterate over a ORecordList you can use the Iterator. The Iterators | ||
26 | behaves like the Iterators found in Qt and on dereferencing you get | ||
27 | the reference to the record. Internally the record is fetched just | ||
28 | in time. This delayed loading allows to exploit full power of the specific | ||
29 | Backend. | ||
30 | |||
31 | |||
32 | \subsection{The Backend} | ||
33 | The Backend is a template based interface that operates on OPimRecord | ||
34 | inherited data types. To implement the delayed loading the Backends | ||
35 | Implementation return only a list of UIDs and these get converted | ||
36 | to a OPimRecordList<T> by the Frontend. | ||
37 | |||
38 | \subsection{The cache and read ahead} | ||
39 | To speed up the repeated lookup of records, specially when iterating | ||
40 | over the OPimRecordList we've a cache in the Frontend which is filled | ||
41 | by the Backend and specially in the iterator case the Backend | ||
42 | can do a read ahead to fill the cache. | ||
43 | |||
44 | \subsection{Backend vs. Frontend} | ||
45 | The Frontend is meant to be used by the normal API user to access | ||
46 | and query the Records and to save it with different Backend to | ||
47 | a different file if needed. | ||
48 | The Backend is used to implement concrete storage such as XML, VCF | ||
49 | and SQL and exploit possible features of the chosen storage. For example | ||
50 | a SQL Backend can use the power of query, lookup, sorting of the database | ||
51 | and do true delayed loading of records whereas the XML resource on | ||
52 | a simple file-system normally can't (XMLLiveConnect on ReiserFS). On remote | ||
53 | Backends such as LDAP one might want to use delayed initialisation and | ||
54 | fetching of records as well. Due the clean separation of Frontend and Backend | ||
55 | this is possible but the ease of development and deployment | ||
56 | of both Backends and Frontend remain. | ||
57 | |||
58 | \subsection{Occurrences} | ||
59 | A Frontend/Backend can be queried to include OPimRecords for a | ||
60 | period of time. Traditionally this only applies to Events but | ||
61 | with the Opie1.2 revision of PIM this can also be applied to | ||
62 | Todo, Address and Notes. | ||
63 | It behaves similar to OPimRecordList and supports the delayed | ||
64 | loading of Records. | ||
65 | |||
66 | %TODO implement it.... :} | ||