[Rcalendar-devs] The difference between a todo item and an event

Rob Kaufman rgkaufman at gmail.com
Wed Feb 1 15:21:32 EST 2006


Hi Kevin,
  I agree that Events and ToDos share a lot of fields / functionality,
and I think they should inherit from a common parent, but they have
some distinctions that many people utilize.

First purely from the iCalendar view point ToDos and Events share all
fields except:
  ToDo items
    * may be completed
    * have a name that equals "VTODO"
    * may have a percent complete
    * have a due field (which appears can be implied by dtstart+ duration).
  Events items
    * may have a time transparency
    * have a name that equals "VEVENT"
    * have a dtend (which can be implied by dtstart + duration)

Conceptually an Event takes place in time and can not be completed
before that time, where a ToDo takes place at any time and can
(optionally) be done up to a due date.  From a Ruby perspective its
easiest to use the superb inheritance model to handle these
distinctions.  From a database efficiency point of view, I'm not sure
how much is gained / lost from joining the two types in one table.

  Also worth thinking about, keeping them separate lets you have
different category setups for Events than ToDos.

  I did some work a while back optimising the various fields in the
iCalendar spec for implementation in Ruby (for a project that was then
scrapped).  I'm sure I have a set of UML (ish) diagrams one showing
the unoptimised iCalendar and vCard fields and one dividing things up
for use as parent/child classes and modules so that everything stays
DRY.  I'll dig them up and post them somewhere online if your
interested.

Just Some Thoughts,
Rob Kaufman
On 2/1/06, Kevin Olbrich <kevin.olbrich at duke.edu> wrote:
>
> To summarize some musings I've had recently...
>
> Most PIM programs on the market today make a distinction between events and
> tasks.  On the surface, this seems like a natural distinction.  Events are
> things that happen at a particular time and tasks are things that need to be
> done.
>
> However, as I look at this, I can't help notice that tasks need to become
> events before they can be completed, and there is a lot of overlap in the
> required fields for these two data types.  This suggests to me that these
> are really just variants of the same object.
>
> * Events are tasks scheduled for a specific time and duration
> * Tasks are unscheduled events
>
> We could generate an STI scheme to deal with this, but I would rather have
> one type of object that describes both events and tasks and just filter them
> as needed.
>
> Obviously rCalendar would need to be able to export the internal data
> structure to the iCal format, but the conversion to todo items vs. event
> items could be managed at export time.
>
> Incidentally, I also agree that engines appear to be the best choice for
> implementing this right now.
>
> _Kevin
> _______________________________________________
> Rcalendar-devs mailing list
> Rcalendar-devs at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rcalendar-devs
>
>



More information about the Rcalendar-devs mailing list