Warning, /pim/kontact/Thoughts is written in an unsupported language. File is not indexed.
0001 * Note: Lines starting with a d are my comments - Daniel 0002 * Note: Lines starting with a # are my comments - Cornelius 0003 * Note: Lines starting with a "z" are my comments - Zack :) 0004 * Note: Lines starting with a "s" are my comments - Simon 0005 * Note: Lines starting with a "Don:" are my comments - Don 0006 * Note: Lines starting with a "g" are my comments - Guenter 0007 * Note: Lines starting with a "m" are my comments - Matthias Kretz 0008 * Note: Lines starting with a "MiB:" are my comments - Michael 0009 * Note: Lines starting with a "h" are my comments - Holger 0010 0011 Misc: 0012 ===== 0013 0014 Configuration Merge 0015 ------------------- 0016 0017 d Idea: The KOffice way of life: Offer a method that adds a given wiget of a 0018 d predefined type as page in a KDialogBase or offer a pointer to a KDialogBase 0019 d -> requires a Kontact part or an external lib per part 0020 0021 m I believe this is a more general problem. Please take a look at 0022 m kdegraphics/kview/kpreferences{dialog,module}.{h,cpp}. I'd like to generalize 0023 m these classes and include them into kdelibs (the same configuration merge is 0024 m being done in Kate, Noatun, Kopete, KView and probably more). 0025 0026 # The problem is even more generic. We also have to merge about boxes, tips of 0027 # the day and maybe more. 0028 0029 0030 Merged Foldertree View 0031 ---------------------- 0032 0033 d Idea: Let the part send a description of their folders and reaction to calls 0034 d as XML, similar to XMLGUI 0035 0036 # Is a folder tree really the right tool to represent events, todos or 0037 # contacts? 0038 0039 MiB: On the one hand, Notes can be hierarchic, so a folder tree would be the 0040 MiB: nearest solution... 0041 0042 z I think so. Applications could send the root of their tree to 0043 z Kontact so that the interface looks like 0044 0045 - Mail 0046 | \ 0047 | - Local Folders 0048 | \ 0049 | Inbox 0050 | | 0051 | Thrash 0052 | | 0053 | Sent 0054 - Notes 0055 | \ 0056 | Notes 1 0057 | | 0058 | Notes 2 0059 | 0060 - Events 0061 \ 0062 Event 1 0063 | 0064 Event 2 0065 0066 z which is not that bad. The question would be how to render the tree 0067 z on the Kontact side while keeping the items on the parts side ( because 0068 z e.g. KMails hold custom pixmaps for the folders which had to be 0069 z displayed in the Kontact tree). 0070 0071 g I'm currently having 248 events. A tree is a very bad solution to visualize 0072 g them. selecting "Events" in the tree should just only start the korganizer 0073 g part. 0074 0075 MiB: ...OTOH... yes, /me agrees with g, a folder tree becomes complex quite fast. 0076 0077 Don: The folder tree makes sense for advanced users, but I think 0078 Don: the simplicity of the current navigator widget has advantages for 0079 Don: non power users. 0080 Don: 0081 Don: Actually instead of the navigator widget I think it makes sense 0082 Don: to consider reusing the widget choosing widget in the latest 0083 Don: version of the Qt designer, which in a sense can be 0084 Don: considered a generalization of the navigator widget. And could 0085 Don: make the folder tree in kmail unnecessary. 0086 Don: 0087 Don: I might investigate the Qt designer widget further but if someone 0088 Don: else wants to look at a folder tree widget that's cool with me. 0089 0090 # I had a look at the Qt designer widget choosing widget. I think it has a 0091 # severe usability problem, because the buttons (or kind of tabs) which are used 0092 # to access the widget subgroups are not always at the same place but move 0093 # around when you click on them. Depending on which group is shown, the button 0094 # is at the top or at the bottom of the widget. In my opinion this solution is 0095 # unacceptable. 0096 0097 # But Daniel had a good idea how to improve that. It looks similar to the Qt 0098 # designer widget, but it opens the current group always at the top of the 0099 # widget and only highlights the current group in the list at the bottom, but 0100 # doesn't move it. This seems to also be the way Outlook does it. 0101 0102 Don: Guenter, agree. 0103 Don: Wouldn't the idea to be to show calendars in the tree or 0104 Don: navigator widget, rather than individual events? 0105 0106 # Yes, that makes sense. Calendars are much more similar to mail folders than 0107 # single events. You wouldn't integrate individual mails in the folder tree, 0108 # would you? 0109 0110 d That raises an interesting point: The KNotes plugin would not need an own 0111 d canvas in the WidgetStack then. It's sufficient to have the notes in the 0112 d folder view, an RMB menu on them and a "New Note" action. 0113 d So the new design must be able to catch that case (the current one does not). 0114 0115 # I think notes are on the same level as mails or events. They should be listed 0116 # in the view. KNotes would probably just create a single entry in the folder 0117 # tree. 0118 0119 0120 KNotes integration 0121 ------------------ 0122 0123 MiB: Which reminds me of my own concern about the 'how' of integrating KNotes: 0124 MiB: * the current solution is to start KNotes extern, it is not embedded in Kontact 0125 MiB: at all. Thus opening a note that is on another desktop either leaves the Kontact 0126 MiB: window or moves the note. Either not perfect. Also, Kontact is likely to cover 0127 MiB: notes that reside on the desktop, easy working is impossible. Which is the reason 0128 MiB: I don't like the current approach too much. 0129 MiB: * but there's always hope---my idea would be to show the notes in Kontact itself. 0130 MiB: Now I tend to say it's a bit intrusive to not allow starting KNotes and 0131 MiB: Kontact/KNotes at the same time which raises the following issues: 0132 MiB: - if KNotes and Kontact are running at the same time, changes to the notes have 0133 MiB: to be synchronized (not much of a problem). Changes to be synced are the 0134 MiB: text/contents itself, the text color/style..., the note color. Not sure about 0135 MiB: the note size. Not to be synced is the position. 0136 MiB: - so the position in Kontact has to be saved individually and independently 0137 MiB: of the real desktop position (realized by attaching two display config 0138 MiB: files, works in make_it_cool branch mostly). Kontact's size is generally 0139 MiB: smaller than the desktop. 0140 MiB: - normally notes are on a specific desktop, now they have to be displayed on one 0141 MiB: area---how to do this best? 0142 0143 MiB: what does M$ do? How do they manage the notes in their PIM app? (I don't know 0144 MiB: it, never seen that thing) 0145 0146 0147 Toolbar Items 0148 ------------- 0149 0150 d The KParts Technology only provides actions for the current part. It might be 0151 d desirable to have common actions that are always available. 0152 0153 Don: I agree that it is desirable to have common actions always 0154 Don: available (and parts too like the todo list) 0155 Don: 0156 Don: But are you sure Kparts is limited in this way? KOrganizer can load 0157 Don: multiple plugins simultaneously. And all of these plugins are kparts 0158 Don: (eg. birthday import), and kactions for all loaded plugins are 0159 Don: created and made available simultaneously. 0160 Don: 0161 Don: Yeah, I'm quite positive you can load multiple parts simultaneously. 0162 0163 # Certainly. Actions like "New Mail", "New Contact", "New Event" should be 0164 # available independently of a selected part. 0165 0166 Don: This is a very important issue, I think we need a library with three 0167 Don: methods: 0168 Don: KAddressBookIface loadKAddressBook() 0169 Don: KMailIface loadKMail() 0170 Don: KOrganizerIface loadKOrganizer() 0171 MiB: And don't forget KNotesIface loadKNotes() :-) 0172 0173 h: That doesn't sound extendable ;) 0174 h: So if I would like to add a 'New ShortMessage' part we would have to extend 0175 h: that library... better use KTrader and some sort of a common framework 0176 h: and Mib's comments shows that problem! 0177 0178 d: That's what KDCOPServiceStarter is for :) 0179 0180 Don: Now if kontact is running then loadX will load the X part in kontact 0181 Don: (if it is not already loaded) and return a dcop iface for that 0182 Don: part. 0183 Don: 0184 Don: If kontact is not running but is the users preferred application 0185 Don: then loadX will start kontact and then do the above. 0186 Don: 0187 Don: If kontact is not running and is not the users preferred application 0188 Don: then a standalone version of X should be started, and an iface for 0189 Don: that standalone app returned. 0190 Don: 0191 Don: I think this library should be in libkdepim ad all the kdepim apps 0192 Don: should be moved into kdepim, so their iface files all be in one 0193 Don: package. Or alternatively a new kdeinterfaces package be created 0194 Don: and used as a general repository for interface files. 0195 Don: 0196 Don: Another important issue is invokeMailer and the fact that currently 0197 Don: KDE just runs kmail with command line arguments by default. That has 0198 Don: to be made smarter. 0199 Don: 0200 Don: I guess when kmail is run with command line arguments it could 0201 Don: actually use loadKMail() and then use the resulting iface. 0202 Don: 0203 Don: And the same for all other loadX apps. 0204 0205 0206 Status Bar 0207 ---------- 0208 0209 d We need a more sophisticated handling (progressbar, etc) 0210 0211 Don: Definitely. 0212 0213 # We now have kdelibs/kparts/statusbarextension. This is intended to solve these 0214 # problems, right? 0215 0216 d: Right. Simply add it as childobject in your part and use it's API. Works even 0217 d: for other KPart hosts than Kontact 0218 0219 0220 Kontact plugin unification 0221 ------------------------- 0222 0223 # Currently all Kontact plugins look quite similar. It would be nice, if we 0224 # could provide infratructure to reduce duplicated code as far as possible. 0225 0226 d I thouht of a KontactPart, similar to a KOPart, if that makes sense. I don't think 0227 d a normal KPart is sufficient for us. 0228 0229 Don: I've spent quite a bit of time in all pim *_part files and IIRC 0230 Don: the amount of duplicated code, is pretty much negligible. 0231 Don: 0232 Don: But a KontactPart could make sense for when the parts want to communicate with 0233 Don: the container. Eg. if the parts want to add folders to the container 0234 Don: apps folder tree (or navigator) 0235 Don: 0236 Don: And maybe for communicating with the status bar. 0237 0238 0239 Communication/Interaction: 0240 ========================== 0241 0242 d Invoking parts when they are needed for the first time takes too long, 0243 d starting all takes too long on startup 0244 d Idea: Mark complex parts as basic parts that get loaded anyway 0245 0246 # parts could be loaded in the background based on usage patterns. Kontact could 0247 # remember which parts were used at the last session and load them in the 0248 # background after loading the initial part to be shown at startup. 0249 0250 z This idea seems to be similar to Microsoft's 0251 z hide-unused-item-in-the-menu strategy. But it probably mess up 0252 z kaddressbook integration. Although not used during every session 0253 z this part is needed and should be always loaded. This strategy 0254 z would be great for could-to-come parts, like a summary part. 0255 z Background loading of parts is OK. The idea is simple : load the 0256 z last used part on startup. Make sure its loading finishes and then 0257 z load the rest once the user can already interact with the last used 0258 z loaded part. 0259 0260 g why do we always need the addressbook? Is libkabc not sufficient? 0261 0262 Don: I guess my machine is too fast, starting parts is pretty quick here :-) 0263 0264 d DCOP is too slow, internal communication should be handled via a dedicated 0265 d interface, communication with external applications (i.e. knotes) should be 0266 d done via wrapper parts that communicate with their respective IPC method to 0267 d their application using the native protocol (DCOP, Corba, etc). 0268 0269 # Are you sure that DCOP is too slow for in-process communications? I thought it 0270 # would handle this special case efficiently. 0271 0272 s It is only efficient in the sense that it won't do a roundtrip to the server but 0273 s dispatch locally. What remains is the datastream marshalling. Not necessarily 0274 s ueberfast. But I think the point is a different one: It is simply not as intuitive 0275 s to use as C++. Yes, DCOPRef already helps a lot for simple calls, but talking to 0276 s remote components still requires one to do error checking after each method call. 0277 s in addition the stub objects one deals with (AddressBookIface_stub for example) 0278 s are no real references. To the programmer they look like a reference to a 0279 s remote addressbook component, but it really isn't. there is no state involved. 0280 s like if between two method calls on the stub the addressbook process gets restarted, 0281 s the state is lost and the programmer on the client side has no way to find out 0282 s about that. you'll end up with really complex code on the caller side to handle things 0283 s like that. 0284 0285 d Yes, but of course one should always prefer in-process IPC if possible. DCOP 0286 d currently _works_ for Kontact, but that's all about it. It isn't exactly elegant. 0287 d The only advantange of the current approach is that we can allow the user to 0288 d run one of the parts standalone. I am not really sure we want that. I used to find 0289 d it desirable, but I am not sure anymore. 0290 0291 MiB: But that's the whole idea behind Kontact---to be able to integrate apps 0292 MiB: _and_ to have standalone versions. Just think about KNotes... impossible 0293 MiB: to have it limited to only Kontact! 0294 0295 Don: I love being able to run the apps inside or outside of the 0296 Don: container, it's just really cool being able to choose I think it's a 0297 Don: great feature and users will really love having the 0298 Don: choice. Especially when they are migrating. 0299 0300 MiB: Definitely. 0301 0302 Don: I think if we use the loadX methods defined above then we can still 0303 Don: support this. I'm PRO DCOP. And this way we don't have to special 0304 Don: case of the code depending on whether the application is running in 0305 Don: a container app or not. 0306 Don: 0307 Don: I find difficult to imagine a function that DCOP is not fast enough 0308 Don: to support. It supports all our current PIM IPC needs fine. 0309 0310 MiB: yes, not too much against DCOP. But for KNotes I thought about turning 0311 MiB: a note into a plugin that can be loaded by Kontact and KNotes independently. 0312 MiB: like this, there's no DCOP necessary anymore and makes it much more flexible. 0313 MiB: e.g. usage of different display configs, a note embedded somewhere and having 0314 MiB: a parent or standalone on the desktop. 0315 0316 # Communication with external applications is something which doesn't fit too 0317 # well with the 'integrated' approach of Kontact. Is this really necessary? 0318 0319 d We won't get around it, think knotes, maybe sync tools, think abstract 3rd party 0320 d projects (not sure the latter is really that important, but we should consider it. 0321 d it barely plays a role anyway). 0322 0323 MiB: hm. true. But not too important, IMHO. Just add a Kontact-DCOP interface :-) 0324 0325 h: Pretty much to talk about... 0326 h: 1. the speed of DCOP is not that important. I worry more about the integration 0327 h: of all parts. So how would I cross reference an 'Event' with a 3rd party 0328 h: Kaplan Part? A common base class for all PIM records comes into my mind - again - 0329 h: Now with normal C++ you can pass a pointer through the framework 0330 h: Doing it with DCOP we need to marshall and demarshall it. This part can get really 0331 h: ugly if we want more tight integration of all KaplanParts. We could add 0332 h: a pure virtual method to marshall to a QDataStream. So now marshalling is done. 0333 h: For demarshalling we need to get the type of the QDataStream content and then we need 0334 h: to ask someone - a factory - to get a object for the type and then call another pure 0335 h: virtual..... 0336 h: The question is if this is really necessary 0337 h: 2. stand a lone apps 0338 h: The 'stand a lone' app can always run in the same address space but be a top level widget 0339 h: itself. WIth some DCOP magic clicking on the KMAIL icon code make Kaplan detach the part... 0340 h: 3. Integration! 0341 h: The goal of Kaplan should not be to merge some XML files an give a common Toolbar for 0342 h: X applications in one shell. I want true integration. Yes KMAIL can use KABC to show 0343 h: all emails for one contact but a generic way to do such things would be more than nice. 0344 h: It would be nice if I could relate the PIM objects in a common way. So I create an Event and 0345 h: relate some todos to it. So for KDE4 I want a common base class for all PIM classes including mail 0346 h: see Opies OPimRecord for a bit too huge base class 0347 0348 Security 0349 -------- 0350 0351 d If we use the kparts (ktrader) approach to find a parts by looking 0352 d for an application with the correct mime type this might raise security 0353 d problems. (Martin's concern) 0354 0355 # Looking up Kontact parts isn't based on mime types but on services of type 0356 # "Kontact/Plugin". This is just as save as starting a program statically linking 0357 # its parts. I really don't see any security concerns here. 0358 0359 d Ok, if we limit stuff to Kontact/Plugin and Kontact/Part that might be safe enough 0360 d indeed. I (and Martin, who raise this concern initially) was just afraid of 0361 d allowing "any" part. 0362 0363 h: hmm If somebody can install a Service into the global kde dir or the user kde home 0364 h: there is something else broken IMHO 0365 0366 0367 Summary View 0368 ------------ 0369 h: How would one best integrate a summary view into kontact? 0370 h: a) add a virtual QWidget *summary(const QDateTime&, QWidget* parent ); 0371 h: to get a summary widget for a day? 0372 h: b) use some sort of XML to UI to represent the summary information 0373 h: c) have a stand a lone part which opens the PIM data separately? ( How 0374 h: to synchronize access? ) 0375