How to deal with entry recurrence in a Todo List application?
I'm developing a college project (for the Data Structures and Algorithms class) that consists of a todo list, an agenda and a pomodoro timer:
The data relationship is quite simple:
Initially the idea was to let the user decide if a given agenda event or todo item has a recurrence
(daily, weekly, monthly or none):
So, the idea was to implement some basic combination of some design pattern with one or two data structures, where:
The data relationship is quite simple:
- An agenda event may have one or more todos
- A pomodoro timing session may be related to one todo
- A todo may be related with one agenda event, and multiple pomodor timing sessions.
Initially the idea was to let the user decide if a given agenda event or todo item has a recurrence
(daily, weekly, monthly or none):
So, the idea was to implement some basic combination of some design pattern with one or two data structures, where:
- Some sorte of orchestrator would map all todo items and agenda events with a
Repeats != Repeats.None - For each mapped entry, depending on its recurrence and the current user view (users can view a daily, weekly or a monthly calendar in the agenda window), generate "shallow copies" of the item to fill the view (for instance, a daily todo item would fill all squares in a month-view calendar)
- As the user navigates the calendar further the creation of such entries, keep updating that orchestrator so it keeps filling the calendar state with entries matching the previously set Repeats flag
- Only store finished todo items or Events prior to the system's current date