]> err.no Git - scalable-opengroupware.org/blob - dbd/README
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@47 d1b88da0-ebda-0310-925b-ed51d8...
[scalable-opengroupware.org] / dbd / README
1 # $Id$
2
3 PostgreSQL Browser
4 ==================
5
6 Intention:
7 - fix open SOPE issues
8 - fix PostgreSQL issues, prepare low-level storage
9 - work towards SOGo from a storage point of view (with UI-X coming down from a
10   UI point of view)
11
12 SOPE Hierarchy
13 - /DBHOST/Databases/MYDB/MYTABLE/MYFIELD
14 - /DBHOST/Users/MYUSER
15 - /DBHOST/Databases/MYDB/MYTABLE/MYFIELD=MYPKEY
16
17 Class Hierarchy
18   DSoObject
19     DSoHost            "DBHOST"
20     DSoTable           "MYTABLE"
21     DSoDatabase        "MYDB"
22     DSoDatabaseManager "Database"
23     DSoUser            "MYUSER"
24     DSoUserManager     "Users"
25     DSoField           "MYFIELD"
26
27 Tricks used
28 ===========
29
30 - *always* remember that SOPE objects which are looked up in the traversal
31   process are conceptually *UI* objects, not datamodel objects (though this
32   might be done for simplistic applications)
33   - the idea is: the URL is UI
34
35 - small hack in MainPage.m to make a redirect to a "valid" WO URL if the
36   request-handler-key is missing
37   - should be made by SOPE itself?
38
39 - own authenticator object
40   - two different authenticators (with dbname available and without)
41
42 - a hack in the SoApplication -lookupName: to differentiate between
43   'hostnames' and resources
44
45 - in DSoObject we extract login/password from the basic auth
46   - SOPE does all the authentication for SOPE level objects, but if we
47     want to reuse passwords, we need to do that manually
48   - we reuse an HTTP parsing method from SoHTTPAuthenticator
49
50 - could -sleep to tear down transient state (not used)
51   - -sleep is called by the SoObjectRequestHandler
52   - Note: also supports -_sleepWithContext:
53
54 - note that the EOAdaptor is created by the object, but the channel is created
55   by the method (the component)
56   - the object itself is not really active, the methods should be active
57   - the distinction here is blur, in general I would avoid methods which would
58     require an [[WOApplication application] context]
59
60 - we are not really clever with DSoUserManager and DSoDatabaseManager,
61   those two classes are basically identical
62
63 - the "GET" method is explicitly mapped in product.plist for the application
64   object because otherwise "GET" will be treated as a hostname (because we
65   perform no check on the hostname!)
66   - need to check whether we can make SOPE smarter on this front, but I guess
67     that issue is inherent to all containers which map to arbitary, external
68     collections
69   - we could create an EOAdaptor and connect it to 'template1', but this would
70     result in one unnecessary DB connection?
71   - Note: this is not a problem for methods which are registered in 
72           products.plist - those are found in the SoClass. But the system
73           checks for some keys during its traversal process (and expects 
74           getting a nil if the key does not exist).
75
76 - when redirecting to the DSoHost object, we need to ensure that we add a slash
77   - otherwise the relative URLs will be broken!
78   - in theory SOPE should make a redirect to the default method, not sure why
79     this isn't happening
80   - ZideStore always makes such a redirect?
81   - maybe any folderish object when being at the end of a traversal stack 
82     should check that?
83
84 - acquisition
85   - if you override -lookupName:inContext:acquire:, you should probably
86     disable acquire in super calls! - otherwise all name processing code 
87     coming after the [super lookup..] is overridden by objects in the 
88     acquisition mechanism
89   - note that acquisition is also done on the traversal path! if the lookup
90     returns nil on an URL path being traversed, URL acquisition will occure
91     (except on non-acquisition protocols like WebDAV)
92
93 - baseURL
94   - calculation of base URL requires you to either override -baseURLInContext:
95     or implement -container and -nameInContainer
96
97 - enabling WebDAV
98   - implemented -isCollection in DSoObject
99   - per default the baseURL is broken - you need to ensure that it returns
100     a proper value, see above
101     - if the baseURL doesn't match the requested WebDAV URL, we run into
102       problems, maybe need to fix something in the SOPE WebDAV layer here