Book Image

Microsoft AJAX Library Essentials: Client-side ASP.NET AJAX 1.0 Explained

Book Image

Microsoft AJAX Library Essentials: Client-side ASP.NET AJAX 1.0 Explained

Overview of this book

Microsoft AJAX Library Essentials is a practical reference for the client-side library of the ASP.NET AJAX Framework 1.0, and a tutorial for the underlying technologies and techniques required to use the library at its full potential. The main goal of this book is to get you comfortable with the Microsoft AJAX Library, a huge set of functions that can be used for developing powerful client-side functionality.Beginning with a hands-on tour of the basic technologies associated with AJAX, JavaScript, XMLHttpRequest, JSON, and the DOM, you'll move on to a crash course in the Microsoft AJAX tools. You will learn, through numerous step-by-step exercises, how to create basic AJAX applications, how the object-based programming model of JavaScript works, and how Microsoft AJAX Library extends this model. You'll understand the architecture of the Microsoft AJAX components, how they all fit together, and exactly what they can do for you. Then you will learn how to use the Microsoft AJAX Library in your web projects, and a detailed case study will walk you through creating your own customized client components. At every stage of your journey, you'll be able to try out examples to illuminate the theory, and consolidate your understanding. In addition to learning about the client and server controls, you'll also see how to handle errors and debug your AJAX applications.To complement your new found skills, the book ends with a visual reference of the Microsoft AJAX Library namespaces and classes, including diagrams and quick explanations for all the classes mentioned in the book, providing an invaluable reference you will turn to again and again.
Table of Contents (14 chapters)
Copyright
Credits
About the Authors
About the Reviewers
Preface

Sys.Net Namespace


We cover the following classes of Sys.Net:

  • Sys.Net.NetworkRequestEventArgs

  • Sys.Net.WebRequest

  • Sys.Net.WebRequestExecutor

  • Sys.Net.WebRequestManager

  • Sys.Net.XmlHttpExecutor

Sys.Net.NetworkRequestEventArgs Class

Sys.Net.NetworkRequestEventArgs (Figure A-43) stores the underlying Sys.Net.WebRequest and is passed as an argument object for the invokingRequest event.

Figure A-43 Sys.Net.NetworkRequestEventArgs

Sys.Net.WebRequest Class

Sys.WebRequest (Figure A-44) encapsulates the necessary functionality in order to make web requests from the client side. It uses an underlying Sys.Net.WebRequestExecutor (Sys.Net.XmlHttpExecutor by default) to actually make a request. It exposes properties, methods, and events in order to easily make a request.

Figure A-44 Sys.WebRequest

Sys.Net.WebRequestExecutor Class

Sys.Net.WebRequestExecutor (Figure A-45) represents an “abstract” class (by convention as some of the methods throw an Error.notImplemented() error) and it is the base class for different implementation of executor classes for web requests. Currently, only the Sys.Net.XmlHttpExecutor class based on the XMLHttp object is available.

Figure A-45 Sys.Net.WebRequestExecutor

Sys.Net.WebRequestManager Class

Sys.Net.WebRequestManager (Figure A-46) coordinates all the web requests initiated from the browser exposing two additional events for more control.

Figure A-46 Sys.Net.WebRequestManager

Sys.Net.XmlHttpExecutor Class

Sys.Net.XmlHttpExecutor (Figure A-47) extends Sys.Net.WebRequestExecutor and represents an executor for web requests based on the XMLHttp browser object.

Figure A-47 Sys.Net.XmlHttpExecutor