CalDAV - it's hard!
Over the past little while I've been working on a CalDAV library, and it's tough!
It appears that the spec is very much implemented with the client, rather than the server in mind. The spec writers have left no stone unturned, and it's technically possible to query the server for any odd dataset you might need. Aside from that the authors made absolutely sure there were no duplicated efforts, and built heavily upon the existing WebDAV, WebDAV ACL extensions and iCalendar.
While I generally agree it's a wise thing to not reinvent the wheel, I'm a bit of a pragmatist and feel the complexity of all these layers make it hard to understand, and must have played/will play a factor in the arguably slow adoption rate.
To keep it short, I feel the authors have over-engineered/abstracted the specification. Instead of making simple API's that work for 90% of the usecases, they have gone a much more generic route. This makes it very hard to predict how CalDAV clients will be using the server. Also, it makes it quite difficult to optimize and fit in a simple relational database or existing calendaring software. CalDAV should IMHO just have been a simple CRUD system. Advanced features and reports could have been made optional, and should have been specialized for common usecases.
Incomplete view of Web/CalDAV dependencies
This was a graph I used in an earlier post. There's actually a few more specs that are relevant to the implementor.
GroupDAV
GroupDAV deserves a mention here, as it attempts to address most of the issues I have. What it lacks is adoption from ICal, Sunbird and MS Outlook. The only issue I have is the frowned upon use of the PUT method (spec), where POST really should have been used.
Some examples
These will be highly uninteresting unless you have an intimate knowledge of the specs.
New calendars/events/todo's are created using PUT. This means the client now determines the unique id given to any of these objects. Most people will want to integrate CalDAV with systems which already have a different primary key, these people will be required maintaining 2 different id's and ensure there are never any duplicates. The id generated by the client can be any url encoded string. Note that this wouldn't have to be a problem if some POST statement would have been used.
CalDAV requires support for the expand-properties report from rfc 3253. In a nutshell the expand-properties report will look for WebDAV properties containing CalDAV also requires fully implementing the ACL spec. The main usecase for this is calendar sharing. While the ACL specification will give you infinite complexity in how to setup your access control, it's quite a bit of work to even send back all the appropriate information and error messaging if you're not actually interested in this feature. Making ACL an optional extension to CalDAV would have been easier for implementers IMHO.
Comments
dredzik •
I was looking forward to writing my own CalDAV lib for PHP. Will you publish your implementation? Maybe I could participate in writing your lib?Evert •
Hi Dredzik,Its definitely my plan to open source the lib as part of http://code.google.com/p/sabredav/
Help is also definitely needed, so if you're up for it, hit me up through the SabreDAV mailing list, or the contact form below.
Helge Heß •
"GroupDAV ... What it lacks is adoption from ICal, Sunbird and MS Outlook"Well, we develop a GroupDAV plugin for Outlook. And Sunbird has some GroupDAV support via the SOGo plugins. Evolution has a WebDAV addressbook (aka GroupDAV ;-)
Hence, its not as bad as it might sound :-)
PS: yes, Apple clients need full CalDAV and that probably won't change.