Chapter 1: The "Longhorn" Opportunity

 

Preface

Chapter 1: The "Longhorn" Opportunity

Karsten Januszewski
Microsoft Corporation

October 2003
Sample updated June 2004

Applies to:
   Longhorn Community Technical Preview releases (both PDC 2003 and WinHEC 2004)
   Note: The downloadable sample code is based only on the Longhorn Community Technical Preview, WinHEC 2004 Build (Build 4074)

Contents of Chapter 1

Introduction
    Analysis and Assessment
    A Brief Overview of "Longhorn"
    Presentation, Storage, Communications, and WinFX
    Avalon (Presentation)
    Indigo (Communications)
Summary

Introduction

The release of "Longhorn" represents a milestone in the history of client operating systems. The next version of the Microsoft® Windows® client represents a vast array of new functionality and provides a platform for writing a new type of software that realizes the potential for the kinds of applications demanded by customers. New APIs and system services offer a rich array of functionality and offer many possibilities.

However, Microsoft recognizes that it is essential for existing applications to continue to run and thrive on this new platform and, with this in mind, Microsoft's goal is for all current applications to continue to execute as expected. Not only is backward compatibility essential, but it is also important to provide a mechanism such that new functionality can be incorporated into existing applications in an incremental fashion. It may be the case that some software developers will choose to rewrite their entire application using exclusively new APIs and functionality. However, many will choose to incorporate a subset of the new APIs and functionality into their existing applications. In addition, many organizations will need to continue to maintain an existing code base for earlier clients. The platform provided by "Longhorn" allows for all of these strategies across the spectrum—from not modifying a single line of code to rewriting the entire application, and everything in between.

With this range of options, guidance is crucial to understand how to proceed. There are many different ways to approach this spectrum and important engineering decisions must be made regarding which areas of "Longhorn" to target and how to approach the topic of interoperability and migration. This guide will provide alpha patterns and practices for architects and developers with recommended approaches, strategies, and techniques.

Analysis and Assessment

There is no single "Longhorn" migration strategy for existing applications. There is a collection of possible strategies and a particular application may use more than one strategy. Much depends on the specifics of the application. In order to choose a strategy, an evaluation of the application must occur from a technical perspective. Following that, a cost/benefit analysis of the different migration strategies is in order.

There are four basic approaches to migration.

  • Completely port the application to WinFX™ managed classes. This approach is the most labor intensive. However, it provides the greatest access to the "Longhorn" feature set, and puts the entire application under a common framework.

    Note   WinFX is described further in Presentation, Storage, Communications, and WinFX.

  • Rewrite parts of the application using WinFX, but leave others essentially as-is. Parts of the application may make little or no use of "Longhorn" features or derive too little benefit from "Longhorn" to make porting that part of the application worthwhile. Others areas of the application, such as UI code, may gain substantial benefits from porting to "Longhorn." In this scenario, the preexisting code is left largely intact, but modified to interoperate with other parts of the application that have been ported to WinFX.

  • Host discrete Win32 modules, such as an ActiveX control, in a new "Longhorn"-based application. Some applications have a substantial investment in code that is contained in discrete modules, such as ActiveX controls. This investment can be maintained by hosting these modules in a "Longhorn"-based application. This approach is especially useful short term. An application can be up and running quickly by simply hosting the modules, while over the longer term, rewriting the modules in WinFX.

  • Host a "Longhorn" component, such as a wizard, in an existing application. You can extend an existing application, such as a Windows Forms application or a Win32 application, to take advantage of "Longhorn" technologies by hosting "Longhorn"-based modules such as controls or dialog boxes. This is also a useful short-term expedient to quickly add "Longhorn" capabilities to an application, while over the longer term rewriting the application more fully.

A Brief Overview of "Longhorn"

The first step in thinking about how to optimize an application for "Longhorn" is to understand the opportunities that "Longhorn" offers. Before diving into the specifics of the new APIs and functionality, taking a step back to look at the larger picture will bring into focus the business and technical opportunities that "Longhorn" was designed for.

"Longhorn" is optimized for a new class of applications that is emerging. These new applications are characterized by the combination of network awareness and local resource utilization. They communicate with other nodes (server or other clients) in a network (the Internet or intranet) participating in larger service-oriented architecture. They use local resources (CPU, GPU, storage, bandwidth, and more) to deliver an efficient and effective end-user experience, and can function offline or online.

