Bloggin' the web, one post at a time

AJaX for weblogs

The Asynchronous JavaScript + XML (AJaX) solution is one that can bring happiness and bliss to web designers and web developers alike. However, as with many whiz-bang solutions caution is advised. Google uses it to great effect and personally I think they take it a bit too far. If a page changes in a way that its context changes then it should move to a new URI. People often bookmark content within a specific context. As soon as this is no longer true it maybe a clue that you’ve gone to far.

15 Comments

By m d
03/08/2005 07:12 PM
New York

Thanks a bunch for taking the time to write that.  I’m gonna play with for a while - I can think about a few ways to incorporate this in my stuff already :)

Tracked on: ??
2005 03 23 11:28:50
[61.186.252.132]
Ping Back???blog.csdn.net
By Egor Kloos
03/25/2005 11:58 AM
Rotterdam

Just testing in Opera 8 beta 3. The http request seems to work fine. Okay the beta still seems to have some serious issues in xhtml rendering. But all in all Opera just keeps on rockin’

By Erik
03/26/2005 11:57 AM
Antwerp

I have build a website as a proof of concept for an intranet application using xmlhttprequest (see at http://www.tinkingteam.com). It uses basically the same concepts as you describe.
Now, I have been told that the content of the site will not be seen by google as its navigation is based on javascript and the content is dynamically inserted with xmlhttprequest into divs.
Q1: Do you know more about this? And how to improve this?

Regards,

Erik

By Egor Kloos
03/26/2005 02:16 PM
Rotterdam, The Netherlands, Europe, Earth etc...

Yes I know about this. And that’s why I don’t use it in that way. You should never use this technique to alter the context of your webpage and not the webpage itself. I repeat, NEVER.

Search engines are one reason but what about bookmarking? Which in fact could be even more harmful than not being Googled. I’d suggest you alter the way your site navigates because there is no way around this.

By Erik
03/26/2005 07:13 PM
Antwerp

Indeed, bookmarking is another issue.
Thx. for the reply.

By nevermore
03/31/2005 02:46 PM
germany

@Erik
http://www.tinkingteam.com i think this is totally the wrong way to use httprequests.

but why?...

ajax is only for content thats need to be up to date like : livesearch, useronline query, chatlogs or whatever BUT not for the maincontent.

so, its more clever to make a “normal” refresh when u load the maincontent.

ajax is perfect to give web-apps a smouth feeling, BUT not to use it as a template-engien like u did.

only the future will show how far ajax is going….without disobey the w3c!

its never to late to poker on the right ‘upcoming’** techniks but try to find the best benefit of these techniks and not just to use it cause google demonstrated it.

*think about it

By Marc Logemann
03/31/2005 03:19 PM

Its the way i anticipated what the whole Ajax hype results in. Bad application designs! People start doing silly things because Ajax was mentioned in some fancy Developer journal. Keep ajax for things its good for and thats exactly what Google itself does. And dont think that cirumventing the request-response cycle will give you so much more user acceptance, thats just wrong. Its nice in some spots but thats it.

By Erik
03/31/2005 03:55 PM
Antwerp

This discussion becomes interesting. Bad application design… silly things… thank you for the compliment.

Nevertheless, I wouldn’t call the http://www.thinkingteam.com site a bad application design. As I said in my first comment/question, it was a proof of concept for an intranet application where information blocks change frequently and navigation (buttons and menu’s) are build dynamically.

It is a typical reaction of when you are data oriented to think that information will not benefit from techniques such as xmlhttprequest/Ajax.

Of course, the proof of concept now makes clear that bookmarking and search engines are an issue.

So, basically I have made a Frameset based site without the Frames. And unfortunatetly with all the disadvantages of framesets.

I still believe it is an interesting experiment and it might be perfectly workable in some situations, i.e. not in a static site, but why not in a blog? Why not for blocks of information?

By nevermore
03/31/2005 04:25 PM
germany

@Erik the 2nd ^^

u just dont get it. ^^

ajax should be used to fetch the latest db content without refreshing.

you really thing the artikel on a page need to change while u read it. a user may leave or something like this, that should be thing that reqiures a request to the server.

ur main artikel doesnt need a realtime request to the server all the time. what for?

u missunderstood ajax in ur projekt completlly. u abused it as an template engien.

nice to see its works but the proof is worthless cause it is bad bad application desgin. think which scripts make sense to be run at the client, and put everything else into serversite scripts.

By Erik
03/31/2005 04:36 PM
Antwerp

But serverside scripts mean you have to reload the entire page, right? Or am I missing something again?

By nevermore *getting bored
03/31/2005 04:50 PM
still in germany

u abused ajax as an template engien!!!

why shouldnt u reload ur entry page?? u missunderstood ajax completlly.

no more comment…
quoth the raven, `nevermore, nevermore.’

By Ward Smith
06/22/2005 04:16 AM
CA

I’m trying to use some ajax principles with EE to PUT data into the database.

I know this is probably possible, but do you have any experience trying it?

thanks for the article.

By Egor Kloos
06/22/2005 10:37 AM
Rotterdam, The Netherlands, Europe, Earth etc...

Hmm, can’t think of a reason why I’d do that. However, templating form elements that are bound to the pages context can be usefull. Like building a list of authors related to a particular weblog or catergory. I haven’t tried it but I don’t see why it couldn’t be done.

By Armitage
06/27/2005 09:32 AM
Right behind you

Nice, I’ve been trying to figure out how to use ajax like this for awhile.

I am using ajax to pull data off another site (irc eggdrop bit actually), if the bot is down or something it makes my page hang. Ajax allows me to load the page first, and let the bot content follow when its ready.

My only problem is when I load the page, the content is there but every time I reload the page its the same, it doesn’t update it. The only way to see the new content is to clear my cache.

Is there a way to make sure the content its pulling is fresh?

By Armitage
07/06/2005 12:28 AM
the edge of sanity

Ok, just make the address of the page it pulls somepage.php?blah=0134 where 0134 is a randomly generated number.

Commenting is not available in this weblog entry.