16.1. Installing the Bits

There are several distinct parts that make up the functionality of ASP.NET AJAX. The core ASP.NET AJAX release was originally shown as part of a CTP. A CTP is a Community Technology Preview released before the product is ready for final consumption in order to share progress and gather early feedback. It was then released in supported form as an add-on to version 2.0 of the .NET Framework. It was subsequently incorporated into the .NET Framework 3.5 update.

The ASP.NET team continues to explore new feature investments and provides tech previews to gather input and share the work being done. The APIs and features in the previews will evolve over time as the work progresses towards a fully supported release. Bertrand LeRoy has provided some insight in his AJAX Roadmap document available at www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14924.

The ASP.NET AJAX Toolkit is a set of shared source behaviors and control extenders that are central to writing richer Web applications. These elements build on top of the core ASP.NET AJAX platform pieces to provide the key pieces necessary to push Web development further. Many developers view the Toolkit as a fundamental part of ASP.NET AJAX although they continue to be distinct installs.

16.1.1. ASP.NET AJAX

ASP.NET AJAX is the core platform for building richer Web applications using ASP.NET and the bulk of what this book is about. The object-oriented type system built in JavaScript is transmitted to the browser and cached by the client. All subsequent requests for the JavaScript library are satisfied by the browser cache. To configure the Web servers to support ASP.NET AJAX applications, they must have the server components installed. The Microsoft naming convention for the releases has not made it easy to follow what is required. Version 2.0 of the .NET Framework did not contain the AJAX libraries. Version 3.0 was built on top of version 2.0 and is an addition to the core 2.0 release. It is not required for ASP.NET AJAX development. ASP.NET AJAX was then released as a standalone install that would also go on top of .NET Framework 2.0. This was independent of the 3.0 release. All of this functionality was then incorporated into the .NET Framework 3.5 update. And the .NET Framework 3.5 has now been updated with a service pack. The latest supported release should be installed on servers to ensure that security fixes, functionality and performance improvements are in place for everyday use.

In early preview builds, it wasn't necessary for the ASP.NET AJAX assemblies to be installed in the Global Assembly Cache (GAC), but as features were added and refined, it became necessary to assert full trust in order to provide the complete functionality across trust levels. Assemblies in the GAC are considered trusted because they must be installed by someone with administrator credentials. This allows ASP.NET AJAX to get access to global configuration data and use .NET Framework reflection, both of which are necessary for full trust across trust levels. If you are using a Web server managed by a third party, you must ensure that .NET Framework 3.5 has been installed on their servers. It is available as a backwards compatible update for version 2.0. To download the latest release of ASP.NET with Service Pack 1, visit www.asp.net/downloads/3.5-SP1/default.aspx.

One key thing to note is that Microsoft has now made the source code for the .NET Framework, including the ASP.NET AJAX pieces available for download. You can actually set a breakpoint and step from your code right into the ASP.NET AJAX platform code and back out again. This is a great improvement over using various tools to look at the IL (Intermediate Language) code and try to interpolate what is happening when an application is not behaving as you would expect. Now you can trace through the code execution from beginning to end. The previous chapter has more detailed information about debugging ASP.NET applications. Symbols can be referenced online or downloaded from the Reference Source Code Center at http://referencesource.microsoft.com/Default.aspx.

When you deploy an ASP.NET AJAX application, there is no automatic check to verify that ASP.NET AJAX is installed. When deploying it to a hosted environment on the Web, check to see that the host has the latest service release for the .NET Framework. In most cases, there will be no change to the functionality, as service releases strive to maintain backward compatibility, but it is a recommended practice to ensure that servers are up to date with the latest servicing release.

16.1.2. The ASP.NET AJAX Control Toolkit

The ASP.NET AJAX Control Toolkit builds on ASP.NET AJAX and can be found here: www.codeplex.com/AjaxControlToolkit/Release/ProjectReleases.aspx?ReleaseId=16488.

The Toolkit contains a set of controls and control extenders with an impressive set of rich behaviors. For example, the ModalPopup control dims the page content except for a new layer that displays the pop-up content. This effect is shown in Figure 16-1.

Figure 16-1. Figure 16-1

This is just one example out of a long list of controls and control extenders. The effects are key to providing a rich user interface that works in multiple browsers. There are a wide range of effects available, ranging from drag-and-drop support, to animations, to an autocomplete textbox, as well as rounded corners and drop shadow effects. Many of the UI elements familiar to desktop application developers are included in the Toolkit.

The Toolkit does not require installation into the GAC. Instead, you deploy it by simply copying the AjaxControlToolkit.dll into the bin directory of your Web application. The controls work in partial trust environments and can be used in hosted environments where permissions are limited. You don't need to provide Adminstrator credentials to leverage the Toolkit.

16.1.3. ASP.NET Futures CTP

There have been several different "Future" releases from Microsoft related to ASP.NET over the past couple of years. There are multiple feature teams focused on different aspects of ASP.NET and their progress is at varying stages. The work has been brought together for unified public preview releases at various points. Now the team is providing several different downloads of various features rather than waiting to coalesce them into a single build. While this provides a benefit in getting access to the work more rapidly, it can be taxing to keep track of all the pieces.

The current and previous preview releases are available at www.codeplex.com/aspnet and include both server and client source code access. Developers have a chance to shape the features as they do development, by trying out the preview releases and providing feedback to the team. Be aware, however, that the earliest previews come with no guarantee that the APIs won't change in the next release or that pieces won't be dropped altogether based on feedback. The degree of churn is reduced quickly as the designs are completed and integrated with other new feature work.

A key distinction between the ASP.NET AJAX releases and the preview releases is that the preview assemblies are not typically get installed in the GAC. Instead, they are placed in the /bin directory of your application. Any feature that needs full trust must get it by virtue of your application being run in full trust. From time to time, a feature in the preview release will have limited functionality because of the need for full trust. This is something to check for in the release notes if you are deploying an early build to a hosted environment where things run under partial trust.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset