Creating a Dynamic Banner System with AJAX
(Page 1 of 5 )
AJAX has proven itself useful in a variety of web applications. In this three-part article series, you will learn how to use AJAX to display commercial banners dynamically on your web site. This first article will show you how to develop the basic script.
Introduction
Certainly, it isn't breaking news that AJAX has inspired a revolution in the way that certain web applications are developed today. Taking a brief look at some of the most popular web sites around should give you clear evidence of the huge proliferation of sites that use silent JavaScript-based HTTP requests to deliver database contents to their visitors. This trend definitely seems to be growing steadily as more web developers discover new and creative uses for the AJAX technology.
It seems that AJAX provides web programmers with all of the required tools to create anything you can think of: chat rooms, web-based emails, XML parsers, full-featured front-ends, and so forth. Indeed, the range of applications conceived specifically to exploit the advantages of asynchronous (and synchronous, of course) HTTP requests triggered via JavaScript is quite impressive these days.
The reason behind this stage in the development of AJAX-based applications is clear. Any web developer with an average background in the principal methods and properties exposed by the so-called HTTP requester objects can build all sorts of clever programs. This fact undoubtedly contributes to an even greater expansion of the creation of client-side scripts that fetch different server files in the background.
Does this mean that the terrain of AJAX has already reached its limit? Absolutely not! This series of articles is intended to demonstrate humbly the veracity of this concept by walking you through the process of building a dynamic banner system. The system will be easy to customize, so it can be incorporated into any existing or future web site.
However, let me take some time to explain to you more clearly how this banner mechanism is going to work. This will give you a better idea of the functionality that will be provided by the application that I plan to build in the next few lines.
Put in simple terms, in the course of this series I'm going to teach you how to create a simple JavaScript application. It will be capable of displaying, on the browser, a set of predefined commercial banners which will be fetched directly from the server via AJAX. It's worth noting that the banners do not need to be predefined; this process also may be achieved by randomly selecting the banners in question.
Hopefully, this AJAX-driven banner mechanism will be useful to you and other readers, particularly if you're considering the development of a web site that will be entirely supported by commercial ads.
Therefore, I believe it's time to leap forward and learn together how to create a truly dynamic banner system with AJAX. Let's begin this educational journey now!
Next: Creating a system of dynamic banners >>
More JavaScript Articles
More By Alejandro Gervasio