Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Copy to Multiple Schedules is Wasteful
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Copy to Multiple Schedules is Wasteful

 Post Reply Post Reply
Author
Message
CharlieF2 View Drop Down
Newbie
Newbie
Avatar

Joined: 20 September 2006
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote CharlieF2 Quote  Post ReplyReply Direct Link To This Post Topic: Copy to Multiple Schedules is Wasteful
    Posted: 20 September 2006 at 12:17pm
I'm working on incorporating your wonderful Calendar Active X control into my application and would like to make a suggestion: rather than having to copy a row from the event table to each schedule ID (to allow an event to show up for multiple people), you should consider allowing for a concatenated field of schedule IDs for which the event would be related. 
 
For example:
 
Currently, if Mike (ID 1) and John (ID 2) wanted to meet and John created the event in his schedule, then there would be a ScheduleID of 2 for this.  The event would have to be copied (second row) with ScheduleID of 1 for this to appear also for Mike.  This is of course would work. 
 
The problem is that if there are 10 users and they each create 3 events a day then that is 1000 x 10 = 10,000 created each year.  If each of these records need to beshared with at least one other person then, using your existing approach, would bloat the database up to 20,000 (at least) events.  Using my suggest approach would still keep this to 10,000 records. 
 
I hope this is clear. 
 
Thanks,
CharlieF2
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 21 September 2006 at 8:24am
Hello Charlie,

Thanks, your idea is clear enough. We also thought about this approach when created multischedules functionality (as well as some other nice ideas )
But implementation of this will add redundant complexity to data structure, to data provider, and to the control. So, for the beginning we decided not to implement this feature.

Below are a few notes and suggestions which may help you to choose a way of resolving this problem. Calendar have some features to avoid copying of events.
NOTE:
1) Each calendar resource can display more than one schedule ID.
2) For shared events you can use some special ScheduleID.
3) There is a PrePopulate notification where you can filter calendar events before displaying.
 
Implementation:

1. Virtual common schedule.
Example: PersonalScheduleMike (ID 1), PersonalScheduleJohn (ID 2), CommonScheduleMikeJohn (ID 3)
a) You create a single event with ScheduleID = 3
b) You setup Calendar to show 2 resoruces: Mike (ID 1 and 3), John (ID 2 and 3)

This approach has only 1 disadvantage -- you have to create a lot of CommonSchedules when there are a lot of people. However, each such record takes a very small amount of storage.

2. Shared events know their Schedules.
a) For shared events set ScheduleID = -1 (some default shared ID) and use CustomProperties collection to store ScheduleIDs of peoples who participate in this event.
b) Such shared events will be populated for all users, and you should use PrePopulate notification to filter events. Check whether the ViewGroup's first ScheduleID presents in CustomProperties ScheduleIDs set. If not - remove such event from the collection.
An advise: iterating from last to first element would let you easily remove event at current index.
 
3. Use IsEditOperationDisabled, BeforeEditOperation to customize shared events editing. For example you can disable moving shared events between users, but let to change a time start and duration.
 
--
Best regards,
Sergey
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.