Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Timer and Proxy  (Read 5595 times)
coulix
Full Member
***
Posts: 23


View Profile Email
« on: November 22, 2009, 01:16:49 »

Hello coders  :)

I have a requirement where a timer is ran in the background of my app.
Every minutes it makes an http call to a web server.

In case of a particular state in my app: when at least two users are connected to my session i should make a different http call and increment a clock counter (every second) of a ViewComponent.

At the beginning i started doing the ticking in a clockMediator calling the proxy when needed and updating the view as well.

Should i instead have the the timer and counting of "total seconds" and "total seconds with multi users" in the proxy ? Emitting a notification every seconds when multi user condition is true ?.

Thanks for your wise advices,

Greg


Logged
coulix
Full Member
***
Posts: 23


View Profile Email
« Reply #1 on: November 22, 2009, 01:54:09 »

Ah i see there http://forums.puremvc.org/index.php?topic=799.msg3754#msg3754 that both are acceptable.
I will go for the proxy this time.
Logged
Pages: [1]
Print