Quick AJAX Demo Screencast

I have been looking for an excuse to try out Camtasia, so I recorded some of the AJAX effects W3Counter makes use of. Symfony provides simple functions to wrap Prototype and Script.aculo.us that make complex combination effects simple. Read the full post for the short screencast.

More from this category

  • http://www.mockrio.com/ Josh

    I think more exciting than the AJAX–which was already present in W3Counter–is that fact that we can get browser stats (and presumably other non-visit stats?) for date ranges rather than just the past 25,000 pageviews. :)

  • Brendon Kozlowski

    I have to inquire, since I see this missed in many applications… When you have finished polling the server and then hide the data, is it actually hidden, or completely removed from the DOM? If you’ve removed it, and the visitor wanted to view the same information again, unless you perceive the information to be *completely* real time, I think it’s a waste of bandwidth and server resources, regardless of how small it may be. Otherwise, it looks really nice! I am curious – have you stopped using YUI entirely? If so, what was the decision for the move?

  • Dan

    Actually, additional code for that isn’t necessary as both Internet Explorer and Firefox cache the results of the AJAX requests like any other webpage. I verified by expanding the details, disconnecting my computer from the internet entirely, and collapsing/expanding those sections again and they do work. I can’t say I completely understand how it works, but when the data changes, the browser does fetch the results again.

    In addition, Symfony provides multiple levels of highly customizeable cacheing. I can easily tell it to cache the results of those AJAX requests on its side for several minutes or longer so that the response comes off a file instead of initializing the entire framework and rerunning the database queries.

    The only component of YUI I was using was the Connection component to handle creating multiple XMLHttpRequest objects so multiple AJAX requests could be occurring simultaneously. This is already built-in to Prototype which is then built-in to Symfony’s JavaScript PHP libraries, so I don’t really need it anymore.

  • Brendon Kozlowski

    Thanks for the info! The caching test information was probably the most useful to me. I have noticed on other web-based applications a pretty slow response time when re-querying for something like that, so I’m rather surprised at that data. I’ll have to do some more testing on my own (not that I don’t trust you, I’m just wondering if perhaps Symfony does something behind the scenes).

    Have you run across any instances of browser incompatibilities using Prototype? I’ve been using YUI primarily because it was marketed as being the most cross-browser compatible JS framework there was, and not being a JS pro, it definitely sold me.