[nycphp-talk] AJAX and State
Dell Sala
dell at sala.ca
Wed Sep 5 11:33:20 EDT 2007
On Sep 5, 2007, at 11:08 AM, tedd wrote:
> 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?"
At the root of things, that IS all ajax provides -- a way to issue
requests without having to refresh the entire browser window.
However, this opens up all kinds of other possibilities when it comes
to building a user interface. All of a sudden you can design things
to behave much more like a networked desktop application instead of a
series of isolated, stateless documents.
The basic pattern becomes
1) deploy an html/javascript application to the browser
2) the html/javascript application communicates with the server to
get any information it needs to change it's own state
You get a very nice separation between business and presentation
source code.
Here's my beef: ** JavaScript is painful **
I've found the amount of code I have to write has increased
dramatically. I write a little less php, but TONS more javascript.
And debugging javascript sucks... Browser compat. issues just kill
the experience for me. And there are performance issues too.
Ajax is great because it has given us a new way to think about
developing web apps. But I feel this model needs a better platform...
Flex anyone?
-- Dell
More information about the talk
mailing list