Internet Marketing Journal

Internet Marketing

Subscribe to Internet Marketing: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get Internet Marketing: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Internet Marketing Authors: Elizabeth White, Melih Oztalay, John Khan, Carmen Gonzalez, Neil McNulty

Related Topics: RIA Developer's Journal, AJAX World RIA Conference

RIA & Ajax: Article

Real-World AJAX Book Preview: Servers Are for Data, Not Pages

Real-World AJAX Book Preview: Servers Are for Data, Not Pages

This content is reprinted from Real-World AJAX: Secrets of the Masters published by SYS-CON Books. To order the entire book now along with companion DVDs for the special pre-order price, click here for more information. Aimed at everyone from enterprise developers to self-taught scripters, Real-World AJAX: Secrets of the Masters is the perfect book for anyone who wants to start developing AJAX applications.

Servers Are for Data, Not Pages
AJAX changes the role of Web pages from being merely HTML documents into "applications" that contain both HTML markup and code. And it changes the role of the "server" from merely serving HTML pages to serving data too.

In classic Web applications, Web servers serve HTML Web pages. Some of the pages are static; others are generated dynamically by server-side logic. When the application contains dynamic data, the server has to convert that data into HTML markup and send it to the browser to be displayed as HTML pages. This way the server is merely serving "screen images" to the client side while the client-side browser is merely a screen-images rendering engine.

In AJAX Web applications, servers don't have to convert data into HTML markup. They can send data directly to the client-side. The client-side code will process the data inside the browser and dynamically update the HTML display. This eliminates significant overhead on the server side, leverages the client-side processing powers, and delivers better performance and scalability, as shown in Figure 1.4.

Dynamic and Continuous User Experience
An important characteristic of AJAX is in its first letter "A" – a user experience that is "asynchronous." Asynchronous means that users continue to interact with the application while the browser is communicating with the server. No more "click, wait, and page refresh," the AJAX user experience is dynamic and continuous.

Classic Web applications deliver a "click, wait, and page refresh" user experience. Because the Web was originally designed for browsing HTML documents, a Web browser responds to user actions by discarding the current HTML page and sending an HTTP request back to the Web server. After doing some processing, the server returns a new HTML page to the browser, which then displays the new page. The cycle of "browser requests, server responds" is synchronous, meaning that it happens in real-time rather than "in the background" so the user has to wait and cannot do other tasks. Figure 1.5 illustrates the traditional HTML "click-wait-refresh" paradigm.

In AJAX-based applications, partial screen updates replace HTML's "click-wait-refresh" and asynchronous communication replaces synchronous request/response. This model decouples user interaction from server interaction, while updating only those user interface elements that have new information. This more efficient application architecture eliminates the wait so users can keep working and it makes nonlinear workflow possible. It also reduces network bandwidth consumption and server load for improved performance and scalability. Figure 1.6 illustrates the AJAX asynchronous/partial update paradigm.

This content is reprinted from Real-World AJAX: Secrets of the Masters published by SYS-CON Books. To order the entire book now along with companion DVDs, click here to order.

More Stories By Coach Wei

Coach Wei is founder and CEO of Yottaa, a web performance optimization company. He is also founder and Chairman of Nexaweb, an enterprise application modernization software company. Coding, running, magic, robot, big data, speed...are among his favorite list of things (not necessarily in that order. His coding capability is really at PowerPoint level right now). Caffeine, doing something entrepreneurial and getting out of sleeping are three reasons that he gets up in the morning and gets really excited.

More Stories By Rob Gonda

Rob Gonda is an industry visionary and thought leader, speaks on emerging technologies conferences nationwide, and combines unique approaches to technology and marketing strategies. As a head of Creative Technologies at Sapient, Gonda is an interactive technical “guru,” who provides the knowledge and experience required to run high-level, multi-channel interactive campaigns that reach millions of consumers. Gonda has more than 15 years of experience in web development and 360 marketing campaigns for clients such as Coca-Cola, Adobe, Guinness, Toyota, Taco Bell, NBC, and others. His areas of specialty include emerging technologies, marketing strategy, social media, digital out-of-home, mobile, behavioral targeting, and multi-channel synergy. Before joining the strategy and technology leadership teams at Sapient, Gonda was co-founder and chief technical officer at iChameleon, a Hollywood FL-based agency renown for its emerging experiences and creative technology. In addition to his agency work, Gonda the chair for the digital media council at the Advertising Research Foundation, is the former editor-in-chief of the AJAX Developer’s Journal, co-author of “Real-World AJAX: Secrets of the Masters”, a passionate blogger who authors, and contributors to various publications such as Ad Age and Ad Week. He is a frequent figure on the speaker circuit, having presented at conferences from the senate’s CIO emerging technology to SXSW and Omma. Rob’s mission is to develop forward-thinking expertise that will ensure clients are always on par with rapidly changing technologies and maintain its ethos of evolving. You can reach him at rob[at]robgonda[dot]com and read his blog is at

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.