Machine Learning Authors: Liz McMillan, Elizabeth White, Pat Romanski, Progress Blog, Kevin Jackson

Related Topics: Machine Learning

Machine Learning : Article

Real-World AJAX Book Preview: What is AJAX?

Real-World AJAX Book Preview: What is AJAX?

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.

"Ajax, shorthand for Asynchronous JavaScript and XML, is a web development technique for creating interactive web applications. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user makes a change. This is meant to increase the web page's interactivity, speed, and usability."
— from Wikipedia (www.wikipedia.org), the free encyclopedia

AJAX means that HTML pages communicate with the server in the background without having to refresh the page. It's not a specific technology, patent, recipe, or formula; AJAX is an umbrella that combines components used by Web developers on a daily basis to improve the user's experience.

AJAX uses the JavaScript XMLHttpRequest function to create a tunnel from the client's browser to the server and transmit information back and forth without having to refresh the page; hence, it is asynchronous. The response can contain XML data capable of transmitting complex objects over text. AJAX is not restricted to transmitting XML. XML is heavy, and it's being replaced by either JavaScript Object Notation (JSON) or native JavaScript objects and instructions.

Critics say AJAX is nothing more than a marketing term used to describe and monetize techniques that have been around for over a decade. Perhaps it's true and AJAX is only an acronym to describe a combination of techniques that used to take a couple of sentences to explain and was adopted simply so it would be easier to explain things to a non-technical business client. However, since the term was coined, AJAX has created a huge buzz among Web developers, designers, and business associates.

The chart below shows the spike in the AJAX tag in blogs aggregated by Technorati over the last year.

Traditional HTML is a cyclical process. The data flow goes through a full cycle before the user can request a new action. The user triggers an HTTP request to the server, which processes it and returns either a static HTML page or dispatches the request in a scripting language that creates and returns an HTML page for the browser to render. When this method retrieves new data from the server, it has to repost and reload another HTML file. Many times only a small part of the returned HTML code is different and the shell remains the same, which creates a huge overhead because the data has to be downloaded every time. This is where AJAX shines: it downloads only the information that is needed. An analogy can be drawn between AJAX and traditional desktop applications in the sense that they do not refresh the entire interface for every user event. There is no need to wait for a page reload; JavaScript is lightning fast and when interchanging small pieces of data, it makes for faster interactions, less waiting, and consequently a better experience.

In reality the main purpose of AJAX is to enhance the user experience, get out of the cyclical process, and bring back the feel of traditional desktop applications. With AJAX the user does not have to wait for a full-page refresh cycle and halt the interaction. Instead, the processing happens in the background so simultaneous requests can be made asynchronously.

In the past, DHTML modified the visual elements without having to reload the page; however, it usually had no affect whatsoever on the server or database. Now it is possible to use all the same DHTML widgets, but send information to the server in the background to allow real interaction.

The Characteristics of AJAX Applications
The technologies behind classical Web applications (HTML) are pretty simple and straightforward. This simplicity, however, comes at a cost. Classic Web pages have little intelligence and lack dynamic and interactive behavior.

AJAX changes the landscape. It allows Web pages to be interactive like desktop applications. Unlike classic HTML Web applications, AJAX applications have different characteristics.

The Web Page as an Application
AJAX blurs the boundary between Web pages and applications. In classical Web applications, a Web page is an HTML document that can be rendered by a browser for purposes of information display. It has limited to zero intelligence of its own.

In an AJAX application, the HTML page that the server sends to the browser includes code that makes the page "smarter" This code runs in the background, acting as the "brains," while the HTML document is rendered in the browser window. This code can detect events such as keystrokes or mouse clicks and responds to these events without making a round-trip to the server.

Through AJAX, a Web page feels more like a desktop application. It responds fast, almost immediately to user actions, without a full-page refresh. And it can continuously update the page by asynchronously retrieving data from the server in the background, similar to the desktop experience.

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 www.takemetoyourleader.com, 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 http://takemetoyourleader.com

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.

@CloudExpo Stories
SYS-CON Events announced today that B2Cloud will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. B2Cloud specializes in IoT devices for preventive and predictive maintenance in any kind of equipment retrieving data like Energy consumption, working time, temperature, humidity, pressure, etc.
Today traditional IT approaches leverage well-architected compute/networking domains to control what applications can access what data, and how. DevOps includes rapid application development/deployment leveraging concepts like containerization, third-party sourced applications and databases. Such applications need access to production data for its test and iteration cycles. Data Security? That sounds like a roadblock to DevOps vs. protecting the crown jewels to those in IT.
Many organizations adopt DevOps to reduce cycle times and deliver software faster; some take on DevOps to drive higher quality and better end-user experience; others look to DevOps for a clearer line-of-sight to customers to drive better business impacts. In truth, these three foundations go together. In this power panel at @DevOpsSummit 21st Cloud Expo, moderated by DevOps Conference Co-Chair Andi Mann, industry experts will discuss how leading organizations build application success from all...
SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp em...
Elon Musk is among the notable industry figures who worries about the power of AI to destroy rather than help society. Mark Zuckerberg, on the other hand, embraces all that is going on. AI is most powerful when deployed across the vast networks being built for Internets of Things in the manufacturing, transportation and logistics, retail, healthcare, government and other sectors. Is AI transforming IoT for the good or the bad? Do we need to worry about its potential destructive power? Or will we...
Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are now increasingly adopting Agile practices across their organizations in order to successfully navigate the disruptive waters that threaten to drown them. In our quest for establishing change as a core competency in our organizations, this business-centric notion of Agile is an essential component of Agile Digital Transformation. In the years since the publication of the Agile Manifesto, the conn...
SYS-CON Events announced today that SIGMA Corporation will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. uLaser flow inspection device from the Japanese top share to Global Standard! Then, make the best use of data to flip to next page. For more information, visit http://www.sigma-k.co.jp/en/.
Cloud applications are seeing a deluge of requests to support the exploding advanced analytics market. “Open analytics” is the emerging strategy to deliver that data through an open data access layer, in the cloud, to be directly consumed by external analytics tools and popular programming languages. An increasing number of data engineers and data scientists use a variety of platforms and advanced analytics languages such as SAS, R, Python and Java, as well as frameworks such as Hadoop and Spark...