Features postponed for ASP.NET 2.0 Beta 2

Features postponed for ASP.NET 2.0 Beta 2

We have recently completed planning for Beta 2 of ASP.NET 2.0 and Visual Studio 2005. For the Beta 2 release, we will deliver a high quality release with a go live license to enable live deployments. To do this, we need to focus on finding and fixing bugs, and raising security, performance, and scalability through targeted analysis and improvements. We also are getting great customer feedback from Beta 1 and earlier preview releases, and need to incorporate key feedback into the product.

To enable us to meet these goals, and in response to customer feedback, we have decided to remove a small set of features from ASP.NET 2.0. These features are already available in Beta 1, so we’d like to provide you with some advance notice of what changes are coming, and how you can prepare for them.

Mobile Device Adapters for ASP.NET Server Controls

ASP.NET 2.0 Beta 1 introduced a new control adapter architecture that allows any ASP.NET server control to create alternate renderings for other browsers, including mobile devices. We also included adapters for many of our built-in server controls, to allow developers to use them to create mobile web applications. At the same time, Beta 1 deprecated the ASP.NET mobile controls, which were used in ASP.NET 1.x to build mobile web applications.

In Beta 2, we have decided not to deprecate the V1.x mobile controls. We have instead postponed our plans to ship mobile specific adapters for all controls until a later release.
If you plan on writing a mobile web application using ASP.NET 2.0, we recommend that you use the ASP.NET mobile controls, found in System.Web.Mobile.dll.

We have also decided not to specifically certify individual new devices for use with the mobile controls, through our product release and device updates. Instead, we will provide adapters for V1.x mobile controls that render markup compliant with common markup languages – HTML, cHTML, XHTML Mobile Profile, and CHTML – and work on standard browsers. For many applications, these adapters will work out of the box for a variety of devices. If desired, you can fine-tune your application for an individual device by creating a new device profile and writing new adapters as necessary. We will provide a profiling tool and adapter source to help you customize your applications.

We still plan on including the new control adapter architecture in ASP.NET 2.0. You can write control adapters to customize server controls for individual browsers. For example, you can write a control adapter to generate a different rendering for the Calendar control on Internet Explorer.

PhoneLink and ContentPager Controls

The mobile support in ASP.NET 2.0 Beta 1 included two new controls that were intended to supersede two features of the ASP.NET mobile controls: the PhoneLink server control to replace the PhoneCall mobile control, and the ContentPager control to replace the ability of mobile forms to automatically paginate content according to the screen size of the target browser.

Now that we are bringing back the ASP.NET mobile controls, you can implement these features using . To include a link to a phone number in your page, use the System.Web.UI.MobileControls.PhoneCall control. To paginate the contents of your form, use the Paginate property of the System.Web.UI.MobileControls.Form control.

The ContentPager control also allowed developers to paginate the contents of controls for desktop browsers. To create a paginated UI in ASP.NET without the ContentPager control, you can either use a GridView control, which has built-in support for pagination, or extend the DataList control with support for pagination. For an example of a pagination UI on ASP.NET, please refer to the MSDN article Creating a Pager Control for ASP.NET by Dino Esposito.

Site counters, DynamicImage Control, and the Image Generation Service

After receiving feedback and conducting internal testing and evaluation, we have decided that these features require significant additions or changes in response to customer feedback, or significant additional testing to meet stability or scalability requirements. We have decided to remove these features for ASP.NET 2.0, and will look at adding them in a future version.

To employ click tracking on your site in ASP.NET 2.0, we recommend you use a 3rd party solution or build your own using page code.

To dynamically generate images from content in a database or from data, you can write an ASP.NET handler (.ashx), and use the ASP.NET cache to store these generated images. The code example at the end of this post (see below) shows a handler that returns an image generated from a business object.

WebPartPageMenu Control

This control provided a convenient mechanism for switching page personalization modes in pages using the web parts control set. The UI generated by this control is a dropdown list or menu similar to Sharepoint. However, pages often require more flexibility for switching modes than this control provides, and the WebPartManager class makes it easy to programmatically switch personalization mode from any server control.

To switch modes, you can use an interactive server control such as a Button, LinkButton, or DropDownList, and write an event handler for it that programmatically switches the personalization mode. For example, the following code will switch the personalization mode of a WebPartManager:  
WebPartManager1.DisplayMode = WebPartManager.DesignDisplayMode

Access Data Providers

In Beta 1, ASP.NET application services such as membership and roles include Access data providers, and use them by default. In Beta 2, however, we will replace this functionality with support for SQL Server 2005 Express Edition, the new version of SQL Server which combines the file-based simplicity of Access databases with seamless deployment to full editions of SQL Server. The developer model of using the application services stays 100% the same, but the backend implementation will now be much more robust and performant.

DataSetDataSource

This control provided the ability to bind to an XML file in the DataSet format . However, it was not able to bind to a typed DataSet object generated by Visual Studio, causing confusion among developers (the appropriate data source for binding to a VS DataSet is ObjectDataSource). In addition, DataSetDataSource does not support managing concurrent updates to the DataSet file (from multiple requests), it is also not really suitable for scalable web application update purposes. We have postponed this to a future release until it can be implemented properly.

Built-in Global Themes

Global themes provide a useful way to apply a standard consistent look to web pages, and we anticipate that developers will create and exchange a variety of global themes. However, we have decided not to include any built-in general themes in the product. Developers looking for an attractive set of built-in styles for server controls can use autoformats instead. We will also have an online theme gallery on www.asp.net for RTM that will enable developers to find and share themes for their site.

Web Administration Tool Profile/Reports Tab

This feature was incomplete in Beta 1, and we have decided not to complete the work in Beta 2. We will release samples that show how to get reporting from profile data.

Example – An ASP.NET handler that returns a dynamically generated image

<%@ WebHandler Language="C#" Class="ImageHandler" %> using System; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Web; using System.Web.Caching;   public class ImageHandler : IHttpHandler {          public void ProcessRequest (HttpContext context) {                  // Get the image ID from querystring, and use it to generate a cache key.          String imageID = context.Request.QueryString["PhotoID"];        String cacheKey = context.Request.CurrentExecutionFilePath + ":" + imageID;          Byte[] imageBytes;                          // Check if the cache contains the image.          Object cachedImageBytes = context.Cache.Get(cacheKey);          if (cachedImageBytes != null) {              imageBytes = (Byte[])cachedImageBytes;          } else {              // Get image from business layer, and save it into a Byte array as JPEG.              Image im = PhotoLibrary.GetImage("PhotoID");              MemoryStream stream = new MemoryStream();              im.Save(stream, ImageFormat.Jpeg);              stream.Close();              im.Dispose();              imageBytes = stream.GetBuffer();              // Store it in the cache (to be expired after 2 hours).              context.Cache.Add(cacheKey, imageBytes, null,                DateTime.MaxValue, new TimeSpan(2, 0, 0),                CacheItemPriority.Normal, null);          }                  // Send back image.          context.Response.ContentType = "image/jpeg";          context.Response.Cache.SetCacheability(HttpCacheability.Public);          context.Response.BufferOutput = false;          context.Response.OutputStream.Write(imageBytes, 0, imageBytes.Length);      }        public bool IsReusable {          get {              return false;          }      } }  

文章来源:http://blog.aspcool.com/polaris/archive/2005/02/03/1843.html

posted on 2005-02-03 20:28  POLARIS  阅读(576)  评论(0编辑  收藏  举报

导航