8

I know i can use the iCalendar gem to generate the ics files I need to serve, but how would I go about serving them, readonly, via the CalDAV protocol in Rails?

Mohamed Hafez
  • 8,621
  • 7
  • 41
  • 49
  • looks like i could use the dav4rack gem, extend it to deal with the CalDAV request types, and create a custom resource that would generate ics files using the iCalendar gem... but just wondering if something like dav4rack already exists for CalDAV (dav4rack_ext gem does CardDAV but not CalDAV) – Mohamed Hafez Sep 27 '13 at 02:31
  • 1
    Ah! it looks like if i just want to serve up a readonly calendar, i dont need CalDAV at all, I can just serve an .ics file the way i would any other file, and Google Calendar and iCal can import it and will fetch or manually check it for updates!! – Mohamed Hafez Sep 27 '13 at 17:27

2 Answers2

6

If all you need is a readonly calendar like me, you don't need CalDAV at all, you can just serve up the .ics file the way you would any other file, and your users can import the calendar on Google Calendar, iCal, and other calendar apps. Be wary though that Google Calendar will only update every 12-24 hours unfortunately. iCal works beautifully though, updating every time you open the app and fetching at whatever interval you like in the background.

Mohamed Hafez
  • 8,621
  • 7
  • 41
  • 49
5

The disadvantage of serving the whole calendar in a single iCalendar entity (via HTTP GET) vs using CalDAV is that on every little change, you need to resend the whole calendar (all events - changed or not) back to the client.

With CalDAV you only need to send back the events which actually changed.

Doesn't matter for small calendars, but for large ones (which receive updates) the difference is obviously huge.

hnh
  • 13,957
  • 6
  • 30
  • 40