Jaa


Appendix B: Presentation Technology Matrix

For more details of the topics covered in this guide, see Contents of the Guide.

Contents

  • Overview
  • Presentation Technologies Summary
  • Benefits and Considerations Matrix
  • Common Scenarios and Solutions
  • Additional Resources

Overview

This appendix will help you to understand the tradeoffs you must make when choosing a presentation technology. It will help you to understand the design impact of choosing a particular technology, and assist when choosing a presentation technology for your scenario and application type.

Your choice of presentation technology will be related to both the application type you are developing and the type of user experience you plan to deliver. Use the Presentation Technologies Summary to understand the technology choices available for each application type. Use the Benefits and Considerations Matrix to make an informed choice of presentation technology based on the advantages and considerations of each one. Use the Common Scenarios and Solutions to map your application scenario to common presentation technology solutions.

Presentation Technologies Summary

The following sections describe the Microsoft technologies available for each of the four basic application archetypes: mobile, rich client, rich Internet application (RIA), and Web.

Mobile Applications

The following presentation technologies are suitable for use in mobile applications:

  • Microsoft .NET Compact Framework. This is a subset of the Microsoft .NET Framework designed specifically for mobile devices. Use this technology for mobile applications that must run on the device as a stand-alone or occasionally connected application.
  • ASP.NET for Mobile. This is a subset of ASP.NET, designed specifically for mobile devices. ASP.NET Mobile applications can be hosted on a normal Web server. Use this technology for mobile Web applications when you must support a large number of mobile devices and browsers that can rely on a guaranteed network connection.
  • Microsoft Silverlight for Mobile. This subset of the Silverlight client requires the Silverlight plug-in to be installed on the mobile device. Use this technology to port existing Silverlight applications to mobile devices, or if you want to create a richer UI than is possible using other technologies.

Rich Client Applications

The following presentation technologies are suitable for use in rich client applications:

  • Windows Forms. This is the standard UI design technology for the .NET Framework. Even with the availability of WPF, Windows Forms is still a good choice for UI design if your team already has technical expertise with Windows Forms, and the application does not have a requirement for a highly graphical or streaming media UI.
  • Windows Presentation Foundation (WPF) application. WPF applications support more advanced graphics capabilities, such as 2-D and 3-D graphics, display resolution independence, advanced document and typography support, animation with timelines, streaming audio and video, and vector-based graphics. WPF uses Extensible Application Markup Language (XAML) to implement the UI, data binding, and event definitions. WPF also includes advanced data binding and template capabilities. WPF applications can be deployed to the desktop or within a browser using a XAML browser application (XBAP). WPF applications support developer/designer interaction—developers can focus on the business logic, while designers can control the appearance and behavior.
  • Windows Forms with WPF user controls. This approach allows you to take advantage of the more powerful UI capabilities provided by WPF controls. You can add WPF to your existing Windows Forms application. Keep in mind that WPF controls tend to work best on higher-powered client machines.
  • WPF with Windows Forms User Controls. This technology allows you to supplement WPF with controls that are not provided with WPF. You can use the WindowsFormsHost control provided in the WindowsFormsIntegration assembly to add Windows Forms controls. However, there are some restrictions and inconsistencies related to overlapping controls, interface focus, and rendering techniques used by the different technologies.
  • XAML Browser Application (XBAP) using WPF. This technology hosts a sandboxed WPF application in Microsoft Internet Explorer or Mozilla Firefox on Windows. Unlike Silverlight, you can use most of the WPF framework, but there are some limitations related to accessing system resources from the partial-trust sandbox. XBAP requires Windows Vista or both .NET Framework 3.5 and the XBAP browser plug-in on the client desktop. XBAP is a good choice when the required features are not available in Silverlight, and you can specify the client platform and trust requirements.

Rich Internet Applications

The following presentation technologies are suitable for use in RIAs:

  • Silverlight. This is a browser-optimized subset of WPF that works cross-platform and cross-browser. Compared to XBAP, Silverlight is a smaller, faster install but does not support 3-D graphics and text-flowable documents. Due to its small footprint and cross-platform support, Silverlight is a good choice for WPF applications that do not require premium WPF graphics support.
  • Silverlight with AJAX. Silverlight natively supports Asynchronous JavaScript and XML (AJAX) and exposes its object model to JavaScript located in the Web page. You can use this capability to allow interaction between your page components and the server, and provide a more responsive and interactive user interface.

Web Applications

The following presentation technologies are suitable for use in Web applications:

  • ASP.NET Web Forms. This is the standard UI design and implementation technology for .NET Web applications. An ASP.NET Web Forms application needs only to be installed on the Web server, with no components required on the client desktop.
  • ASP.NET Web Forms with AJAX. Use AJAX with ASP.NET Web Forms to process requests between the server and client asynchronously to improve responsiveness, provide richer experience to the client, and reduce the number of postbacks to the server. AJAX is an integral part of ASP.NET in .NET Framework 3.5 and later.
  • ASP.NET Web Forms with Silverlight Controls. If you have an existing ASP.NET application, you can use Silverlight controls to improve the user experience and avoid the requirement to write a whole new Silverlight application. This is a good approach for creating islands of Silverlight content in an existing application.
  • ASP.NET MVC. This technology allows you to use ASP.NET to build applications based on the Model-View-Controller (MVC) pattern. ASP.NET MVC supports test-driven development and clear separation of concerns between UI processing and UI rendering. This approach helps to avoid mixing presentation information with logic code.
  • ASP.NET Dynamic Data. This technology allows you to create data-driven ASP.NET applications that leverage Language-Integrated Query (LINQ) to Entities functionality. It provides a rapid development model for line-of-business (LOB)-style data-driven applications, supporting both simple scaffolding and full customization capabilities.

Benefits and Considerations Matrix

The following tables contain lists of benefits and liabilities for each of the presentation technologies described in the previous sections.

Mobile Applications

Technology

Benefits

Considerations

.NET Compact Framework

Runs on the client machine for improved performance and responsiveness.

Does not require 100% network connectivity.

Has a familiar programming model if you are used to Windows Forms.

Visual Studio provides designer support.

Is usually installed in ROM on the device.

Has a limited API compared to a desktop Windows Forms application.

Requires more client-side resources than an ASP.NET for Mobile application.

Is not as easy to deploy over the Web as an ASP.NET for Mobile application.

ASP.NET Mobile

Supports a wide range of devices, including anything that has a Web browser.

Does not have a footprint on the device because no application must be installed.

Has a familiar programming model if you are used to ASP.NET Web Forms.

Templates for designer support in Visual Studio can be downloaded from the Web.

Design support has been removed from Visual Studio 2008, but the controls will still render on devices.

Requires 100% network connectivity to run.

Performance and responsiveness are dependent on network bandwidth and latency.

Many devices now support full HTML support, so standard ASP.NET applications may be suitable.

Silverlight Mobile

Offers rich UI and visualization, including 2-D graphics, vector graphics, and animation.

Silverlight code running on desktops can run on Silverlight for Mobile.

Isolated storage is available to maintain objects outside of the browser cache.

Uses more device resources than a Web application.

Desktop Silverlight applications running on mobile may require optimization to account for reduced memory and slower hardware.

Requires the Silverlight plug-in to be installed.

May not run on as many types of devices as Web applications because of plug-in installation requirement.

Rich Client Applications

Technology

Benefits

Considerations

Windows Forms

Has a familiar programming model.

Microsoft Visual Studio provides designer support.

Offers good performance on a wide range of client hardware.

Does not support 3-D graphics, streaming media, flowable text; or other advanced UI features available in WPF such as UI styling and templates.

Must be installed on the client.

Windows Forms with WPF User Controls

Allows you to add a rich UI to existing Windows Forms applications.

Provides a transition strategy to full WPF applications.

Depending on the complexity of your UI, it may require higher powered graphics hardware.

You cannot overlay Windows Forms and WPF controls.

WPF application

Provides rich UI and visualization including 2-D and 3-D graphics, display resolution independence, vector graphics, flowable text, and animation.

Supports variable-bandwidth streaming media (Adaptive Media Streaming).

XAML makes it easier to define the UI, data binding, and events.

Supports separate developer/designer integration.

Depending on the complexity of your UI, it may require higher powered graphics hardware.

Your design team may be less familiar with Expression Blend compared to Visual Studio.

WPF ships with fewer built-in controls than Windows Forms.

WPF with Windows Forms Controls

Allows you to supplement WPF with controls that are not provided with WFP; for example, WPF does not provide a grid control.

Requires a WindowsFormsHost.

It may be difficult to get focus and input to transition across boundaries.

You cannot overlap WPF and Windows Forms controls.

WPF and Windows Forms controls use different rendering techniques, which can cause inconsistencies in how they appear on different platforms.

XBAP using WPF

Allows you to deploy a WPF application over the Web.

Provides all the rich visualization and UI benefits of WPF.

Is easier to deploy and update than a WPF or Windows Forms application.

Only works on Vista or on a client with .NET Framework 3.5 and the XBAP browser plug-in installed.

Only works in Internet Explorer and Mozilla Firefox browsers, and there may be some limitation on resource access on the client.

Rich Internet Applications

Technology

Benefits

Considerations

Silverlight

Provides a lightweight install for client machines.

Provides most of the UI and visualization power of WPF, such as media streaming, 2-D graphics, vector graphics, animation, and resolution independence.

Isolated storage provides an application cache independent from the browser cache.

Supports high definition video.

Client-side processing provides improved user experience and responsiveness compared to a Web application.

Supports a wide variety of languages such as C#, Visual Basic .NET, Ruby, and Python.

Supports windowless background processing as a replacement for JavaScript.

Provides cross-platform support, including Mac and Linux.

Provides cross-browser support, including Firefox and Safari.

Requires a Silverlight plug-in to be installed on the client.

Your team may be less familiar with Expression Blend compared to Visual Studio.

Lacks the advanced 3-D graphics and flowable text support of WPF.

Is not easy to transition from WPF or XBAP due to differences in the XAML and controls.

Silverlight with AJAX

Allows you to use existing AJAX libraries and routines from your Silverlight application.

Allows Silverlight objects to be dynamically created and destroyed through communication with the server as the user interacts with the application, which can provide additional opportunities for responsive and interactive interfaces.

May be an unfamiliar programming model if your team is used to pure ASP.NET or Silverlight.

Web Applications

Technology

Benefits

Considerations

ASP.NET Web Forms

Brings a development experience similar to Windows Forms to the Web.

Has no client dependency.

Requires no installation on the client.

Provides cross-platform and cross-browser support.

Provides Visual Studio design support.

A wide range of controls are available.

UI is limited to HTML and Dynamic HTML (DHTML) support.

Client-side storage is limited to cookies and View state.

Updating page contents requires a full postback and page refresh.

Has limited UI responsiveness because all processing occurs on the server.

ASP.NET Web Forms with AJAX

Provides improved UI responsiveness and a richer experience.

Supports lazy loading.

Allows partial page refreshes.

An integral part of ASP.NET 3.5.

May be an unfamiliar programming model if your team is used to pure ASP.NET.

Does not work if JavaScript is disabled on the client.

ASP.NET Web Forms with Silverlight Controls

Allows you to add Silverlight rich visualization and UI to existing ASP.NET applications.

Provides a strategy for transition to full Silverlight applications.

Requires the Silverlight plug-in to be installed on the client.

Your team may be less familiar with Expression Blend compared to Visual Studio.

ASP.NET MVC

Supports test-driven development.

Enforces separation between UI processing and UI rendering.

Allows you to create user friendly and search engine friendly URLs.

Provides full control over markup.

Provides full control over how content is rendered.

Navigation is controlled by configuration to greatly reduce the amount of code required.

Does not support View state.

No support for control events.

ASP.NET Dynamic Data

Allows the creation of fully data-driven sites that render automatically.

Has built-in support for LINQ querying languages.

Has built-in support for the ADO.NET Entity Framework.

LINQ allows you to model your database to create object-to-data mappings.

Currently there are only a few controls that support the technology.

Common Scenarios and Solutions

The following sections provide guidance on choosing the appropriate type of presentation technology for the four basic application archetypes: mobile, rich client, RIA, and Web.

Mobile Applications

For mobile applications, consider the following guidelines when choosing a presentation technology:

Consider using the .NET Compact Framework if:

  • You are building a mobile application that must support occasionally connected or offline scenarios.
  • You are building a mobile application that will run on the client to maximize performance and responsiveness.

Consider using ASP.NET for Mobile if:

  • Your team has ASP.NET expertise and you want to target the widest possible range of devices.
  • You are building an application that must have no client-side installation or plug-in dependencies.
  • You are building an application that can rely on 100% network connectivity.
  • You must use as few device resources or have the smallest footprint on the device as possible.

Consider using Silverlight for Mobile if:

  • You are building a mobile Web application and want to leverage the rich visualization and UI capabilities of Silverlight.
  • The devices you are targeting have easy access to or already have the Silverlight plug-in installed.

Rich Client Applications

For rich client applications, consider the following guidelines when choosing a presentation technology:

Consider using Windows Forms if:

  • Your team already has experience building Windows Forms applications and you cannot afford to change to another technology.
  • You are extending or modifying an existing Windows Forms application.
  • You do not require rich media or animation support.

Consider using WPF if:

  • You are building a rich client application and want to leverage the rich visualization and UI capabilities of WPF.
  • You are building a rich client application that you may want to deploy to the Web using XBAP.

Consider using Windows Forms with WPF user controls if:

  • You already have a Windows Forms application and want to take advantage of WPF capabilities such as advanced graphics, flowable text, streaming media, and animations.

Consider using WPF with Windows Forms controls if:

  • You are building a rich client application using WPF and want to use a control not provided by WPF.

Consider using XBAP if:

  • You already have a WPF application that you want to deploy to the Web.
  • You want to leverage rich visualization and UI capabilities of WPF that are not available in Silverlight.

Rich Internet Applications

For RIA implementations, consider the following guidelines when choosing a presentation technology:

Consider using Silverlight if:

  • You want to leverage the rich visualization, streaming media, and UI capabilities of Silverlight.
  • You are building an application that requires seamless deployment and the capability to delay load the individual modules it uses.
  • You are targeting a range of browsers across different platforms.

Consider using Silverlight with AJAX if:

  • You want to be able to dynamically manage the object instances in the Silverlight object model from your Web page.
  • You want to manipulate Silverlight controls based on user interaction within your Web page.

Web Applications

For Web applications, consider the following guidelines when choosing a presentation technology:

Consider using ASP.NET Web Forms if:

  • Your team already has experience building ASP.NET Web Forms.
  • You have an existing ASP.NET Web Forms application that you want to extend or modify.
  • You want to run on the widest possible range of client machines.
  • You do not want to install anything on the client.
  • You want to design simple functionality such as Create, Read, Update, and Delete (CRUD) operations without a rich UI or animation.

Consider using ASP. NET Web Forms with AJAX if:

  • You want to create ASP.NET Web Forms with a more responsive and richer user experience.
  • You want to support lazy loading and partial page refreshes.

Consider using ASP.NET Web Forms with Silverlight controls if:

  • You already have an ASP.NET Web Forms application and want to leverage the rich visualization and UI capabilities of Silverlight.
  • You are planning to transition your Web application to Silverlight.

Consider using ASP.NET MVC if:

  • You want to implement the Model-View-Controller (MVC) pattern.
  • You want full control over the markup.
  • You want to implement a clear separation of concerns between UI processing and UI rendering.
  • You want to follow test-driven development practices.

Consider using ASP.NET Dynamic Data if:

  • You want to build a data-driven application rapidly.
  • You want to use the LINQ query language or the Entity Framework data model.
  • You want to use the built-in modeling capabilities of LINQ to map your objects to data more easily.

Additional Resources

For more information, see the following resources: