Ajax (sigh) Pet Peeve

I've finally given up and added 'ajax' to my vocabulary as a synonym for "JS remoting".  But I've got a bone to pick with people building ajax apps: neat UI trickery has to leave the UI in a consistent state or you're making the UI worse instead of better.

The particular example that is continually annoying is WordPress.   The authors have done a good job of integrating ajax bits to speed up the UI, like when you delete a comment, it just fades out of the table instead of reloading.  But what they don't do is update status information (like the number of pending comments) in other parts of the page to reflect that a comment has been deleted.  So you see a link that says there is one pending comment and click it, only to be presented with a page that says there are zero pending comments.  Argggghhhh.  I'd so much rather wait for a page reload on the comment deletion.
Flex wins hands down in this area, because you can do data bindings for all that stuff, and the Flex compiler will build all the event listeners/observers to make sure everything is always updated and therefore consistent.  Building that framework in JS isn't terribly difficult, but it does depend on having raw data structures client-side, rather than using the server to render HTML for injection.

7 responses to “Ajax (sigh) Pet Peeve”

  1. Danlance

    Totslly agree with you there – I've been caught out by that one a few times…

    Whilst I'm sure this is abit of a sweeping statement, it does often seem to be that one of the penalties of using Open Source Software (such as Wordpress) is there is not the attention to detail that there has to be with most commercial applications, particularly when it comes to inconsistiencies (rather than exceptions) within the software.

  2. Danlance

    Fair point…

    BTW the standard keyboard shortcut within windows for "Close Window" is ctrl F4 – All the other MS apps I've used (Including enterprise Manager) support this shortcut – I'd be interested in knowing whther this works in MS SQL Studio…

  3. Rey Bango

    Hey Barney, good point bud.

    Thankfully, you're able to see that the shortcomings of one site isn't the fault of this great technology. Something that you may want to look at is the TacoNite plugin from the jQuery project:

    http://www.malsup.com/jquery/taconite/

    It allows you to update multiple DOM elements from 1 Ajax call. The example that you gave would be a perfect scenario in which to use it.

    Check it out. You'll need the awesome Ajax/Javascript library, jQuery (http://jquery.com) in order to use it. I'm part of the jQuery project team so if you need any assistance, please let me know. As Ben Nadel found out (http://www.bennadel.com/index.cfm?dax=blog:513.view), the jQuery team is very helpful. :o)

    Rey

  4. John

    If u like Flex so much, I want to know will you like to use wordpress again if it is completely develop by Flex?