Platform Proliferation Powers PDC 2005

icrosoft opened the PDC this year to a sold-out crowd eager to see the Redmond giant’s future plans. And they weren’t disappointed. Not only is Microsoft showing off future systems, it has provided each attendee with a jaw-dropping 30GB of software in a DVD box set consisting of various Community Technical Preview builds and betas, including:

  • Windows Vista Beta 1 as well as a later version called Windows Vista CTP: PDC05, Ultimate Edition (in both x86 and x64 versions)
  • Windows Server Codename Longhorn CTP: PDC05
  • Visual Studio 2005 Team System Beta 2
  • SQL Server 2005 June CTP
  • Virtual PC 2004
  • Virtual Server 2005 R2 Beta
  • WinFX Runtime Components September CTP, plus the VS 2005 extensions for WinFX
  • WinFS Beta 1

As if Windows Vista weren’t enough all by itself, Microsoft discussed a profusion of new “platforms” for developers and end users, including:

  • The Windows Sidebar (the area where the analog clock and other “gadgets” appear, gadgets being the semi-official term for applications that run in the Sidebar)
  • Windows Sideshow (a hardware-dependent window for mobile devices (including laptops) where applications such as mail and messaging can run without booting or opening the device)
  • Vista RSS (APIs that build RSS read and display capabilities directly into the OS)
  • Visual Studio Tools for Office 2005 (a framework for building applications on top of Office) and the Office Task Pane.

In bygone years only Vista would have been called a platform, but the new nomenclature is indicative of a larger trend in development?a shift from old-style code-intensive programming to configuration. This shift is occurring for three reasons: First, the tools themselves have become so capable that most developers don’t need to enhance them (through code) to provide application features as much as guide them (through configuration) to expose the features already built-in. Second, because the ever-increasing need to produce robust and secure code quickly demands a high level of code reuse?and configuration-driven programming is a good way of reusing existing, tested, and secure code. Finally, today’s applications must often run on multiple devices; therefore, to maintain a common code base, enterprises need to isolate application functionality from the host platform.

One way of doing this isolation is through configuration, using easily alterable control files as a way of letting the application adapt to the capabilities and limitations of the target device at runtime. For example, Darryn Dieken of Netflix showed a .NET DVD-rental demo built using Netflix’s RSS feeds and the Windows Presentation Foundation (WPF, formerly known as Avalon) that ran similarly in three configurations: a desktop using a mouse, a Windows Media center using a remote control, and a PDA using a stylus. Despite wide variations in input method and screen real estate, they were able to use a common code base, making minimal changes for each device type.

In bygone years only Vista would have been called a platform, but the new nomenclature is indicative of a larger trend in development?a shift from old-style code-intensive programming to configuration.
This trend toward configuration-driven programming, which began in earnest a long time ago with Visual Basic’s “Properties” window, has grown to encompass far more than simple property values. It now encompasses entire UI features via XAML and Atlas, Microsoft’s framework for implementing AJAX applications, communications features via the Windows Communication Foundation (WCF, formerly known as Indigo), and application behavior via metadata and configuration files. For example, you can develop and deploy an application, and then later change its entire UI by altering a text file containing the XAML that defines the look-and-feel. Or you can add bindings to a Web service, changing the way clients authenticate or connect by altering the service’s WSDL file.

Of the keynote demonstrations Tuesday that showed code?with the exception of the Language Integrated Query (LINQ) that I’ll discuss later?the bulk of the code-based operations shown were configuration-related rather than code-related. The results are impressive, but the audience response was weak. Configuration, whatever the results, isn’t quite as satisfying as coding.

However, if you’re not that keen on writing much code anyhow, the new capabilities are legion. In his keynote Tuesday, Jim Allchin, Microsoft’s Group Vice President of Platforms, joked that every Vista application had to include 3D capabilities, and every Vista demonstration obliged. Chris Caposella, Microsoft’s Vice President for the Information Worker Product Management Group had the task of demoing Vista to the crowd, and the OS’s WCF-powered 3D presentation system was stunning. Tasks such as taking a set of 2D images and animating them so that a user can “flip” through the stack have left the realm of high-end games and expensive digital animations and entered the realm of business applications.

XAML provides a way for graphic designers to become key players in building applications by separating the visual elements of an application from the code that activates them. Just as in HTML, designers provide the look and unique names for objects, while developers use those names to link objects to code and data. The upshot is that designer/developer collaboration can produce applications far more attractive than most developers can produce on their own, but the intrinsic separation means minimal code changes for developers in the event of a design change.

Sparkle Redux
In Wednesday’s keynote, Eric Rudder, Microsoft Senior Vice President of Servers and Tools, discussed the now resuscitated “Sparkle” (which, if you remember, was originally said to be a “Flash killer”). Sparkle is now three separate products in a suite named “Expression,” consisting of the Quartz Web Designer, the Acrylic Graphic Designer, and Sparkle Interactive Designer. Joe Marini and Mark Boulter showed how this suite empowers designers in the development process by interactively designing, modifying, and activating a Visual Studio project. The project opens directly in Expression, where a designer can modify forms. Even though the developer may have the project open, Visual Studio 2005 recognizes that changes to the form were made in an external program, and refreshes the developer’s view, creating a highly collaborative environment where both developers and designers can see and work on the form with the tools each needs.

