NYCPHP Meetup

NYPHP.org

[nycphp-talk] Events Management - is there a solid F/OS code base ?

Cliff Hirsch cliff at pinestream.com
Wed Mar 29 15:43:44 EST 2006


Well, simple might have been a stretch. And I agree putting the actual
"recurrence extraction" in the business or presentation layer does make
sense. But duplicating events in the database still doesn't make sense
to me unless you need to "spawn" a change.

Although I haven't worked it out, I still believe a primary recurrence
type field makes sense such as:
1. Recurrence method: (daily, weekly, monthly, first Tuesday, 2nd Blue
moon, etc.)
2. Start date
3. Duration or end date
4. Numeric field (21st, 2nd, 4th, etc.)
3. other fields necessary for the recurrence method

Now capturing the rigorous publishing schedule for my Semiconductor
Times newsletter could be a challenge. The algorithm is very simple --
the first Friday of each month unless the first day of the month is
pretty darn close to the preceding Friday (like this coming April
issue), whereupon I will publish sometime between the two dates or
perhaps by the preceding Friday. Capture that!

>On 3/29/06, cliff <cliff at pinestream.com> wrote:
>>And isn't recurring just a flag? The presentation or business layer 
>>can see if a recurring event falls into a calendar timframe by doing
some simple math.
>>    
>How does it "recur". Every day, every other day, every Monday and 
>Wednesday, on the 5th of every month, on the 4th Tuesday of every 
>month, on the last day of the month, every 45 days, quarterly, 
>annually?
>
Yeah, well let's not go there because some folks even call it recurrence

when it relies on a fixed day of the week but a count of week into the 
month (like "last Tuesday of every month"). Such moronic scheduling 
should be criminal ;-)

I agree that recurrence should be handled in the presentation layer, 
provided the data is in. but what data? Depends on type of recurrence, 
which is where the business layer interferes with the data layer anyway.

those damn humans think "every other wednesday" is recurrence.... duh. 
It's really "every other day that has already been assigned the label 
"Wednesday" and that works just fine using the flag approach, right?

I'd appreciate an example of that 'simple math' cliff? Might make it 
clearer what you mean.

-=john andrews




More information about the talk mailing list