Search:
Locator+ Code:
FTPOnline Channels Conferences Resources Hot Topics Partner Sites Magazines About FTP RSS 2.0 Feed
 

Inside Longhorn: The Details
Microsoft divided its presentation of Longhorn into three basic aspects: presentation (code-named Avalon), data (code-named WinFS), and communication (code-named Indigo).
by Don Kiely

PDC, October 28, 2003

User interfaces today are targeted at different platform and device technologies, such as Windows or Web forms-based applications. You can create a multi-tier application that allows client code of any type to access the middle and data tiers, but you have to write different client code for each version of the interface. Longhorn's presentation services, code-named Avalon, is the first step in unifying all client code technologies, providing a brand new way of defining a user interface in Longhorn. It is a unified presentation model for Windows apps, Web apps, graphical apps, and apps that run on various devices. It also has rich support for advanced input devices, such as a TV remote control, virtual ink, and various smart devices. Microsoft is again raising the level of abstraction that Windows makes over the hardware.

Avalon defines UI elements using XML and the integrated, vector-based graphics composing technology in Longhorn. This provides a clear separation of coding from content, conceptually similar to how today's ASP.NET code in a code-behind file can be completely separate from a page's HTML presentation. It's a form of declarative programming, with UI objects defined in an XML file that uses a new syntax called XAML (Transaction Authority Markup Language). XAML is sort of like SVG, a W3C standard for displaying rich vector graphics. Microsoft is moving away from bitmaps because vector objects easily and cleanly scale in size, and you can add cool effects that rotate entire sets of controls to any angle while retaining their crisp appearance. In fact, one of the coding demos during the keynote kept the entire contents of a form at an angle with a video forming the background. It was annoying to look at for long, but a fine demonstration of Longhorn and XAML's capabilities.

XAML has the usual benefits of XML: you can create it using a variety of tools, many applications know how to consume it, and so on. A designer can create the XAML code for the appearance of an application; a developer can then write the code-behind the visual design in ways that work. Like ASP.NET, XAML means that the definition of a single window's appearance and behaviors could be contained in multiple files, combining the output of different people on the development team. It remains to be seen how easy it will be to coordinate simultaneous development paths like this.

The close integration between Longhorn and the .NET Framework means you can use any CLR-compliant language—any .NET language—instead of XAML to generate the objects. So you can still keep application logic and content all together in your code if you prefer to do that.

Longhorn extends the RGB color settings in Windows, such as #FF00FF, by adding a leading setting for opacity to make the setting something like #50FF00FF. When you see the Longhorn UI, you'll see that there are lots of panels that let underlying windows show through. I don't like this feature in existing versions of Windows, mostly because using it with individual objects and windows generally doesn't add any additional functionality and usually doesn't make the UI any more attractive. But designing the entire Windows UI so it is transparent works, at least in the demos shown so far at PDC.

Unified Data: WinFS
Microsoft Chairman Bill Gates has long spoken of a unified data store in Windows. The problem today is that each application has its own islands of data that are largely locked within that application. For example, I have contacts scattered around my machine in Outlook, Quicken, a random Access database or two, and in various small utility programs I use. Occasionally, one application can read another's data, but most often it is only to import the data so that I have duplicate sets of data that are never again in sync. Worse, relationships between data are buried in the applications that own the data. In the file system, the shell views in Windows Explorer are tied to a folder hierarchy that makes it hard to work with various data in their best form. For example, you can have video, photo, and Excel workbooks in a single directory but unless you do a search you can't view a list of all the Excel workbooks on your system. And a thumbnail view is great for photos but worthless for workbooks. The situation begs for a higher abstraction of data with the ability to preserve relationships while tagging data with identifying properties.

WinFS is a new set of Longhorn services that provides a flexible data store that is managed by Windows. Using new controls and framework interfaces, you can hook into those data stores and share data between applications. It uses a set of extensible XML schemas that provide logical views into the data, no matter where it exists on a system. It provides programmatic access and synchronization services to move around data in consistent ways. You can even set up information agents to, for example, notify you when data changes.

Probably most intriguing about WinFS is how you can add attributes to data so that you can use it with different apps, search it, and view it logically or virtually any way you'd like. It supports object-based, SQL, and XML interfaces, using a data model built on NTFS streams.

The most surprising thing about the keynote was that even with all the talk about data, it centered completely on WinFS. The only mention of Yukon was a vague architectural slide in Gates's deck. Yukon was supposed to be the big thing at this PDC, but it didn't make the cut in day one of the show.

Communicating with Indigo
The third major focus in Longhorn is communication, and the presentation focused completely on Web services. Microsoft intends to build these XML-based formats and protocols directly into Windows, saving us from the barrage of toolkits and VS.NET add-ons that we've suffered through over the last few years.

But these aren't your grandmother's Web services. Now that Web Services Enhancements (WSE) have become reality, Longhorn will support secure communications with most or all of the support that reliable business communications require. You'll be able to wrap exchanges in transactions and protect data from prying eyes and random corruption with digital signatures and other technologies. Viewing the demos in today's keynotes evoked images of the computer as central command, managing your every communication with the world, including messaging and collaboration of all forms. Jim Allchin, Group Vice President of the Microsoft Platforms Group, spoke of managing presence—how an application responds when a person is online. The implication is that Longhorn apps will go far beyond today's instant messenger capabilities where at most you can get a notification when someone comes online.

Indigo uses a port and channel metaphor to let you hook into Longhorn's communication services. You'll feel right at home if you've done any sockets-type programming in .NET, except that the objects in Indigo are far more flexible, more highly abstracted away from the various underlying protocols, and more intelligent.

Supercomputer Required for Admission?
The graphics features of Longhorn require enormous computing power to make them appear smooth to the user, so the OS makes heavy use of the GPU—graphics processing units—that are lightly used in today's apps outside of games and other graphics-intense apps. Longhorn users will have a much better experience with beefier hardware. Windows is once again leaving in the dust many of the machines typical users are buying today.

Longhorn is going to usher in a brave new world of Windows development, along with a near-nightmare of compatibility. Microsoft is emphatically committed to making existing Win32 apps run on Longhorn. But you'll have a hard time writing new applications that use Longhorn features when running on Longhorn, but degrade gracefully when running on older versions of Windows. Many software companies will be faced with maintaining parallel code bases with no clear upgrade path from Win32 versions to WinFX versions. I hope that Microsoft provides tools and strategies when Longhorn is released to move those applications forward in sensible ways.

When can we expect Longhorn will appear on computers near you? Microsoft isn't saying, but Jim Allchin did say the company is shooting for a beta 1 release in the first half of 2004. That means it's a safe bet that we'll see a final release in 2005 or later.

An important point to keep in mind: The bits released at PDC (and available soon to MSDN subscribers) is alpha software. That's pre-beta, so it is unstable, has entire feature sets that aren't implemented, and has features implemented that will likely change radically before the first real beta. But as an indicator of the directions of Windows computing and development, there is a lot to get excited about. Microsoft has once again set some ambitious goals for itself. Time will tell how successful it is.

About the Author
Don Kiely, MCSD, MCP, MDE, is a senior technology consultant. When he isn't writing software, he's writing about it, speaking about it at conferences, or training developers in it. Reach him at donkiely@computer.org.