Hatton's the man.

Now, only to add a level of complication on top of it, here's a sweet lil'
twist for ya.  =D

Have your main window contain an I-frame or a hidden frame.  Bump that
refresh time to something like 5 or 10 minutes.

We first query that info to retrieve latest reminders.  We set query cache
on this query, and refresh it every 15 mins via scheduler, pulling all tasks
that will pop within half an hour or so.  Use query to array to and purge
out any records of reminders not pertaining to this user (because we are
using a broad query holding all near future reminders to minimize database
hits to maximize query cache speed).  We will of course update the query
cache upon an insertion / update.  =P

Now we put these items in a JS array.
We sync up the server time and tick timer on when the events should fire off
and place them into the data array.  (same array we store the db info in)
We loop the time frame you want the refresh tick set at.  When we hit the
tick the event should pop on, we fire a function that displays the detail
for that array item.  For speed, although ugly LOOKING, might make this a
dynamic case inside the time loop with the event firing tick num.
When we reach the end of the timer, we refresh the page to do the cycle over
again.

The dismiss and the snooze simply change either a bit or an numeric value in
the db.  This can be done in the pop window.  If snooze, you change the
value of the JS array to the next interval (like 5 mins or whatever) and the
db update.  (main point here is that we do not query for the reminders
again)

You can play with the interval numbers and the refresh timer to tweak
maximum performance and minimum page refreshes.  Sometimes we are made to do
dirty things like meta refreshes, but non of us will admit to liking it -
and never leaves a tasteful piece of code legacy.  This will let you skip
that gap and add plenty of performance pluses in the process.

Sounds like a lot of work, but when you throw it on a white board, its not
really.  If your web server could talk it would surely thank you; how
grateful your boss (*cringe*) will be for you going the extra mile to cut
your traffic and db calls down 10x; that is not always so easily predicted.


Nate Nielsen
[EMAIL PROTECTED]
817.726.8644

P.s.

<cfset Locations = "Dallas,FtWorth,DFW">
<cfset Skills="CF,ASP,VB,JSP,PHP,COM,XML,JavaScript">

<cf_LookingForJob
    Search="#Locations#"
    Filter="#Skills#"
    Delimiter=","
    From="#Now()#"
    To="#DateAdd('yyyy', 20, Now())#"
>


----- Original Message -----
From: "C. Hatton Humphrey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 06, 2002 3:17 PM
Subject: RE: Reminder Application Using Coldfusion


> Agreed, Web based might not be the best idea for this app... although if
> you're going to try for it, look into having a page with a META tag that
> refreshes the page every 60 seconds, something like:
>
> <META HTTP-EQUIV="Refresh" CONTENT="60">
>
> Also, separate your reminder "creator" from your reminder "alarm" windows.
> Possibly have a parent window with a link to a pop-up that launches your
> reminder information entry window.  Then use Javascript to pop-up the
> "alarm" window.  Your parent would be the one that would have the meta tag
> on it.
>
> Good luck!
> Hatton
>
> > That sounds like a perfect job for VB. It's hard using just JS and CF to
> > push data to a browser. And to do it, I think it really is going
> > to perform
> > poorly. You COULD do this with web programming, but why? It just
> > seems like
> > a tiny little VB app could do this much more effectively and not have
the
> > overhead of a browser window.
> >
> > Just my $0.02.
> >
> > Jeremy
> >
> >
> > -----Original Message-----
> > From: Raj Thilak [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 06, 2002 2:54 PM
> > To: [EMAIL PROTECTED]
> > Subject: Reminder Application Using Coldfusion
> >
> >
> > Hey Guys,
> >
> > I'm given an application... Reminder Application.   Assumption is
> > user always has his browser open.
> >
> > All the application does is:
> > 1. Input the reminder text from the user.
> > 2. Input the reminder date/time from the user.
> > 3. Pop that text to the user in a popup window to the user at that
> > exact date and time. When the window is popped up, the user has two
> > options,
> > a. to close the pop up and
> > b. to SNOOZE, in which case, the pop up (closes and) pops again
> > at the interval of 5 minutes.
> >
> > The environment is ColdFusion 4.5/SQL 7.0/JavaScript.
> >
> > If I schedule an event using scheduler, thats a lot of system
> > resource as i have to check every minute.
> >
> > How do I do it effectively?
> >
> > Thanks and REgards.
> >
> > -Thilak
> >
> >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp.
>
> -------------------------------------------------------------------------
> This email server is running an evaluation copy of the MailShield anti-
> spam software. Please contact your email administrator if you have any
> questions about this message. MailShield product info: www.mailshield.com
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
>
>
> -------------------------------------------------------------------------
> This email server is running an evaluation copy of the MailShield anti-
> spam software. Please contact your email administrator if you have any
> questions about this message. MailShield product info: www.mailshield.com
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
>


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to