Don't share mailto
[kdepim.git] / kontact / Thoughts
blobe1a07c1fc9b01d382e8b067005d1d1850dd02234
1 * Note: Lines starting with a d are my comments - Daniel
2 * Note: Lines starting with a # are my comments - Cornelius
3 * Note: Lines starting with a "z" are my comments - Zack :)
4 * Note: Lines starting with a "s" are my comments - Simon
5 * Note: Lines starting with a "Don:" are my comments - Don
6 * Note: Lines starting with a "g" are my comments - Guenter
7 * Note: Lines starting with a "m" are my comments - Matthias Kretz
8 * Note: Lines starting with a "MiB:" are my comments - Michael
9 * Note: Lines starting with a "h" are my comments - Holger
11 Misc:
12 =====
14 Configuration Merge
15 -------------------
17 d Idea: The KOffice way of life: Offer a method that adds a given wiget of a
18 d predefined type as page in a KDialogBase or offer a pointer to a KDialogBase
19 d -> requires a Kontact part or an external lib per part
21 m I believe this is a more general problem. Please take a look at
22 m kdegraphics/kview/kpreferences{dialog,module}.{h,cpp}. I'd like to generalize
23 m these classes and include them into kdelibs (the same configuration merge is
24 m being done in Kate, Noatun, Kopete, KView and probably more).
26 # The problem is even more generic. We also have to merge about boxes, tips of
27 # the day and maybe more.
30 Merged Foldertree View
31 ----------------------
33 d Idea: Let the part send a description of their folders and reaction to calls
34 d as XML, similar to XMLGUI
36 # Is a folder tree really the right tool to represent events, todos or
37 # contacts?
39 MiB: On the one hand, Notes can be hierarchic, so a folder tree would be the
40 MiB: nearest solution...
42 z I think so. Applications could send the root of their tree to
43 z Kontact so that the interface looks like
45 - Mail
46   |    \
47   |     - Local Folders
48   |                    \
49   |                     Inbox
50   |                     |
51   |                     Thrash
52   |                     |
53   |                     Sent
54 - Notes
55   |    \
56   |     Notes 1
57   |     |
58   |     Notes 2
59   |
60 - Events
61         \
62          Event 1
63          |
64          Event 2
66 z which is not that bad. The question would be how to render the tree
67 z on the Kontact side while keeping the items on the parts side ( because
68 z e.g. KMails hold custom pixmaps for the folders which had to be
69 z displayed in the Kontact tree).
71 g I'm currently having 248 events. A tree is a very bad solution to visualize
72 g them. selecting "Events" in the tree should just only start the korganizer
73 g part.
75 MiB: ...OTOH... yes, /me agrees with g, a folder tree becomes complex quite fast.
77 Don: The folder tree makes sense for advanced users, but I think
78 Don: the simplicity of the current navigator widget has advantages for
79 Don: non power users.
80 Don:
81 Don: Actually instead of the navigator widget I think it makes sense
82 Don: to consider reusing the widget choosing widget in the latest
83 Don: version of the Qt designer, which in a sense can be
84 Don: considered a generalization of the navigator widget. And could
85 Don: make the folder tree in kmail unnecessary.
86 Don:
87 Don: I might investigate the Qt designer widget further but if someone
88 Don: else wants to look at a folder tree widget that's cool with me.
90 # I had a look at the Qt designer widget choosing widget. I think it has a
91 # severe usability problem, because the buttons (or kind of tabs) which are used
92 # to access the widget subgroups are not always at the same place but move
93 # around when you click on them. Dependening on which group is shown, the button
94 # is at the top or at the bottom of the widget. In my opinion this solution is
95 # unacceptable.
97 # But Daniel had a good idea how to improve that. It looks similar to the Qt
98 # designer widget, but it opens the current group always at the top of the
99 # widget and only highlights the current group in the list at the bottom, but
100 # doesn't move it. This seems to also be the way Outlook does it.
102 Don: Guenter, agree.
103 Don: Wouldn't the idea to be to show calendars in the tree or
104 Don: navigator widget, rather than individual events?
106 # Yes, that makes sense. Calendars are much more similar to mail folders than
107 # single events. You wouldn't integrate individual mails in the folder tree,
108 # would you?
110 d That raises an interesting point: The KNotes plugin would not need an own
111 d canvas in the WidgetStack then. It's sufficient to have the notes in the
112 d folder view, an RMB menu on them and a "New Note" action.
113 d So the new design must be able to catch that case (the current one does not).
115 # I think notes are on the same level as mails or events. They should be listed
116 # in the view. KNotes would probably just create a single entry in the folder
117 # tree.
120 KNotes integration
121 ------------------
123 MiB: Which reminds me of my own concern about the 'how' of integrating KNotes:
124 MiB: * the current solution is to start KNotes extern, it is not embedded in Kontact
125 MiB:   at all. Thus opening a note that is on another desktop either leaves the Kontact
126 MiB:   window or moves the note. Either not perfect. Also, Kontact is likely to cover
127 MiB:   notes that reside on the desktop, easy working is impossible. Which is the reason
128 MiB:   I don't like the current approach too much.
129 MiB: * but there's always hope---my idea would be to show the notes in Kontact itself.
130 MiB:   Now I tend to say it's a bit intrusive to not allow starting KNotes and
131 MiB:   Kontact/KNotes at the same time which raises the following issues:
132 MiB:     - if KNotes and Kontact are running at the same time, changes to the notes have
133 MiB:       to be synchronized (not much of a problem). Changes to be synced are the
134 MiB:       text/contents itself, the text color/style..., the note color. Not sure about
135 MiB:       the note size. Not to be synced is the position.
136 MiB:     - so the position in Kontact has to be saved individually and independently
137 MiB:       of the real desktop position (realized by attaching two display config
138 MiB:       files, works in make_it_cool branch mostly). Kontact's size is generally
139 MiB:       smaller than the desktop.
140 MiB:     - normally notes are on a specific desktop, now they have to be displayed on one
141 MiB:       area---how to do this best?
143 MiB: what does M$ do? How do they manage the notes in their PIM app? (I don't know
144 MiB: it, never seen that thing)
147 Toolbar Items
148 -------------
150 d The KParts Technology only provides actions for the current part. It might be
151 d desireable to have common actions that are always available.
153 Don: I agree that it is desireable to have common actions always
154 Don: available (and parts too like the todo list)
155 Don:
156 Don: But are you sure Kparts is limited in this way? KOrganizer can load
157 Don: multiple plugins simultaneously. And all of these plugins are kparts
158 Don: (eg. birthday import), and kactions for all loaded plugins are
159 Don: created and made available simultaneously.
160 Don:
161 Don: Yeah, I'm quite positive you can load multiple parts simultaneously.
163 # Certainly. Actions like "New Mail", "New Contact", "New Event" should be
164 # available independently of a selected part.
166 Don: This is a very important issue, I think we need a library with three
167 Don: methods:
168 Don: KAddressBookIface loadKAddressBook()
169 Don: KMailIface loadKMail()
170 Don: KOrganizerIface loadKOrganizer()
171 MiB: And don't forget KNotesIface loadKNotes() :-)
173 h: That doesn't sound extendable ;)
174 h: So if I would like to add a 'New ShortMessage' part we would have to extend
175 h: that library... better use KTrader and some sort of a common framework
176 h: and Mib's comments shows that problem!
178 d: That's what KDCOPServiceStarter is for :)
180 Don: Now if kontact is running then loadX will load the X part in kontact
181 Don: (if it is not already loaded) and return a dcop iface for that
182 Don: part.
183 Don:
184 Don: If kontact is not running but is the users preferred application
185 Don: then loadX will start kontact and then do the above.
186 Don:
187 Don: If kontact is not running and is not the users preferred application
188 Don: then a standalone version of X should be started, and an iface for
189 Don: that standalone app returned.
190 Don:
191 Don: I think this library should be in libkdepim ad all the kdepim apps
192 Don: should be moved into kdepim, so their iface files all be in one
193 Don: package. Or alternatively a new kdeinterfaces package be created
194 Don: and used as a general repository for interface files.
195 Don:
196 Don: Another important issue is invokeMailer and the fact that currently
197 Don: KDE just runs kmail with command line arguments by default. That has
198 Don: to be made smarter.
199 Don:
200 Don: I guess when kmail is run with command line arguments it could
201 Don: actually use loadKMail() and then use the resulting iface.
202 Don:
203 Don: And the same for all other loadX apps.
206 Status Bar
207 ----------
209 d We need a more sophisticated handling (progressbar, etc)
211 Don: Definitely.
213 # We now have kdelibs/kparts/statusbarextension. This is intended to solve these
214 # problems, right?
216 d: Right. Simply add it as childobject in your part and use it's API. Works even
217 d: for other KPart hosts than Kontact
220 Kontact plugin unification
221 -------------------------
223 # Currently all Kontact plugins look quite similar. It would be nice, if we
224 # could provide infratructure to reduce duplicated code as far as possible.
226 d I thouht of a KontactPart, similar to a KOPart, if that makes sense. I don't think
227 d a normal KPart is sufficient for us.
229 Don: I've spent quite a bit of time in all pim *_part files and IIRC
230 Don: the amount of duplicated code, is pretty much negligible.
231 Don:
232 Don: But a KontactPart could make sense for when the parts want to communicate with
233 Don: the container. Eg. if the parts want to add folders to the container
234 Don: apps folder tree (or navigator)
235 Don:
236 Don: And maybe for communicating with the status bar.
237         
239 Communication/Interaction:
240 ==========================
242 d Invoking parts when they are needed for the first time takes too long,
243 d starting all takes too long on startup
244 d Idea: Mark complex parts as basic parts that get loaded anyway
246 # parts could be loaded in the background based on usage patterns. Kontact could
247 # remember which parts were used at the last session and load them in the
248 # background after loading the initial part to be shown at startup.
250 z This idea seems to be similar to Microsoft's
251 z hide-unused-item-in-the-menu strategy. But it probably mess up
252 z kaddressbook integration. Although not used during every session
253 z this part is needed and should be always loaded. This strategy
254 z would be great for could-to-come parts, like a summary part.
255 z Background loading of parts is OK. The idea is simple : load the
256 z last used part on startup. Make sure its loading finishes and then
257 z load the rest once the user can already interact with the last used
258 z loaded part.
260 g why do we always need the addressbook? Is libkabc not sufficient?
262 Don: I guess my machine is too fast, starting parts is pretty quick here :-)
264 d DCOP is too slow, internal communication should be handled via a dedicated
265 d interface, communication with external applications (i.e. knotes) should be
266 d done via wrapper parts that communicate with their respective IPC method to
267 d their application using the native protocol (DCOP, Corba, etc).
269 # Are you sure that DCOP is too slow for in-process communications? I thought it
270 # would handle this special case efficiently.
272 s It is only efficient in the sense that it won't do a roundtrip to the server but
273 s dispatch locally. What remains is the datastream marshalling. Not necessarily
274 s ueberfast. But I think the point is a different one: It is simply not as intuitive
275 s to use as C++. Yes, DCOPRef already helps a lot for simple calls, but talking to
276 s remote components still requires one to do error checking after each method call.
277 s in addition the stub objects one deals with (AddressBookIface_stub for example)
278 s are no real references. To the programmer they look like a reference to a
279 s remote addressbook component, but it really isn't. there is no state involved.
280 s like if between two method calls on the stub the addressbook process gets restarted,
281 s the state is lost and the programmer on the client side has no way to find out
282 s about that. you'll end up with really complex code on the caller side to handle things
283 s like that.
285 d Yes, but of course one should always prefer in-process IPC if possible. DCOP
286 d currently _works_ for Kontact, but that's all about it. It isn't exactly elegant.
287 d The only advantange of the current approach is that we can allow the user to
288 d run one of the parts standalone. I am not really sure we want that. I used to find
289 d it desireable, but I am not sure anymore.
291 MiB: But that's the whole idea behind Kontact---to be able to integrate apps
292 MiB: _and_ to have standalone versions. Just think about KNotes... impossible
293 MiB: to have it limited to only Kontact!
295 Don: I love being able to run the apps inside or outside of the
296 Don: container, it's just really cool being able to choose I think it's a
297 Don: great feature and users will really love having the
298 Don: choice. Especially when they are migrating.
300 MiB: Definitely.
302 Don: I think if we use the loadX methods defined above then we can still
303 Don: support this. I'm PRO DCOP. And this way we don't have to special
304 Don: case of the code depending on whether the application is running in
305 Don: a container app or not.
306 Don:
307 Don: I find difficult to imagine a function that DCOP is not fast enough
308 Don: to support. It supports all our current PIM IPC needs fine.
310 MiB: yes, not too much against DCOP. But for KNotes I thought about turning
311 MiB: a note into a plugin that can be loaded by Kontact and KNotes independently.
312 MiB: like this, there's no DCOP necessary anymore and makes it much more flexible.
313 MiB: e.g. usage of different display configs, a note embedded somewhere and having
314 MiB: a parent or standalone on the desktop.
316 # Communication with external applications is something which doesn't fit too
317 # well with the 'integrated' approach of Kontact. Is this really necessary?
319 d We won't get around it, think knotes, maybe sync tools, think abstact 3rd party
320 d projects (not sure the latter is really that important, but we should consider it.
321 d it barely plays a role anyway).
323 MiB: hm. true. But not too important, IMHO. Just add a Kontact-DCOP interface :-)
325 h: Pretty much to talk about...
326 h: 1. the speed of DCOP is not that important. I worry more about the integration
327 h:    of all parts. So how would I cross reference an 'Event' with a 3rd party
328 h:    Kaplan Part? A common base class for all PIM records comes into my mind - again -
329 h:    Now with normal C++ you can pass a pointer through the framework
330 h:    Doing it with DCOP we need to marshall and demarshall it. This part can get really
331 h:    ugly if we want more tight integration of all KaplanParts. We could add
332 h:    a pure virtual method to marshall to a QDataStream. So now marshalling is done.
333 h:    For demarshalling we need to get the type of the QDataStream content and then we need
334 h:    to ask someone - a factory - to get a object for the type and then call another pure
335 h:    virtual.....
336 h:    The question is if this is really necessary
337 h: 2. stand a lone apps
338 h:    The 'stand a lone' app can always run in the same address space but be a top level widget
339 h:    itself. WIth some DCOP magic clicking on the KMAIL icon code make Kaplan detach the part...
340 h: 3. Integration!
341 h:    The goal of Kaplan should not be to merge some XML files an give a common Toolbar for
342 h:    X applications in one shell. I want true integration. Yes KMAIL can use KABC to show
343 h:    all emails for one contact but a generic way to do such things would be more than nice.
344 h:    It would be nice if I could relate the PIM objects in a common way. So I create an Event and
345 h:    relate some todos to it. So for KDE4 I want a common base class for all PIM classes including mail
346 h:    see Opies OPimRecord for a bit too huge base class
348 Security
349 --------
351 d If we use the kparts (ktrader) approach to find a parts by looking
352 d for an application with the correct mime type this might raise security
353 d problems. (Martin's concern)
355 # Looking up Kontact parts isn't based on mime types but on services of type
356 # "Kontact/Plugin". This is just as save as starting a program statically linking
357 # its parts. I really don't see any security concerns here.
359 d Ok, if we limit stuff to Kontact/Plugin and Kontact/Part that might be safe enough
360 d indeed. I (and Martin, who raise this concern initially) was just afraid of
361 d allowing "any" part.
363 h: hmm If somebody can install a Service into the global kde dir or the user kde home
364 h: there is something else broken IMHO
367 Summary View
368 ------------
369 h: How would one best integrate a summary view into kontact?
370 h: a) add a virtual QWidget *summary(const QDateTime&, QWidget* parent );
371 h:    to get a summary widget for a day?
372 h: b) use some sort of XML to UI to represent the summary informations
373 h: c) have a stand a lone part which opens the PIM data seperately? ( How
374 h:    to synchronize access? )