Click-Once Deployment and Reg-Free COM: Smart Clients Reach Fruition
While Indigo is still very much a future-looking proposition, many other proposed changes to improve application architecture are starting to bear fruit; developers at VSLive! had their choice of many technical sessions that advised how to begin really implementing "smarter" applications that can detect network awareness and cross the chasm between connectivity-dependent Web apps and stuck-in-the-mud Windows applications. Microsoft seems to be betting that the time is ripe for smart client deployment. (For a brief primer on the smart client architecture, see the sidebar "Smart Clients: The Best of Both Worlds.")
In Visual Studio 2005, you use "Click-Once" deployment to "publish" a server-based installation package that clients can download and install with a single click. Even better, these smart clients can update themselves automatically, just like a Web application, so that deploying an updated version of an application consists of little more than publishing the updated files on the server and creating a new manifest file. The next time a user launches the smart client, it recognizes that a new version is available, and downloads and installs it automatically.
But what if your application requires a COM component or DLL? Belatedly, Microsoft has also made it possible to use ClickOnce technology to deploy applications (to Windows XP only) that require older COM components, but without modifying the registry, letting different applications use different versions of COM components simultaneously—a capability that would have largely circumvented "DLL Hell" if it had been made available several years ago. Microsoft originally termed assemblies deployed in this manner as "side-by-side assemblies," but it's been renamed to "Reg-Free COM."
Moreover, smart clients use Web services to mimic the role that Web browsers played in querying and updating centralized data. In other words, smart clients eliminate the management problems that plagued the earlier rich clients.
Visual Studio Tools for Office
Microsoft also announced a new version of Visual Studio Tools for Office (VSTO, pronounced "visto" by the Redmond delegates)—and this version has grown up. While the first version provided .NET developers with easy ways to access the Office object model, this new version is nothing less than a specialized copy of Visual Studio that targets Office applications as a new "platform." Sure, Office developers have been writing applications on top of Office for a long time but never with this level of support.
|Figure 1. Excel Hosted in VSTO: The figure shows an Excel workbook hosted in the VSTO development environment. Note how the Excel workbook becomes the design surface in a VSTO project.
When you select Word or Excel as your target in VSTO, the Word document or Excel workbook appears inside Visual Studio as the design surface, just as a new Windows Forms or ASP.NET application provides a Windows Form or Web Form as a design surface (see Figure 1). You have the full range of .NET controls available in the toolbox, along with all their properties and events. VSTO also exposes Word and Excel objects as first-class .NET objects, along with Intellisense, a full set of events that you can intercept and program, and all their properties. In other words, VSTO lets you bypass much of the process of learning the complex object models of Office applications and simply use your knowledge of the .NET framework to program them. But you still have the full power of the Word or Excel application available. You can even interact with VBA code, so you can take advantage of your legacy code.
VSTO will ship as part of the Visual Studio Team System for enterprise developers, and will also be available as a standalone product and as an integrated add-on to Visual Studio Professional. When you purchase VSTO as a standalone product, you get the VB.NET and C# languages, but not Managed C++ or J#, nor do you get ASP.NET or the Compact Framework development capabilities of the Visual Studio Professional product, but other than those, you get the full power of the framework. If you later decide to purchase VS Professional, the two products integrate so that you have only one development environment rather than two separate IDEs. The same is true in reverse—if you start with VS Professional, VSTO integrates into your existing installation. In both cases, if you already have one, you'll be able to upgrade to the other at a reduced cost.
In many ways, developing to the Office platform makes perfect sense, because Office is already a smart client. A client is really just a runtime platform that can execute code; whether you decide to make the client a browser, the .NET framework, or Office really depends on what your users already have available, and what the deployment considerations of your particular application are. Bear in mind that when you develop an application for Word or Excel, you automatically get a rich client with powerful formatting, display, charting, and printing capabilities built-in. Many applications that developers have until now written as Windows Forms or Web applications should benefit from the newly elevated status of the Office platform.