Its Time To Share: Calendar Data Interchange - PowerPoint PPT Presentation

About This Presentation
Title:

Its Time To Share: Calendar Data Interchange

Description:

'Bastille Day','7/14/2006', ,,,'true','','3','' 46. Palm Date Book Archive. Palm binary format ... 7368 6174 204d 6173 6569 0100 0000 0000 ille Day. ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 52
Provided by: GlennTo2
Learn more at: https://www.radwin.org
Category:

less

Transcript and Presenter's Notes

Title: Its Time To Share: Calendar Data Interchange


1
Its Time To ShareCalendar Data Interchange
  • Michael J. Radwin, Yahoo! Inc.
  • David Sklar, 24 Hour Laundry

OReilly Open Source Convention August 4, 2005
2
What youll learn today
  • iCalendar (RFC 2445) is the One True interchange
    format
  • Conforming to the iCalendar spec is easier said
    than done
  • LAMP is the ideal tool to generate dynamic
    iCalendar data
  • Time Zones cant live with em, cant live
    without em

3
Thirty Days Hath September
4
February 30, 1712
5
Calendar Software
Apple iCal
Lotus Notes
OSAF Chandler
Mozilla Sunbird
Palm Desktop
6
Supported Import Formats
7
iCalendar the De Facto Standard
  • BEGINVCALENDAR
  • PRODID-//Acme Software\, Inc./ExampleCalApp
    1.2.3//EN
  • VERSION2.0
  • CALSCALEGREGORIAN
  • BEGINVEVENT
  • SUMMARYHTTP Caching and Cache-busting
  • DTSTARTTZIDUS/Pacific20050804T172000
  • DURATIONPT45M
  • ENDVEVENT
  • BEGINVEVENT
  • SUMMARYTax Day
  • DTSTARTVALUEDATE20060415
  • DTENDVALUEDATE20060416
  • ENDVEVENT
  • ENDVCALENDAR

8
Generating Calendar Data with LAMP
9
cal.sql
  • Schema for table to hold event data

10
Event.php
  • Classes to generate iCalendar output

11
config.php
  • Basic app/DB configuration

12
calendar.php
  • Generate iCalendar output

13
list.php
  • Display human-readable (but ugly) event summary
    for debugging

14
add.php
  • Add a new event

15
iCalendar TIMTOWTRI
  • There Is More Than One Way To Represent It

16
iCalendar Event (Start End)
  • BEGINVEVENT
  • SUMMARYIce Cream Social
  • LOCATIONExhibit Hall
  • DTSTARTTZIDUS/Pacific20050804T152000
  • DTENDTZIDUS/Pacific20050804T163000
  • UID5FFB146A-8F4A-480E-B0B9-EC302B5DD8B6
  • ENDVEVENT

17
iCalendar Event (Start Duration)
  • BEGINVEVENT
  • SUMMARYIce Cream Social
  • LOCATIONExhibit Hall
  • DTSTARTTZIDUS/Pacific20050804T152000
  • DURATIONPT1H10M
  • UID5FFB146A-8F4A-480E-B0B9-EC302B5DD8B6
  • ENDVEVENT

18
iCalendar Event (GMT)
  • BEGINVEVENT
  • SUMMARYIce Cream Social
  • LOCATIONExhibit Hall
  • DTSTART20050804T222000Z
  • DURATIONPT1H10M
  • UID5FFB146A-8F4A-480E-B0B9-EC302B5DD8B6
  • ENDVEVENT

19
iCalendar Event (Floating Time)
  • BEGINVEVENT
  • SUMMARYIce Cream Social
  • LOCATIONExhibit Hall
  • DTSTART20050804T152000
  • DURATIONPT1H10M
  • UID5FFB146A-8F4A-480E-B0B9-EC302B5DD8B6
  • ENDVEVENT

20
iCalendar Interop Hurdle
  • All-day Untimed Events

21
All-day Untimed Event
  • BEGINVEVENT
  • SUMMARYMoms Birthday
  • DTSTART20050507T000000
  • DTEND20050507T235959
  • RRULEFREQYEARLY
  • UID15369079-4F9A-4D0A-9ABF-EC5F2F5F1C7F
  • ENDVEVENT

22
All-day Untimed Event
  • BEGINVEVENT
  • SUMMARYMoms Birthday
  • DTSTART20050507T000000
  • DTEND20050508T000000
  • RRULEFREQYEARLY
  • UID15369079-4F9A-4D0A-9ABF-EC5F2F5F1C7F
  • ENDVEVENT

23
All-day Untimed Event
  • BEGINVEVENT
  • SUMMARYMoms Birthday
  • DTSTARTVALUEDATE20050507
  • RRULEFREQYEARLY
  • UID15369079-4F9A-4D0A-9ABF-EC5F2F5F1C7F
  • ENDVEVENT

24
All-day Untimed Event
  • BEGINVEVENT
  • SUMMARYMoms Birthday
  • DTSTARTVALUEDATE20050507
  • DURATIONP1D
  • RRULEFREQYEARLY
  • UID15369079-4F9A-4D0A-9ABF-EC5F2F5F1C7F
  • ENDVEVENT

