Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

Overview of Smart Client Applications in the Microsoft Office System

Summary: Smart client applications are applications that take full advantage of information exposed by Web services. Because the Microsoft Office System offers native support for XML, application data can be described by the same customer-defined XML schemas across multiple applications. This enables developers to create smart client solutions for the Microsoft Office System that ensure consistently up-to-date enterprise information and a competitive advantage in today's business marketplace. (7 printed pages)

Peter Kelly, 3Sharp, LLC

October 2003

Applies to: Microsoft Office System, Microsoft Office InfoPath 2003

Contents

Key Concepts and Definitions

VBA   Microsoft Visual Basic for Applications (VBA) is a version of the Microsoft Visual Basic development system for Windows that is used to build applications for the Microsoft Office 2003 System.

XML   eXtensible Markup Language is a metadata definition language used to describe data in a structured open format.

XML Schema   An XML Schema is a set of rules, typically written as XML that describes the structure that an XML document is required to follow.

Web Services   Web services enable open communication between programs written in different languages on different platforms. Web service standards provide a flexible way for companies to expose or consume data on the Internet between disparate systems, while minimizing point-to-point integration challenges.

Smart Clients: Anywhere, Anytime Access

In today's fast moving and competitive marketplace, access to enterprise data anytime, anywhere, and from any device is a critical business advantage. Recently, new dynamic enterprise applications based on the Microsoft .NET Framework have emerged that take advantage of client-services-server models for distributing and consuming data via Web services.

By using Web services to provide access to their own business data, organizations can continually update how and what information is shared via the Internet, with partners, customers and employees, and within their own intranet and business applications across disparate data sources. With premier technology for smart client solutions, the Microsoft Office System provides organizations with powerful data analysis, collaboration, reporting, and presentation features to turn data exposed by Web services into information and business opportunities.

Smart clients are "intelligent" client applications that adapt to various client usages and their runtime environments. They combine the flexibility and immediacy that comes with online access to data and applications with the full functionality of traditional client software. Key smart client examples are Microsoft Office Word 2003 and Microsoft Office Excel 2003 smart documents and Microsoft Office InfoPath 2003 form solutions.

These are described in greater detail further in this paper, but, basically, these smart clients consume Web services and interact with the data exposed by those Web services, even when offline. As a result, with the Microsoft Office System, an enterprise can integrate new data sources with the familiar, comfortable user interfaces of Word 2003, Excel 2003, or other Microsoft Office System programs to develop flexible and innovative smart client solutions.

Web Services

Web services enable businesses to offer a wide range of integrated custom business solutions by facilitating programmatic access to disparate data sources and exposing those data sources to smart client applications. Much like component software, Web services are programmable and reusable. However, once deployed to an intranet or the Internet, client access is very easy.

If enterprise data exposed by a Web service is persisted by a smart client application, the information worker can disconnect from the server yet still maintain the ability to process, manipulate, analyze, save, and share data provided by the Web service. Once reconnected to the corporate server, the smart client intelligently updates data sources as permitted by the application logic.

Microsoft Office System and Smart Client Technologies

With the Microsoft Office System, client applications can become part of an organization's information management cycle, not just static containers for binary data. Smart clients can be integral components in an organization's information infrastructure, integrated into the business logic and processing data by using Web services. By using XML in the Microsoft Office System to separate the data from other aspects of a document, presentation, or spreadsheet, content created by information workers can be reused by other applications. And, because application data in the Microsoft Office System can be described by the same customer-defined XML schema across multiple applications, it is now easier for developers to integrate that data into smart client solutions for their organization.

For example, smart tags and smart documents in Word 2003 or Excel 2003 make it possible to associate user actions with XML-defined data. Figure 1 shows a smart document that provides key information about a medical doctor by using a Web service that connects to a back-end data source. Once an information worker types in a doctor's name, the smart document retrieves data and then displays that information based on its XML structure.

Figure 1. Smart client solution using a smart document in Office 2003


Smart client solution using a smart document

While smart documents are the ideal smart client solution for many scenarios and needs, InfoPath 2003 solutions are a key smart client choice for many scenarios as well. InfoPath allows organizations to create dynamic, structured business forms based on underlying XML schemas. Like smart documents, InfoPath 2003 enables information workers to use Web services to create, access, and use enterprise information. The differences between smart document solutions and InfoPath solution will be explored further below. For a deeper discussion of when to use InfoPath, when to use smart documents, and when to use other solution options, see InfoPath 2003 Decision Tree: Comparing InfoPath Forms to Other Microsoft Solutions.

InfoPath 2003 as Smart Client

Because InfoPath 2003 has built-in support for Web services, it is an ideal client for data gathering and interoperability. InfoPath 2003 works with any server that exposes data using Web services. Figure 2 shows many common back-end and middle-tier systems that can be configured to communicate using Web services based on standards such as SOAP, Universal Discovery Description and Integration (UDDI), and Web Services Description Language (WSDL). InfoPath provides a fully functional user interface to these systems; with minimal effort, an InfoPath form can be designed to exchange XML data with one or more middle-tier/back-end systems.

Figure 2. InfoPath communications with back-end and middle-tier systems over Web services


Communications with back-end and middle-tier

InfoPath also has built-in support for databases in Microsoft Office Access 2003 and Microsoft SQL Server using Microsoft ActiveX Data Objects (ADO).

Using InfoPath as a smart client offers a number of benefits, a few of which are listed here:

  • Customer-defined schema support   InfoPath supports customer-defined schemas that are based on the W3C XML Schema (XSD) standard. With InfoPath, customers can design forms based on an existing schema. If a schema doesn't exist, InfoPath creates a schema based on the form design.

  • Easy workflow integration   Using InfoPath built-in support for http, Web services and e-mail, a form can be designed to send data to a Microsoft BizTalk server without writing code in InfoPath. The BizTalk server can then apply business rules to the form (for example, it may send an expense report to a manager for approval).

  • Offline usage   InfoPath provides a document-like model that lets information workers work offline, completely disconnected. They can save a form locally, even if only partially completed, and resume working at their convenience. InfoPath also provides the ability to validate business logic on the client, online and offline.

Smart Documents

Smart documents are a new type of solution model based on a Word 2003 or Excel 2003 document, workbook, or template that has an underlying XML structure and a customized task pane. The smart document XML structure is based on a customer-defined XML schema that displays relevant information in the task pane when an information worker moves the cursor to different sections of the smart document. Examples of information that might be displayed in the task pane include help details, related data, tools to work with the document, or useful graphical images. As shown previously in the smart document solution in Figure 1, an information worker could type a doctor's name into one element of the customized task pane and select that doctor's area of specialization in another element.

Since smart documents are usually downloaded from a trusted server, the smart document code, called an XML expansion pack and including an XML schema, can also be updated from the server. Each smart document uses a manifest file, which is an XML file that describes the location of key solution components. Since a smart document knows the location of the manifest file, upon opening a smart document, the information worker is automatically asked whether or not to install the components described in that smart document's manifest file. Figure 3 shows the process from an information worker's perspective for updating a smart client solution that is based on the smart document technology.

Figure 3. Smart client solution using a smart document that prompts to download components


Smart document that prompts to download components

Smart Tags

Also useful in smart client solutions, smart tags dynamically tag data by content type which can later be searched or updated. In the Microsoft Office System, customizable smart tags are supported in Word 2003, Excel 2003, Microsoft Office PowerPoint 2003, Microsoft Office Outlook 2003 messaging and collaboration client (when using Word 2003 as the text editor), Microsoft Office Access 2003 (actions only), and the Office 2003 Research Library. Additionally, smart tags can be applied to specific cells in Excel 2003 worksheets or specific fields in Access 2003. Advanced Office 2003 smart tag capabilities in Word 2003 and Excel 2003 include being able to apply smart tags to XML elements and having smart tags automatically invoke actions upon recognition.

When these two significant smart tag improvements in the Microsoft Office System are combined, they extend the usefulness of smart client applications. Associating smart tag actions to XML elements, or automatically firing actions based upon smart tag recognition, allows smart clients to automatically collect metadata while it is being entered or to update one section of the solution based on information being entered in another in real-time.

Research Services in the Microsoft Office System

The Office 2003 Research Library consists of a collection of information sources that can be searched from within and external to the Microsoft Office System applications. Some of these research sources are already accessible from the Microsoft Office System programs, such as the Dictionary, Encyclopedia, or Thesaurus. Other research services, such as Web Search or Stock Quotes, rely upon external services which require a connection to the Internet. Because the research services in the Microsoft Office System are based on standard Web services, the Office 2003 Research Library does not require any custom client-side code.

Developers can build custom research services for the Research Library for smart clients to search data sources within their own organization or externally via Web services. This is a compelling way for companies to provide access to corporate data, such as customer or product details, from within the task pane. Selected third-party organizations also provide external Web services that are available for incorporation into the Office 2003 Research Library and smart clients.

Developing and Deploying Smart Client Solutions

New deployment models allow some smart client solutions to be stored on a corporate network or trusted server with the code being automatically downloaded when a user instantiates the smart client application. Updates to the smart client are then also easy to deliver; administrators simply change the code on the server. This server-side deployment makes it easier to maintain a solution and helps reduce the risk of malicious code affecting the solution. Smart documents and InfoPath solutions both allow for easy updating. For a deeper discussion and comparison of the development and deployment of smart clients, see the paper Microsoft InfoPath 2003 Decision Tree: Comparing InfoPath Forms to Other Microsoft Solutions.

Customer Defined XML Schemas

Organizations who want to describe and define their business data in a familiar format can use their own World Wide Web Consortium (W3C)-compliant XML schema with the Microsoft Office System and smart client applications. EXtensible Stylesheet Language Transformations (XLST) can also be used extensively to manipulate the XML data or extract content that needs to be reused.

Visual Basic for Applications

Using the Web Services Toolkit for the Microsoft Office System, developers can easily discover available Web services on the Internet or reference in-house corporate Web services and integrate them into smart clients from within the Visual Basic for Applications (VBA) editor. The VBA editor provides the ability to reference an Web service from within those applications that support VBA, making it easy to connect smart client applications with backend line of business systems.

The VBA programming environment and the core VBA language remain an integral part of the Microsoft Office System. Therefore, most Microsoft Office XP VBA solutions should be forward compatible with the Microsoft Office System. The object models have been updated to allow VBA programmers to take advantage of the new technology and capabilities of the Microsoft Office System.

Visual Studio Tools for Office 2003

With Microsoft Visual Studio Tools for the Microsoft Office System, developers can create managed code for smart client applications using the first-class code editor, streamlined project management, and powerful design tools of the Microsoft Visual Studio .NET 2003 development system. New for the Microsoft Office System, developers can now separate document solutions from the underlying code (an alternative to previous smart client models which contained VBA macros with custom logic). Using managed code with the Microsoft Office System provides developers with more robust options for creating, deploying, and managing updates for smart client solutions.

Visual Studio Tools for the Microsoft Office System provide direct access to the Office 2003 Primary Interop Assemblies (PIAs), which make it possible for .NET applications to use the Microsoft.Office object model for the Microsoft Office System. Developers can build the managed code which executes behind Word 2003 documents or templates and Excel 2003 workbooks in the Microsoft Visual Basic .NET development system or the Microsoft Visual C# development tool. This managed code can co-exist with existing VBA or .NET Framework code in the same smart client application.

Security

Using smart document or Visual Studio Tools for Office technology, code is deployed from a trusted server, helping to ensure that only trusted code is allowed to run in the enterprise. Relying only on trusted sources reduces the risk of unsafe code being distributed to smart clients developed on Word 2003 or Excel 2003.

Smart documents developed with Visual Studio Tools for the Microsoft Office System incorporate .NET security, which enables a smart client application to take advantage of a range of options to determine the trust level of a data or application source. For example, a universal naming convention (UNC) path to a corporate server could be granted full trust, allowing all smart clients with that UNC path to execute actions through a Web service to a data source hosted on the corporate server. Additionally, smart clients developed using Visual Studio Tools for the Microsoft Office System store downloaded code from trusted servers in the Microsoft Internet Explorer cache, allowing an off-line capability after the code has been run once.

Smart documents are also deployed from a trusted server based on policy in Internet Explorer and several security checks are performed by the Microsoft Office System before the code is allowed to run. The smart document automatically prompts the user to confirm whether or not to install or update a smart client application. Once confirmed by the user, the smart document downloads all the code from the server which is installed locally so that the smart client can be easily taken offline.

InfoPath form solutions specifically provide a few options for security. InfoPath solutions can be sandboxed or trusted. Sandboxed solutions are installed by URL (download can be silent and upgrades can be automatic) and are stored in a local cache. Sandboxed solutions run under the same security model as Web pages in Internet Explorer and have access to the current form only (they don't have access to any resources of the local computer). If the solution needs access to local resources such as writing to local files, or if it needs to run trusted code (such as C++ components), a trusted solutions is necessary. Trusted solutions require a client install (using MSI or some other setup technology) and explicit upgrades.

Conclusion

The Microsoft Office System provides innovative technologies for smart client solutions. Smart clients are applications that take full advantage of information exposed by Web services. Intelligent solutions built on programs in the Microsoft Office System can dynamically access Web services to analyze, share, and process data. The result is flexible and customizable applications with always up-to-date information that can be used online or taken offline yet maintain a full set of user functionality.

By using familiar Office applications and leading-edge technologies provided with the Microsoft Office System to create smart clients, organizations can also leverage existing investments in information worker training and technology. This allows organizations to create smart client solutions using the Microsoft Office System that ensure consistently up-to-date enterprise information and a competitive advantage in today's business marketplace.

Additional Resources

For more information, see the following:

Show:
© 2015 Microsoft