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.
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.
I disagree about the open source vs. commercial application. I've seen plenty of similar issues with commercial offerings. WordPress just happened to be the most recent example I'd run across. Rather different paradim, but MS SQL Server Studio (the thing that used to be 'Enterprise Manager') doesn't let you close windows except with the mouse or the window manager – no keyboard shortcut (such as CTRL-W).
Of course, annoying or not, they're not going to make me switch platforms, even if cost didn't weigh into the equation. I was more pointing it out as a general warning. The purpose of doing ajax stuff instead of simple page-based apps is to improve the user experience. But with the benefits comes a new set of pitfalls. With a UI, experience is everything, and consistent is far more important fast.
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…
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
If u like Flex so much, I want to know will you like to use wordpress again if it is completely develop by Flex?
Rey,
I've heard little but good things about jQuery, though I can't say I've tried it myself. I've never build an all-ajax app (can't see the point), so I'm usually more concerned with making little snippets of an existing HTML app more user friendly. Maybe it's little inline server-side validation routines, or a single drag'n'drop form, or some autosave functionality, not not the whole UI.
As such, Prototype and Scriptaculous is about all the futher I've gone with ajax frameworks, aside from some custom glue code of course. I'm sure they're not the best choices, but they're the ones I'm familiar with, and I don't find them lacking, so I haven't gone investigating other options. jQuery would definitely be on the list if/when I do go looking.
John,
Actually, I greatly dislike using Flex apps where they don't have something profound to bring to the table. If WordPress switched to a Flex UI, there is no question that I'd be dropping it in a heartbeat. A content management app like WordPress is horribly suited to a Flex front end, the HTML paradigm is very reasonable, and if properly dressed with a bit of ajaxing where needed, far surpasses anything a Flex app could provide without a HUGE investment of time and effort (maybe at all).