25
All-day Untimed Event
  • BEGINVEVENT
  • SUMMARYMoms Birthday
  • DTSTARTVALUEDATE20050507
  • DTENDVALUEDATE20050507
  • RRULEFREQYEARLY
  • UID15369079-4F9A-4D0A-9ABF-EC5F2F5F1C7F
  • ENDVEVENT

26
All-day Untimed Event
  • BEGINVEVENT
  • SUMMARYMoms Birthday
  • DTSTARTVALUEDATE20050507
  • DTENDVALUEDATE20050508
  • RRULEFREQYEARLY
  • UID15369079-4F9A-4D0A-9ABF-EC5F2F5F1C7F
  • ENDVEVENT

27
Calendar Scheduling Protocols
28
iCalendar Interchange Protocols
29
iMIP Scheduling via Email
  • BEGINVCALENDAR
  • METHODREQUEST
  • BEGINVEVENT
  • SUMMARYPHP 7 Planning and Pub Crawl
  • DTSTARTTZIDUS/Pacific20050804T193000
  • DTENDTZIDUS/Pacific20050805T020000
  • ORGANIZERCN"Michael Radwin"MAILTOmichael_at_radwi
    n.org
  • ATTENDEECN"Rasmus Lerdorf"PARTSTATNEEDS-ACTION
    ROLEREQ-PARTICIPANTRSVPTRUEmailtorasmus_at_php.
    net
  • ATTENDEECN"David Sklar"PARTSTATNEEDS-ACTIONRO
    LEREQ-PARTICIPANTRSVPTRUEmailtosklar_at_sklar.co
    m
  • ATTENDEECN"Adam Tberg"PARTSTATNEEDS-ACTIONRO
    LEREQ-PARTICIPANTRSVPTRUEmailtoadam_at_trachtenb
    erg.com
  • DTSTAMP20050530T010553Z
  • ENDVEVENT
  • ENDVCALENDAR

30
iMIP Reply
  • BEGINVCALENDAR
  • METHODREPLY
  • BEGINVEVENT
  • SUMMARYPHP 7 Planning and Pub Crawl
  • DTSTARTTZIDUS/Pacific20050804T193000
  • DTENDTZIDUS/Pacific20050805T020000
  • ORGANIZERCN"Michael Radwin"MAILTOmichael_at_radwi
    n.org
  • ATTENDEECN"Rasmus Lerdorf"PARTSTATACCEPTEDROL
    EREQ-PARTICIPANTRSVPTRUEmailtorasmus_at_php.net
  • DTSTAMP20050705T052030Z
  • ENDVEVENT
  • ENDVCALENDAR

31
Scheduling with CalDAV
  • CalDAV is the future
  • iMIP still valid for async scheduling

32
Time Zones
33
How Many Time Zones in the USA?
34
What Time is it in Oregon?
35
What Time is it in Oregon?
36
What Time is it in Indiana?
37
What Time is it in Indiana?
38
What Time is it in Indiana in 2006?
  • Indiana will observe DST next year
  • Will spring ahead _at_ 2am on April 2 06
  • 77 yellow counties

39
Dakotas and Nebraska
40
Florida
41
Texas
42
Dont Worry, Its Not That Bad
  • Luckily, you can get free data from the National
    Weather Service
  • OST/SEC GIS Map Group
  • Time Zones for 3200 counties
  • Join with ZIP Code data
  • 43,000 ZIPs from Census Bureau

43
Other Calendar Formats
44
vCalendar 1.0
  • The Electronic Calendaring and Scheduling
    Exchange Format
  • Published Sep. 1996
  • versit Consortium, later Internet Mail Consortium
  • File extension .vcs
  • Why bother?
  • Ancestor of iCalendar
  • Still used by legacy apps
  • BEGINVCALENDAR
  • VERSION1.0
  • BEGINVEVENT
  • CATEGORIESMEETING
  • STATUSTENTATIVE
  • DTSTART19960401T033000Z
  • DTEND19960401T043000Z
  • SUMMARYYour Proposal Review
  • DESCRIPTIONSteve and John to review newest
    proposal material
  • CLASSPRIVATE
  • ENDVEVENT
  • ENDVCALENDAR

45
Comma Separated Values
  • Microsoft proprietary schema for calendar data
  • File extension .csv
  • Why bother?
  • High-fidelity interchange with Outlook
  • Why avoid?
  • No timezone concept
  • Does 6/2/2005 represent June 2nd or February 6th?
  • "Subject","Start Date", "Start Time","End
    Date","End Time","All day event","Description","Sh
    ow time as","Location"
  • "Project XYZ Review", "11/16/1998","430 PM",
    "11/16/1998","700 PM", "false","","4","Conference
    Room 23A"
  • "Bastille Day","7/14/2006", ,,,"true","","3",""

