PDA

View Full Version : Check out this absolutely excellent use of AJAX


Guest210212002
07-20-2006, 12:57 AM
<a href="http://www.fohguild.org/forumspy/forumspy.php" target="_blank">http://www.fohguild.org/forumspy/forumspy.php</a>

I don't believe you need an account there to see it in action. Basically that page auto-updates dynamically every time there's a post in one of the forums. There's also a great looking mouseover window that pops up at the bottom of the screen with thread preview in it.

It's hooked into every forum in the network of sites, not just the FoH site, so any time any of the uberguilds network sites gets a post, it updates that list.

(Before anyone asks, it's hand-coded by them, and they aren't sharing. I'd LOVE to have that on my site.)

Very, very slick.

Code Monkey
07-20-2006, 01:13 AM
I consider that a horrible missuse of AJAX. It's doing the same thing as the dreadful AJAX chat script does. Polling the server every 5000 ms. That would bring a lot of sites down. If they have the server power then that's fine. But it is still not what ajax is designed to do. You could do the same thing with php and a header refresh.

Trana
07-20-2006, 02:09 AM
As Jump said, this is not what AJAX is for.

Kirk Y
07-20-2006, 02:36 AM
Still looks pretty nifty though. :classic:

Smiry Kin's
07-20-2006, 07:31 AM
could look better i think..

Guest210212002
07-20-2006, 07:52 PM
/me still thinks it's nifty. :P

Paul M
07-20-2006, 10:35 PM
Woah, way to kill your server. Not getting anywher near any of mine .....

SaintDog
07-21-2006, 04:51 PM
Digg and quite a few other websites use such a script as well. It either is not as resource intensive as it may seem or they all have powerful enough servers to not have to worry about it :).

If you're on a cluster or a load balanced setup, you probably wouldn't have anything to worry about.

Code Monkey
07-21-2006, 05:52 PM
Digg and quite a few other websites use such a script as well. It either is not as resource intensive as it may seem or they all have powerful enough servers to not have to worry about it :).

If you're on a cluster or a load balanced setup, you probably wouldn't have anything to worry about.

Which leaves the other 99.9% who's sites would come to a crawl.

This kind of thing is what gives AJAX a bad rap. The purpose of AJAX is to give the end user interactive feedback as close to realtime as possible. To simulate the look and responce of a desktop application.

It is not designed as a non interactive page refresher. It's a good thing they don't release it.

Guest210212002
07-21-2006, 07:02 PM
As Jump said, this is not what AJAX is for.

The beauty of coding is that it can be "for" whatever you want it to be.

Those guys (and myself) obviously think that's a pretty good use of AJAX. ;)

Trana
07-21-2006, 07:28 PM
All it is is a fancy site integrated RSS reader, not what AJAX is for.

Yes, you CAN use AJAX for this purpose, but I think you are looking at it from the coding perspective and not the network/system utilization point of view. This isn't much different than the vbshout hack, which causes a pretty big hit on your system resources.

IMO, there are other tools to do this function.

Code Monkey
07-21-2006, 10:09 PM
The beauty of coding is that it can be "for" whatever you want it to be.

Those guys (and myself) obviously think that's a pretty good use of AJAX. ;)

Tell that to the people who get booted by their host because they naively install this kind of crap.

Tell that to the people who find that httprequest functions have been disabled because of hosts that are sick of dealing with these issues.

Just becuase dynamite can be used to kill people as well as move mountains doesn't make killing people a good idea.

AN-net
07-22-2006, 12:55 AM
basically a cheap copy of Digg.com's Digg Spy (http://www.digg.com/spy);)

Guest210212002
07-31-2006, 01:02 AM
Without getting into why comparing code to killing people is a little silly.. ;)

Something like that, showing (for example) the last 5 posts embedded in a CMPS block would be pretty freakin' sleek.

stud
08-01-2006, 02:59 PM
Server issues aside, i really like how topics update on that site.

The Diggspy way of refreshing is a pretty attractive one - and would function pretty well on smaller forums that don't already hammer their host servers.

Guest210212002
08-01-2006, 08:54 PM
Their code is downloadable (digg-spy), I've been picking at it trying to get it to work with vB, but it'll be a while until I have anything solid.

Andrew Green
08-02-2006, 01:40 PM
I consider that a horrible missuse of AJAX. It's doing the same thing as the dreadful AJAX chat script does. Polling the server every 5000 ms. That would bring a lot of sites down. If they have the server power then that's fine. But it is still not what ajax is designed to do. You could do the same thing with php and a header refresh.


Depends... It's not as heavy as someone hitting "Find New Posts" every 5 seconds, or watching the who's online page reload every 5 seconds.

Still, might be best used as a staff only page or even a paid members only page for those with stretched servers.

Now if someone where to make a mod to plop this into the header of every page that gets displayed, that would definately crash and burn :)

stud
08-02-2006, 01:45 PM
I think the absolute best application of this would be on a CMPS page, in the Recent Posts module.
Having 1 module update while others stay static would be much less strain on the server then having users doing a manual refresh every 30 seconds or so. If you had the ability to change the interval at which it polls, you could customize it to the needs of all types of websites.