Years ago, having a web presence was a distinguishing factor for companies. That is no longer the case. Now just having a web presence is no longer enough. Companies are distinguishing themselves further through web applications that react intuitively to customer actions and anticipate user input. This book shows you how ASP.NET AJAX addresses specific web development challenges and paves the way for taking your website to another level of user experience. In this chapter, I discuss the need for richer frameworks in web application development. I talk about the key pieces of the ASP.NET AJAX platform and highlight some other options.
The fundamental set of technologies that enable the next generation of web applications are not new. Online news articles and blogs point to Google, Flickr, and several other services as prime examples of leveraging these technologies in unique ways. The applications have some unique features, but in reality, the underlying technologies have been around and in use for nearly a decade. Take a look at how Microsoft Exchange Server provided rich access to email from a web browser in the Outlook Web Access application, and you can see that the concept of ubiquitous access from a browser while leveraging a common set of browser features for a rich user experience has been around and in practice for years. Users get a remarkably full-featured application with no local installation and are able to access e-mail from virtually any machine.
The technologies in use for building rich applications are generally referred to as AJAX (Asynchronous JavaScript and XML). While the acronym is nice, it doesn’t do much to explain what is actually happening. Instead of building a web application to be just a series of page views and post backs, developers are using JavaScript to communicate asynchronously with the web server and update parts of the page dynamically. This means that the web page can dynamically adapt its appearance as the user interacts with it, and it can even post or fetch data to or from the web server in the background. Gone are the days of the ugly post back, which clears the user’s screen and breaks his concentration! Instead, we need to post back now only if we want to change to a different web page.
Tip |
Even that rule can be bent. Some applications are pushing this boundary and completely changing the user’s view, just as though they navigated to a new page, but they do so through an asynchronous post and by changing the page content without actually navigating to a new URL. |
The AJAX acronym refers to XML as the data format being exchanged between client and server, but in reality, applications are being built that retrieve simple pieces of text, XML, and JSON (JavaScript Object Notation) (which I discuss in more detail in Chapter 4). Part of the AJAX appeal isn’t even covered by the acronym: In addition to communicating with the server without blocking, developers are leveraging Dynamic HTML (DHTML) and Cascading Style Sheets (CSS) to create truly amazing user interfaces. JavaScript code running on the client communicates asynchronously with the server and then uses DHTML to dynamically modify the page, which supports rich animations, transitions, and updates to the content while the user continues interacting with the page. In many cases, users won’t even realize they are using a web application!