Already there are many examples of applications that conform to this definition. However, developing smart, connected applications is not a trivial undertaking. Attempting to develop such an application presents a number of challenges—from the difficulties associated with supporting both online and offline experiences to concerns about deployment and maintenance.

What distinguishes "Longhorn" is that it was developed from the ground up to address the barriers associated with creating such applications. System services and new APIs handle many of the hard problems associated with such applications, so that application developers can focus on their specialty—offering an experience suited to the particular problem that their software is addressing.

"Longhorn"-based applications are thus embodied by the following characteristics:

  • Function online or offline with no-touch deployment.
  • Connect with peers and servers over any network topology.
  • Collaborate with others through shared data, events, and communications.
  • Take advantage of shared data and metadata schemas.
  • Present data and/or media to the user with high fidelity.
  • Run safely within code access security policies.
  • Recognize associations among people and groups.

Presentation, Storage, Communications, and WinFX

"Longhorn" offers a range of APIs and services that make the development of this type of application efficient and effective. This functionality is embodied in WinFX—a comprehensive set of managed APIs for writing "Longhorn"-based applications. Years in the making, this refactored set of APIs provides all the functionality of the Win32 APIs and more. Perhaps the most revolutionary aspect to WinFX is that it is entirely available in managed code. This API set complements the classes already present in the .NET Framework, adding a substantive range of new class libraries.

Note   It is important to call out that much of WinFX is not available on down level operating systems such as Microsoft Windows XP.

For a more substantial discussion of the benefits of managed code, see Chapter 2 of this guide.

Within WinFX is a range of new functionality. Exploring the "Longhorn" SDK documentation is the best way to understand the details of this new API. However, for the purposes of this document, a useful analysis is to look at WinFX from a high level to see the different groupings of new capabilities of the operating system.

It is important to understand the capabilities of three key innovations in "Longhorn"—Presentation, Data, and Communications—and then work to determine how an application can take advantage of them. By analyzing an application from these three perspectives, one can best understand how an application can benefit from the new features of "Longhorn." Consider the following questions with regard to a given application:

  • Presentation. How is the user interface currently rendered? Can users navigate this user interface adroitly? Is the interface pleasant to interact with? Is data visualized in a way that is tangible to the user? Would it be appropriate to provide different skins on the user interface for different audiences?
  • Data. How is data from the application stored on the local PC? How does the application expose metadata to other applications and to the operating system about files it has encountered? How easily can users search for this data?
  • Communications. How does the application communicate to the server? Are there security or reliability enhancements that could be made to this communication pattern? Can the application work offline? Are there third-party services or services that could benefit the application?

The following 2 sections ("Avalon" and "Indigo") provide a brief summary of the innovations in these areas. Again, further information about the capabilities in "Longhorn" is available in the "Longhorn" SDK documentation.

Avalon (Presentation)

"Avalon" is the code name for the presentation and media technologies in "Longhorn." "Avalon" represents a significant evolution of presentation technology, with the goal of allowing developers to easily build rich and compelling user interfaces that can seamlessly integrate high-quality document and multimedia content.

The presentation technologies in "Longhorn" enable developers to deliver an exciting and compelling user experience by providing a full set of the prepackaged UI components, multimedia support, and smooth integration of applications into the user interface. "Avalon" is designed to take advantage of the capabilities of local hardware, so that all applications use the power of the graphics processing unit, rendering high quality, next generation user interfaces.

Indigo (Communications)

"Indigo" is a set of technologies for developing connected applications on the Windows platform. It provides a complete and flexible messaging platform for building connected applications independent of network topology. It is based on broadly-adopted XML Web services protocols, thus fostering interoperability with other XML Web services platforms.

Developers can write applications on a simple yet powerful programming framework to use these communication features that exchange information across clients, services, and devices.

Summary

"Longhorn" is an important release for Microsoft that lays down a solid foundation for building the next generation of applications. It features WinFX, a set of managed APIs for developing this new type of smart, connected applications. WinFX provides advances in presentation, storage, and communications that enhance the writing of these applications. Existing applications will be able to take incremental advantage of the new capabilities in "Longhorn" through a range of different approaches depending on the scenario and feature.

The next chapter will look at how one can begin to prepare for "Longhorn" today, both in terms of architectural recommendations and low-level code recommendations.

Continue to Chapter 2: Preparing for "Longhorn"

© 2003 Microsoft Corporation. All rights reserved.

Microsoft, Win32, Windows, Windows NT, Windows Server, WinFX, and ActiveX are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.