Developing Web Applications with the Web ADF - Web ADF JavaScript Library  

Web ADF JavaScript Library Overview



The Web ADF includes a set of JavaScript libraries, termed the "Web ADF JavaScript Library " which are designed to support and enhance the use of server-side Web ADF components in a browser.   AJAX capabilities and client-server synchronization in the Web ADF are heavily dependent on Web ADF JavaScript logic.  The Web ADF JavaScript Library capabilities are built on the Microsoft AJAX (JavaScript) Library.   The Microsoft AJAX Library provides a comprehensive foundation on which to build AJAX enabled solutions.  It manages interaction with remote services and server-based Web controls using well known partial postback and callback AJAX patterns.  It provides a mechanism for representing Web controls on the client (Script controls) and handling events in the browser.  In addition, it's designed for cross-browser support.  All of these capabilities are leveraged in the Web ADF JavaScript Library.    Documentation for the ASP.NET AJAX JavaScript Library is provided by Microsoft as part of the AJAX client reference materials.   

From the Web ADF developer perspective, the Web ADF JavaScript Library provides access to Web ADF capabilities using pure browser technology in a scripting environment.   This means that you have the ability to use JavaScript to interact with .NET Web ADF server controls and capabilities, such as navigating a map, adding graphics to a map, or creating map tips, without requiring any server-side code.  Changing the state of a Web ADF control via JavaScript is synchronized on both the client and server for you.  Some Web ADF JavaScript objects are only persisted in browser memory, such as graphics which have no server-side representation.   In any case, the Web ADF JavaScript Library merely provides a Web ADF developer with another tool to leverage when creating and enhancing a Web application.    It is not designed to completely replace server-side programming or to be used on its own, without server-side controls. 

Note, the Web ADF JavaScript Library is different than the ArcGIS JavaScript APIs designed for pure JavaScript applications.  The Web ADF JavaScript Library is packaged with the Web ADF and designed solely for use with Web ADF components and solutions.  ArcGIS JavaScript APIs are not designed for use with the Web ADF.  

The Web ADF JavaScript Library actually consists of a set of JavaScript files embedded with Web ADF controls to support browser-based scriptable interaction with the controls.  The JavaScript files are not installed on disk and cannot be modified.  Instead, they provide set of components to use and extend via custom JavaScript you add within a page.  Like the Web ADF server-side .NET components and classes, the JavaScript Library includes a set of namespaces and classes, or JavaScript objects within which to interact at runtime. 

Merely adding a Web ADF control to a page will include the libraries that constitute the Web ADF JavaScript Library with the page at runtime.   Note however that the developer experience is different than traditional .NET development within Visual Studio.  Common Visual Studio capabilities used by .NET developers to enhance the code writing experience are not available when coding JavaScript, such as intellisense, code completion, or integrated help.  In addition, JavaScript is an interpreted language (interpreted at runtime by the browser) so catching errors at compile time is not possible.

To get started working with the Web ADF JavaScript Library, consider the following three areas in which it can be utilized.  A discussion is provided for each area: 

As a client-side JavaScript API, the Web ADF JavaScript Library includes an object model diagram and library reference within this help system.  

     
Getting started with ASP.NET AJAX JavaScript   

The ASP.NET AJAX JavaScript Library defines patterns for JavaScript object definitions, classes to support application interaction and Web request content, and convenient functions for common operations.  It's important to understand a few of these patterns, classes, and functions before working with the Web ADF JavaScript Library.  Note, regardless of the AJAX pattern being used on the server (callback vs. partial postback) the Web ADF JavaScript Library still uses the ASP.NET AJAX JavaScript library on the client browser.