Chapter 20. Deployment


After you have built a great VSTO solution by customizing a Word document or Excel spreadsheet, you have to get the final bits of the code to your users somehow. But how? There are two broad classifications of deployment scenarios: local install and network install. Each has pros and cons.

Consider how this problem has traditionally been solved in the application programming world. In the traditional rich client or thick client application, all the application logic is stored in files that somehow get copied to the local machine. There might be a single .exe file, orthe solution might have a number of .dll files associated with it that also need to be installed. When installing a thick client application, often the administrator or end user needs to runsome kind of setup program to ensure that everything is registered and in the right location.

Rich client applications can take advantage of the full power of the client environment and are always available. Install an application; unplug your laptop; hop on a plane; and your applications are still there. That very strength, however, is also a potential weakness: You have whatever version you installed, which is not necessarily the latest version. If your organization has many applications installed on many machines, ensuring that every machine is up to date can be a full-time job.

Exactly the opposite is true of thin client applications, where the application logic is on a network server somewhere. When the client logic is in the form of HTML and script downloaded fresh every time you refresh the page in the browser, updating every client is easy; just put the latest version on the Web server, and every client will get it the next time he or she navigates the browser to your site. But thin client applications often squander the power of modern desktop and laptop computers by targeting a lowest-common-denominator platform that assumes nothing more than a browser; JScript was not designed for manipulating huge datasets. Thin client applications also frequently work poorly in disconnected scenarios, particularly if much of theapplication logic is on the server.

VSTO is all about taking full advantage of the power of locally installed Office applications. Because the customization assembly need not be in the same location as the document itself, VSTO cleanly supports both local installs (for offline scenarios) and network installs (for always-up-to-date scenarios). Furthermore, advanced users can take advantage of local caching of network-installed customization assemblies to get the best of both worlds: offline access to a locally cached customization assembly, but a guarantee that you are always using the latest version when connected.

This chapter covers how to use the Publish Wizard in Visual Studio to deploy applications toservers, how to create a setup project for a Word or Excel project, and how to use the ServerDocument object model to edit the deployment information inside a Word or Excel document. The chapter finishes with a discussion of some of the advanced offline-caching scenarios.




Visual Studio Tools for Office(c) Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath
Visual Studio Tools for Office: Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath
ISBN: 0321411757
EAN: 2147483647
Year: N/A
Pages: 221

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net