46
Palm Date Book Archive
  • Palm binary format
  • Palm Desktop for Windows only
  • Stores dates as POSIX time (seconds since
    midnight Jan 1 1970 UTC)
  • File extension .dba
  • Why bother?
  • Lossless interchange with PalmOS via Windows
  • 0001 4244 1064 6566 6175 6c74 5f75 7365
    ..BD.default_use
  • 722e 6462 6100 0800 0000 0000 0000 3600
    r.dba.........6.
  • 0000 0f00 0000 0000 0000 0100 0000 0200
    ................
  • 0000 0f00 0100 0100 0100 0300 0100 0500
    ................
  • 0100 0500 0600 0600 0100 0600 0100 0100
    ................
  • 0800 f000 0000 0100 0000 0000 0000 0100
    ................
  • 0000 0100 0000 0100 0000 ffff ff7f 0300
    ................
  • 0000 0c26 f442 0100 0000 442a f442 0500
    ....B....D.B..
  • 0000 0000 0000 1b43 616e 646c 6520 6c69
    .......Project X
  • 6768 7469 6e67 2028 5061 6c6f 2041 6c74 YZ
    Review (Rm 23
  • 6f29 0100 0000 0000 0000 0500 0000 0000
    A)..............
  • 0000 0006 0000 0000 0000 0006 0000 0000
    ................
  • 0000 0001 0000 0001 0000 0006 0000 0000
    ................
  • 0000 0001 0000 00ff ffff ff01 0000 0000
    ................
  • 0000 0008 0000 0000 0000 0001 0000 0000
    ................
  • 0000 0001 0000 0001 0000 0001 0000 00ff
    ................
  • ffff 7f03 0000 00b0 08f5 4201 0000 00b0
    ..........B.....
  • 08f5 4205 0000 0000 0000 000e 5061 7261
    ..B.........Bast
  • 7368 6174 204d 6173 6569 0100 0000 0000 ille
    Day........

47
xCal - iCalendar DTD Document
  • iCalendar expressed as XML
  • First proposed Aug. 2001
  • Internet-Draft expired in Jan. 2003
  • File extension .xcs
  • Why bother?
  • Use XSLT to transform into standard iCalendar
  • No loss of data
  • ltiCalendargt
  • ltvcalendar method"PUBLISH" version"2.0"
  • prodid"-//Acme Corp//Example v1.0//EN"gt
  • ltveventgt
  • ltuidgt15369079-4F9A-4D0A-9ABF-EC5F2F5F1C7Flt/uidgt
  • ltdtstampgt19981116T145958Zlt/dtstampgt
  • ltsummarygtProject XYZ Reviewlt/summarygt
  • ltlocationgtConference Room 23Alt/locationgt
  • ltdtstartgt19981116T163000Zlt/dtstartgt
  • ltdtendgt19981116T190000Zlt/dtendgt
  • lt/veventgt
  • lt/vcalendargt
  • lt/iCalendargt

48
RDFiCal, RdfCalendar
  • An RDF vocabulary (ontology) for describing
    calendar events based on the iCalendar
  • First conceived Oct. 2000 by Tim B-L
  • Dan Connolly, Libby Miller still evolving spec
  • File extension .rdf
  • Why bother?
  • Integration with the Semantic Web, FOAF
  • ltrdfRDFgt
  • ltVcalendargt
  • ltversiongt2.0lt/versiongt
  • ltprodidgtlt/prodidgt
  • ltcomponentgt ltVevent rdfabout"http//www.w3.org
    /uid/A0831EE4-73D1-11D9-B5C3-000393CD78B4"gt
  • ltsummarygtProject XYZ Reviewlt/summarygt
  • ltdtstart rdfparseType"Resource"gt
  • ltdateTimegt2005-01-27T090000lt/dateTimegt
  • lt/dtstartgt
  • ltduration rdfparseType"Resource"gt
  • ltdurationgtPT1H30Mlt/durationgt
  • lt/durationgt
  • lt/Veventgt lt/componentgt
  • lt/Vcalendargt
  • lt/rdfRDFgt

49
hCalendar
  • A 11 representation of iCalendar in XHTML
  • First conceived Sep. 2004 by Tantek Çelik
    (Technorati)
  • File extension .html
  • Why bother?
  • HTML makes it easy for bloggers to discuss events
    on their blogs
  • Use XSLT to transform into standard iCalendar
  • ltspan class"vcalendar"gt
  • ltspan class"vevent" id"15369079-4F9A-4D0A-9ABF-
    EC5F2F5F1C7F"gt
  • ltspan class"summary"gtAnnual Employee
    Reviewlt/spangt
  • ltabbr title"dtstamp" class"19970901T130000Z"gtlt
    /abbrgt
  • ltabbr title"dtstart" class"19970903T163000"gtSe
    ptember 3rd, 430pmlt/abbrgt-
  • ltabbr title"dtend" class"19970903T190000"gt700
    pm
  • lt/abbrgt
  • lt/spangt
  • lt/spangt

50
Calendar Format Recommendations
  • Use bona fide iCalendar (RFC 2445)
  • Dont choose a wrapper format
  • Usually unable to express complex iCalendar
    fields (i.e. RRULE)
  • Comma Separated Values (CSV) a valid choice
  • Batch export to Microsoft Office Outlook
  • Outlook only interprets first VEVENT in .ics file

51
Thank you
Write a Comment
User Comments (0)
About PowerShow.com