Office and IE 7
In addition to support for the default XML file formats announced earlier this year, Office 12 gains a new dynamic toolbar, largely intended to make those features more apparent. Allchin said in surveys asking users what features they’d most like to see in Office, users frequently requested existing features?unaware that they existed, hidden under too many menu layers.

In Office 12, when you click on a menu in Word or Excel, rather than dropping down a menu as in previous versions, the toolbar area changes, making all the common tasks available through point-and-click. But perhaps the most appreciated feature was the “hover preview,” which applies non-stick formatting or visual effects to selected text or objects by simply hovering over one of the buttons on the toolbar. For example, by first selecting text in a Word document, and then hovering over a font type on the toolbar, the selected text changes to provide an instant preview of how the document would appear if you actually applied that font. Hover over a different font, and the selected text changes to that font. Similarly, in Excel, you can hover to preview the way a table would look with any of the built-in table formatting styles.

For developers, Visual Studio Tools for Office 2005 (VSTO) provides a visual design paradigm, integration with .NET controls, and convenient managed-code wrappers for the underlying COM objects that power the Office suite. In a private interview, Eric Carter, a lead developer on the VSTO team and coauthor (with Eric Lippert) of the soon-to-be-released C#-focused book Visual Studio Tools for Office, revealed that the new version was designed to get professional developers interested in building Office applications, giving them the tools for enhancing and customizing the major Office suite applications. VSTO 2005 developers can target Word, Excel, Outlook, and InfoPath; Carter said that future plans include adding support for PowerPoint and Access, as well as more powerful managed-code interfaces.

IE 7 (finally) adds tabbed browsing and RSS capabilities as well as phishing scam prevention and other security enhancements. One nice feature is that the browser will scan any page for RSS feeds and then you can subscribe to them easily from a dropdown list.

Language Innovations
Of course, no PDC would be complete without announcements about upcoming enhancements to the programming languages themselves. For those who still like to code, the most important announcement was the Language Integrated Query (LINQ) project, which aims to add XML, database, and object query capabilities directly to C# and VB.NET, obviating the need to learn separate query languages such as XPath, XQuery, or SQL, and ancillary technologies such as ADO.NET or ODBC.

By adding query capabilities directly to languages, developers also enjoy compile-time checking and Intellisense features. Anders Hejlsberg and Don Box showed a code-centric demo that retrieved a list of running processes on a machine, extracted and sorted the ones using a working set (memory) exceeding 1024 x 1024 x 4, and then combined the resulting list with a text description drawn from a SQL Server database, using C# code that looks like this:

ProcessDescriptionDb db = new ProcessDescriptionDb();var query =    from p in Process.Getprocesses()   where p.WorkingSet > 1024 * 1024 * 4   orderby p.WorkingSet descending   select new {      p.ProcessName,      p.WorkingSet      Description = (         Fom d in db.processDescriptions         Where d.processName = p.ProcessName         Select d.Description      )   };foreach (var item in query)   Console.Writeline("{0,-30}{1,10:N0} {2}", item.ProcessName, item.WorkingSet, item.Description);

The code outputs a formatted list of the selected items and their descriptions.

One particularly interesting portion of LINQ is XLinq, which provides both DOM and XPath/XQuery XML capabilities. For example, suppose you represent a set of employees in XML, such as:

         1001     John Doe            1002     Jane Doe     Marketing      ?

Using XLinq in VB.NET you can assign the XML directly to a variable?maintaining the formatting you’d prefer?for example:

Dim emps as XElement =    1001      John DoeSales   1002      Jane DoeIT   ?

You can even mix variables and expressions into the XML, using the <% %> syntax familiar to ASP and ASP.NET developers. For example:

Dim aPhoneNumber As String = "111-222-3333"Dim emp as XElement = John Doe<% aPhoneNumber %>

Currently, you’d use an XML parser to extract the employee names from the XML and display them in a listbox. With LINQ, developers can write code such as:

For Each Dim empName In emps...name   lstNames.AddItem(emp.Value)Next
Author’s Note: The dots in the preceding code aren’t used to indicate missing content, they’re a descendants syntax indicating that the code should search for all elements that are descendants of the element at any depth.

Equivalent capabilities exist for C#. To find out more, read the information available on the VB.NET future developments page.

I’ve saved the best part for last. Although these new features are targeted at the next versions of VB.NET (9.0) and C# (3.0), you can explore LINQ’s features using the latest beta of Visual Studio 2005 right now?you don’t have to wait until the next version! The Technical Preview download contains pre-release versions of the various components of the LINQ Project and compilers for both C# and VB.NET, and will work with the release versions of VS 2005 as well.

Download the technology previews for LINQ in either Visual Basic or C#.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Related Posts