Wrox Programmer Forums
BOOK: Professional Ajax ISBN: 978-0-471-77778-6
This is the forum to discuss the Wrox book Professional Ajax by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780471777786
Important: For the new 2nd edition of this book, please post here instead: [url="http://p2p.wrox.com/forum.asp?FORUM_ID=307"]http://p2p.wrox.com/forum.asp?FORUM_ID=307[/url]
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax ISBN: 978-0-471-77778-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 11th, 2006, 08:03 PM
jminatel's Avatar
Wrox Staff
Points: 18,059, Level: 58
Points: 18,059, Level: 58 Points: 18,059, Level: 58 Points: 18,059, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default Excerpt: Ajax Submission Throttling

Are you checking out this book's forum to try to decide if you should buy it? Here's another sneak peek for you then - another excerpt! (Yes, I know this is an xpost - report me to the moderator!)

The most recent new excerpt from Nicholas C. Zakas' work (Professional Ajax co-author and Professional JavaScript for Web Developers author) is this article adapted from Professional Ajax by Nicholas C. Zakas, Jeremy McPeak, and Joe Fawcett (Wrox, 2006, ISBN: 0-471-77778-1), from chapter 3 "Ajax Patterns." Nicholas' previous articles on wrox.com include Ajax and the Yahoo! Connection Manager and XMLHttp Requests for Ajax which is an excerpt from chapter 2 "Ajax Basics" of Professional Ajax. Here's the beginning of the newest excerpt:

Since Ajax emphasizes avoiding page refreshes, the question of when to send user data is important. In a traditional web site or web application, each click makes a request back to the server so that the server is always aware of what the client is doing. In the Ajax model, the user interacts with the site or application without additional requests being generated for each click.

One solution would be to send data back to the server every time a user action occurs, similar to that of a traditional web solution. Thus, when the user types a letter, that letter is sent to the server immediately. The process is then repeated for each letter typed. The problem with this approach is that it has the possibility to create a large number of requests in a short amount of time, which may not only cause problems for the server but may cause the user interface to slow down as each request is being made and processed. The Submission Throttling design pattern is an alternative approach to this problematic issue.

Using Submission Throttling, you buffer the data to be sent to the server on the client and then send the data at predetermined times. The venerable Google Suggest feature does this brilliantly. It doesn't send a request after each character is typed. Instead, it waits for a certain amount of time and sends all the text currently in the text box. The delay from typing to sending has been fine-tuned to the point that it doesn't seem like much of a delay at all. Submission Throttling, in part, gives Google Suggest its speed.

Here's the rest of the article.

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press

Jim's Book of the week: No book this week - Donate to the Red Cross!
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click on their post!

Last edited by jminatel; May 18th, 2016 at 03:44 PM.. Reason: deleted dead link

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax-enabled controls in ASP.NET 2.0 excerpt jminatel Ajax 0 August 26th, 2006 01:37 PM
New excerpt article: Using Generic Methods jminatel C# 2005 0 May 5th, 2006 04:23 PM
New Ajax Article: Ajax Submission Throttling jminatel Ajax 0 April 11th, 2006 08:00 PM
Enabling Bandwidth throttling in IIS naive VB How-To 1 May 3rd, 2004 08:03 AM
Enabling bandwidth throttling in IIS naive VBScript 0 April 29th, 2004 08:51 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.