[nycphp-talk] AJAX and State
tedd
tedd at sperling.com
Wed Sep 5 11:08:44 EDT 2007
At 9:40 AM -0400 9/5/07, Mark Armendariz wrote:
>tedd wrote:
>>At 8:20 AM -0400 9/5/07, bz-gmort at beezifies.com wrote:
>>>Hans Zaunere wrote:
>>>>Ajax solves this problem neatly by letting you move all state [1] into
>>>>>the browser. This makes sense from an architectural viewpoint because
>>>>>we are putting this context information close to where it is needed,
>>>>>the UI.
>>>>>
>>>>
>>>>I'm not sure what you mean, though, by keeping state in the
>>>>browser. Here's
>>>>essentially what's work for me in the past:P
>>>>
>>>
>>>I read the above as, to take a simple example:
>>
>>I read your "simple example" and see that you can do it w/wo ajax
>>-- but I don't see the advantage in using ajax other than
>>presentation.
>>
>>Please correct me if I'm wrong, but isn't ajax (and ahah) only a
>>means to communicate with the server without causing a refresh?
>>Does ajax provide something beyond that?
>That's exactly what's provided by XHR (what's usually referred to as
>ajax) - a means of mini-requests instead of full-page requests.
Mark:
-snip- Thanks for the examples.
The examples you provided basically do only one thing -- they
communicates with the server without a refresh -- nothing more.
I know all about filling in forms, checking if the user is registered
or not, and numerous other aspects of how to use ajax to update web
pages without refresh to enrich the user's experience. Been there,
done that.
I also know how to use ajax to communicate with php to do stuff, like so:
http://webbytedd.com/b/timed-php/
So, I am familiar with ajax. But, everything I've seen thus far is
simply using the get/post aspects of javascript to communicate with
the server, nothing more.
Now, what I am asking is not how ajax communication with the server
can be used, but rather is there anything beyond that which ajax can
provide?
Another way of asking this question is, "Besides not triggering a
refresh, what can ajax do that php can not?"
Note: I know that technically, ajax uses xml, but in the cases we've
discussed thus far, I'm assuming that this has been limited to
responseTEXT property and not to xml, correct?
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
More information about the talk
mailing list