I’m trying to understand when I should use asynchronous web calls back to the server for data in an ajax app.
I’ve never used ajax before so I’m still stuck with my idea of the stateful model of HTTP, having used it that way for over a decade.
In a blog engine I’m writing as an ajax exercise, I’d like to add some asynchronous calls.
What would be an appropriate place to do this for blog-type features?
Comments are a good place for making an AJAX call. When a user is adding a comment, they likely don’t want to have to wait for the entire page to reload to see their comment added. A much better method would be do use an AJAX call to insert the comment into the database, and dynamically add their comment’s content to the page.