[thelist] preserve state when manipulating the DOM

Matt Warden mwarden at gmail.com
Mon Dec 12 19:24:48 CST 2005


Ivo,

On 12/12/05, Ivo P <ipletikosic at gmail.com> wrote:
> Given your question, do you think preserving state thru AJAX is a
> fruitless endeavour?

No, but if you are running into serious state problems, then you are
probably misusing AJAX in the same way people misuse(d) Flash when it
was all the rage.

> I rolled my own solution and wanted to find out what other solutions,
> if any, might be available or tried.

There are plenty of people trying to solve this problem, and there are
some attempts out there. In my opinion, this is misguided, because the
problem is already solved: by using a traditional web application. The
argument not to is the same argument that Flash misusers used, which
was that they wanted stuff to fly around the screen and look cool.

If you think about it, AJAX applications that do well typically do not
care much about interface state. The best example I can think of is
GMail. If you hit refresh, it's really not a big deal (except when you
are composing a draft, but they've recently added auto-save).
Applications like Google Maps are in a gray area where the state is
somewhat important (for bookmarking and sending someone a link to a
map), in which case they have to implement a "link to here"
button/link in the application, which refreshes the page so that the
address bar contains a unique URL that will recreate the current
state. This is bad, but it's not horrible.

Other applications, like backbase's product catalog and shopping cart
site in AJAX, are just ridiculous. I can honestly say that is the
worst use of AJAX I've ever seen, and the application would be
multiple times better if done the traditional way.

Bottom line: you'll be successful with AJAX if you don't get caught up
in the hype.

--
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the thelist mailing list