Professional ASP.NET 3.5 AJAX
Authors: Bill Evjen, Matt Gibbs, Dan Wahlin, Dave Reed
Venue:  (2009)

ASP.NET revolutionized Web application development. The platform handles many of the complexities of creating Web applications. Now ASP.NET AJAX takes the development platform even further. The lines between rich client applications and traditionally less interactive browser-based applications are being further blurred with the use of this technology. The ASP.NET AJAX Library brings object-oriented programming to JavaScript development for modern browsers, and the ASP.NET AJAX Extensions makes it easy to write rich Web applications that communicate with the Web server asynchronously. Again, the complexities are made easy by using ASP.NET. The new server controls that are part of ASP.NET AJAX make it simple to designate parts of the page to be updated automatically without making the user pause and wait while the data is refreshed. You can have partial page updates without writing a single line of code. Other new controls let you alert the user that background work is happening and designate regular intervals at which updates occur. In addition, the ASP.NET AJAX Control Toolkit makes it easy to make your user interface really come to life with animations, modal dialogs, transition effects, and more. Ajax is definitely the hot buzzword in the Web application world at the moment. Ajax is an acronym for Asynchronous JavaScript and XML and, in Web application development, it signifies the capability to build applications that make use of the XMLHttpRequest object. The creation and the inclusion of the XMLHttpRequest object in JavaScript and the fact that most upper-level browsers support the use of this object led to creation of the Ajax model. Ajax applications, although they have been around for a few years, gained greater popularity after Google released a number of notable, Ajax-enabled applications such as Google Maps and Google Suggest. These applications demonstrated the value of Ajax. Shortly thereafter, Microsoft released a beta for a new toolkit that enabled developers to incorporate Ajax features in their Web applications. This toolkit, code-named Atlas and later renamed ASP.NET AJAX, makes it extremely simple to start using Ajax features in applications today. Prior to Visual Studio 2008, the ASP.NET AJAX product used to be a separate application that developers were required to install on their machine and the Web server that they were working with. This release gained in popularity quite rapidly and has now been made a part of the Visual Studio 2008 offering. Not only is it a part of the Visual Studio 2008 IDE, the ASP.NET AJAX product is also baked into the .NET Framework 3.5. This means that in order to use ASP.NET AJAX, developers are not going to need to install anything if they are working with ASP.NET 3.5. Overall, Microsoft has fully integrated the entire ASP.NET AJAX experience in that developers can easily use Visual Studio and its visual designers to work with your Ajax-enabled pages and even have the full debugging story that they would want to have with their applications. Using Visual Studio 2008, developers are now able to debug straight into the JavaScript that they are using in the pages. In addition, it is important to note that Microsoft focused a lot of attention on cross-platform compatibility with ASP.NET AJAX. Developers will find that the Ajax-enabled applications that they build upon the .NET Framework 3.5 are able to work within all the major up-level browsers out there (e.g., FireFox and Opera). This book is aimed at experienced ASP.NET developers looking to add AJAX to their applications, and experienced Web developers who want to move to using ASP.NET and AJAX together. In this book, I assume that you already have an understanding of how ASP.NET works. For an in-depth discussion of ASP.NET, I recommend Professional ASP.NET 3.5 by Bill Evjen, et al. (Wrox, 2008). The focus here is on how you can extend ASP.NET applications to update portions of the page asynchronously and to add richer UI elements to a page. ASP.NET AJAX makes it easy to enrich your existing application or to design a new application to provide a better experience for users. The differences among modern browsers have been abstracted, allowing you to write to a common set of APIs and trust that the user will get the correct behavior whether they are using Internet Explorer, Firefox, or Safari. If you know how to author ASP.NET pages, you can easily start using the Microsoft AJAX library to manipulate the browsers Document Object Model and communicate with the server to update the users view of data without forcing them to wait for the entire page to be refreshed. This book covers ASP.NET 3.5 AJAX. It does not cover ASP.NET 3.5, on which ASP.NET AJAX is built. The examples lead you from the core of what is included in the ASP.NET AJAX Library through the core controls you would first start using. You build on that using the core JavaScript library and the ASP.NET AJAX Toolkit before covering debugging, deployment, and custom control development. The ASP.NET 3.5 release includes the Microsoft AJAX Library as well as the server controls that can be used in ASP.NET pages to extend applications, making them more rich and interactive. It does so by leveraging the ASP.NET AJAX Library, which is JavaScript that runs in the browser. The server controls and JavaScript Library work together to let you update HTML with data obtained asynchronously from the server. The ASP.NET application services are exposed to JavaScript classes in the ASP.NET AJAX Library, making authentication and personalization accessible from the browser. Chapter 1 introduces you to ASP.NET AJAX. This book discusses the need for AJAX Libraries and explain how ASP.NET AJAX compares to other AJAX Libraries. You will see how ASP.NET AJAX is composed of client and server pieces and that you can use the client library with any server platform you choose. In Chapter 2, the focus is on the most popular and easily applied feature of ASP.NET, the UpdatePanel control. This control allows you to automatically update portions of a page asynchronously, without subjecting the user to a visible pause while the page refreshes. Chapters 3 and 4 give you some key information about working with JavaScript and how the ASP.NET AJAX Library makes development with JavaScript easier. The book then works through several key features, including control of script resources and working with the ScriptManager control in Chapter 5, the new ASP.NET 3.5 ability to work with the back button in Chapter 6, and the ASP.NET AJAX Toolkit in Chapter 7 and all it has to offer for creating rich user interfaces. The next chapter, Chapter 8, looks at how to use ASP.NETs application services (such as the Membership and Role management systems) with ASP.NET AJAX. Chapter 9 looks at networking objects. Chapter 10 looks at working with animations in ASP.NET AJAX. Chapter 11 shows you how to develop custom AJAX controls. Chapters 12, 13, and 14 shows the reader how to incorporate Ajax in some other ASP.NET core features such as Web Parts, localization, and state management. Chapter 15 looks at what is required to test and debug Ajax applications, and finally, Chapter 16 explores how to deploy ASP.NET AJAX applications.