Sunday, January 24, 2010

Open-Xchange Support for Akonadi

My colleague at credativ GmbH, Roland Wolters, has already blogged about it, KDE 4.5 will have decent support for the Open-Xchange groupware server again. Today I moved the Akonadi resource from trunk/playground/pim to trunk/kdepim/runtime/resources, so it should be a bit easier to test it for the brave ones of you. KDE 3 already had a resource (based on the old KResource framework) that supported Open-Xchange, however it also contained code for accessing the SLOX (SuSE Linux Open Xchange) groupware server, which is discontinued in favor of Open-Xchange. So the new resource dropped support for SLOX, which makes the code a lot cleaner and easier to understand ;) Furthermore the Akonadi framework provides most of the useful stuff like handling offline mode or providing a cache, so these features we got for free in the new resource.


So if you want to test the Open-Xchange support, at first you need a Open-Xchange server to connect to... in my case I was allowed to use the company server for testing and development, so the boring work of setting up a server was already done ;) However there are several HOWTOs available on the Internet, so if you have no working server yet, it's only a question of diligence. The next step is to add the Open-Xchange resource to Akonadi. As early tester you can start the akonadiconsole executable from console and choose the 'Open-Xchange Groupware Server' resource. Now the configuration dialog appears where you can enter the URL to the server and the login credentials:




The dialog also provides a button for testing whether the connection can be established. In my setup, the server is running on the company host and port 433 is forwarded via SSH to my local port 1443, therefor the strange URL ;)


After the configuration dialog is closed, the initial loading of the data is started and when this is done, you should see all available folders of the Open-Xchange server in the collection tree:



Every user has her own private address book, calendar and task list under 'Private Folder'. You can add additional folders there from within KAddressBook and KOrganizer. Below 'Public Folders' the folders are listed where all users have read/write permissions for. 'Shared Folder' contains sub folders which have been published by co-workers with restricted permissions. The 'System Folder' contains the global, LDAP based, address book. If you start KAddressBook now, all address book folders will be listed there:



As you can see, all contacts from the web interface show up in KAddressBook as well. In opposite to the old resource, the new one has support for contact groups, so all distribution lists from the server are accessible in KAddressBook now. Starting the Akonadi based KOrganizer from trunk will show you the following:




Both, the private calendar and task list show up and can be included into the current view. Again you can see all events from the web interface in KOrganizer as well.


So porting the old resource to Akonadi was really fun, because this time we have a stable base (read Akonadi) we can rely on and most of the difficult to implement stuff you get for free. The rough port took me around 10 hours (including a lot of code cleanup), so I want to encourage everybody to give it a try to implement new resources or port existing ones to Akonadi, because without the resources the new shiny applications are quite useless ;)

5 comments:

KAMiKAZOW said...

I wonder why many KDE programmers don't pick an icon from the Oxygen set for their application (see 1st screenshot).
Is this some evil plot to make KDE apps unpolished?

Will Stephenson said...

I imagine that there is not yet a specific openXchange icon yet, but it's really easy to fix by using generic icons. Furthermore since Akonadi resources are cross-desktop the icon should be in the hicolor set.

If you see a missing icon in KDE, identify the .desktop file for the app, plugin, resource or whatever that is missing an icon - Tobias kindly indicated where they are for the OX resource - and add an 'Icon=<iconname-selected-from-/usr/share/icons/hicolor' line to the .desktop file. Make a patch and send it to the app author, mailinglist or reviewboard.kde.org if the app uses it.

Knut said...

You guys rock. I was desperately waiting for this since now I can sync to my work calendar and stuff. I really appreciate the work you do, thank you so much!

KAMiKAZOW said...

@Bille:
Well, why not pick a fitting icon right during development?
If there is none, pick the next best thing and open a bug report against Oxygen.
No matter what: Everything is better than no icon at all and waiting for other people to clean up.

Unknown said...

BUG
(sorry for posting here, but found no better place to do so)

After akonadi start-up, when the network is up but the server is not rechable, the akonadi resource shows the password in plain text in at least one warning-pop up:

http://141.76.82.110/~stth/akonadi-ox-bug.png

Warnings btw: If the server is offline or if my computer is offline it doesn't stop to annoy with several of such warnings every 1 to 2 minutes. Why so many messages when only one server connection is lost? And why in such a short cycle time?