NYCPHP Meetup

NYPHP.org

[nycphp-talk] the stale V in MVC web apps

Jesse Callaway bonsaime at gmail.com
Wed Mar 4 12:12:33 EST 2009


On Wed, Mar 4, 2009 at 11:53 AM, David Mintz <vtbludgeon at gmail.com> wrote:
>
>
> On Wed, Mar 4, 2009 at 11:34 AM, Brent Baisley <brenttech at gmail.com> wrote:
>>
>> Use AJAX instead to refresh just the part of the page that needs
>> refreshing. If it's a fair chunk of information, you set a "version"
>> on the server so the AJAX call just checks the current version vs it's
>> version. If it's different, then you refresh the content. If it's not
>> different, no need to refresh anything and you only did a light weight
>> server call, so you could do it every 15 seconds.
>
> Forgive me, I don't quite understand *how* you would set the version
> information on the server in order to compare.
>
> The Prototype library has an Ajax periodical updater
> (http://prototypejs.org/api/ajax/periodicalUpdater) that takes a "decay"
> option which "controls the rate at which the request interval grows when the
> response is unchanged." The longer the server data stays unchanged, the less
> frequently it fetches. Clever and elegant. Something like that would do
> nicely, but I have other reasons for tending to prefer JQuery, which doesn't
> seem to have a counterpart.
>
> <snip/>
>
> --
> David Mintz
> http://davidmintz.org/
>
> The subtle source is clear and bright
> The tributary streams flow through the darkness
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show_participation.php
>

You could md5 the data returned on the last update. This decay stuff looks cool!

-jesse



More information about the talk mailing list