If you add the ICSExportPlugin, you can generate full calendars. This is not a standard caldav thing, as caldav exposes every event and task as a separate resource.
More info here:
http://code.google.com/p/sabredav/wiki/ICSExportPlugin
>
> 2) Related to the above question, I can create new calendars by
> interacting directly with the db, but how do I do this in a more
> RESTful way and how to I actually store calendar data? Surely I don't
> have loads of .ics files laying around?
Creating a new calendar is done with the MKCALENDAR http method.
http://tools.ietf.org/html/rfc4791#section-5.3.1
SabreDAV is fully based on the CalDAV specification, so any questions like these are mostly answered in the RFC. I understand it can be complex text to understand though, so if you need specific pointers, let me know.
SabreDAV 1.6.0 will allow you to create new calendars through the web interface.
>
> 3) I guess this is the most fundamental question that leads to most of
> my misunderstanding. I know how to rewrite backend classes to provide
> ways of interacting directly with the db. I've already written an
> almost complete calendar system based simply on standard MVC
> principals. I expected to be able to get SabreDAV to work in a RESTful
> way and allow me to interact with an existing API via HTTP requests.
> That way it wouldn't matter if those requests were being generated
> from my web app or from iCal, for example. Have I completely
> misunderstood the purpose of and how SabreDAV works?!?!?
If you use SabreDAV as your datastore, there is no need to rewrite the backends. You need to rewrite the backends if you are specifically interested in storing all the data in a different way.
If your just want to connect your webserver to a running SabreDAV server (or any other CalDAV server for that matter) you will need to follow the CalDAV protocol.
There's definitely some reading and researching you'll need to do to understand both WebDAV and CalDAV. A good way to get a 'feel' for how it works, is by firing up an existing client (such as Thunderbird, Evolution or iCal) and see what it's sending to the server and what it's getting back.
You basically will be implementing another client, so it's best to learn from what's out there. A good tool to see what's being sent back and forward is Charles HTTP proxy:
It's not free, but there's at trail that exists after 30 minutes.
Evert
> Thanks so much for this. I've read through the specification and
> that's made things alot clearer. So, the first thing I tried to check
> everything was working was to make an OPTIONS request on the server
> root. Unfortunately it didn't return what I was expecting. This is
> what was sent:
>
> OPTIONS /myapp/sabre/index.php HTTP/1.1
> Authorization: Digest username etc etc
> Host: localhost:8888
> Content-Length: 0
> Content-type: application/x-www-form-
>
> And it returned a code 200 but no body.
OPTIONS does not need to return a body. The interesting stuff coming back from an OPTIONS request is the 'Dav:' header, and the 'Allows:' header.
Evert