Where Can You Use the Components?

[Previous] [Next]

Since the Office Web Components are COM controls, you'd naturally expect them to work in any environment that called itself a COM control container. However, theory and reality don't always match up, especially in the world of software. Microsoft makes many environments that can contain controls (16 that our team could recall off the top of our heads), and various other companies create many others.

To keep the Office test team from going mad, we tested the Office Web Components at different levels in different containers. First, we picked the containers we thought people would use most and performed full test passes on them. We then performed basic, ad hoc testing on the containers used less often. And finally, we grouped a few containers into the "not formally tested but doesn't cause a nuclear meltdown when tried" category. Table 1-1 shows which containers fell into what category.

Table 1-1. Tested containers.

Container Test Coverage
Microsoft Internet Explorer 5.0 Full
Microsoft Internet Explorer 4.01 Full
Microsoft Internet Explorer 3.x Not supported
Microsoft Visual Basic 6.0 Full
Microsoft Visual Basic 5.0 Basic
Microsoft Visual InterDev Basic
Microsoft Access Forms Basic
Microsoft Office UserForms Basic
Microsoft FrontPage 99 Full
Microsoft FrontPage 98 Basic
Microsoft Access 2000 Data Access Page Designer Full
Microsoft Script Editor Full
Microsoft Word 2000 Basic
Microsoft Excel 2000 Basic
Microsoft PowerPoint 2000 Basic
Microsoft Outlook 2000 Basic
Microsoft Visual C++/MFC Projects None
Microsoft Visual J++ None

Also note that the design-time activation of the controls varies quite a bit from container to container. Since the Office Web Components are fairly complex controls, it is often necessary to select elements within a control (such as a cell in a spreadsheet, a pivot field in a PivotTable report, or a series of data points in a chart) and format or perform operations on them. To enable this functionality, the controls will become UI active in containers that allow this, meaning they will respond to mouse and keyboard events. Any changes made to the controls in design mode will persist with the document or form when it is reloaded at runtime, resetting the controls to look exactly as they did when you saved them. Some containers make the controls UI active as soon as you click them. Others require that you double-click the control before it becomes UI active. Still other containers require you to single-click them twice to activate them. This behavior is entirely determined by the container, so refer to the container's documentation to see how it deals with COM controls at design time.

Note that this does not affect a control's runtime behavior. At runtime, all containers make the controls UI active after loading them. But some environments, such as Office documents, never get into a runtime state because you are always editing the document that's currently loaded. Internet Explorer, Visual Basic, Visual C++, Access Forms, and Office UserForms all have a runtime mode in which the controls are immediately active.

Data Access Pages and Internet Explorer 5

If you read any of the Access 2000 documentation, you will likely see statements that say you can view data access pages only in Internet Explorer version 5 and above. Although true, that statement does not apply to the Office Web Components in general. The components will function in Internet Explorer 4.01 and above, though they won't function in any earlier versions (4.0, 3.x, 2.x, and so on). This applies to any interactive content created with Excel 2000 (which uses the Office Web Components) and to custom solutions developed using the components.

Data access pages rely on a few specific features in Internet Explorer 5, which is why they only run in that environment. However, the Office Web Components themselves can run quite happily in the tested containers listed earlier.

Using the Office Web Components on a Server

As mentioned before, the Office Web Components were designed to run both as controls "sited" within a form, document, or web page, and as objects in memory with no user interface. Each of the controls exposes a property or method that returns a static representation of its current content. The Chart and PivotTable controls can create GIF images of their content, and the Spreadsheet control can return an HTML table fragment or full page that can be rendered by any browser that's compatible with HTML 3.2. All of this means you can use the components on a web server to perform server-side generation of chart images and PivotTable reports or server-side recalculation of a spreadsheet model. I'll demonstrate a few of these techniques in Part II of the book.

Besides discussing the how-to of using the components on the server, we'll examine a number of more subtle issues related to performance, scalability, and reliability later in the book.

Deployment

One of the more attractive aspects of web-based solutions is that they don't require explicit setup of an application. Anything needed is either included with the web page in the form of scripts or is automatically downloaded as applets or COM controls. The Office Web Components enable a no-install deployment and automatic upgrade mechanism by using the codebase feature of Internet Explorer. The components also include a sophisticated web installing control that makes the download experience much more attractive. Furthermore, OWC has no technological dependency on Office 2000, so it can coexist in an Office 97 environment or be used on a machine that doesn't have any other part of Office installed.

I'll cover all the aspects of deployment and how you can build your solutions to automatically deploy OWC in Chapter 12.

What About Netscape Navigator?

When I talk about the Office Web Components at conferences or other customer gatherings, invariably someone asks the question, "Do these run in Netscape Navigator?" The answer is essentially "no," but it has a few caveats.

Netscape Navigator 4.5 does not natively support COM controls, so without any plug-ins, the Office Web Components won't even be loaded by Netscape Navigator. However, a company called NCompass Labs, Inc. makes a plug-in for Netscape Navigator that can host COM controls in a web page. So if you installed this plug-in, could you use the components in Netscape Navigator? The answer is "it depends" and, again, has a few caveats.

Many solutions you might build with OWC involve communication between the components—for instance, a chart bound to a PivotTable or spreadsheet, or a spreadsheet cell bound to the property of another element on the page. These solutions depend on functionality provided in Internet Explorer that isn't present in Netscape Navigator even with the NCompass plug-in, so they simply won't work in Netscape Navigator.

Using a single component or multiple components that do not communicate with one another is possible in Netscape Navigator. However, this is one of the containers that our test team did not research, so I can't guarantee that it will work.

You should always remember, however, that static content generated by the controls on the server can be rendered in either Netscape Navigator or Internet Explorer. So if your runtime environment requires that you support both browsers, you probably will be more interested in using the components on your web server and in the solutions that show the techniques that do so.



Programming Microsoft Office 2000 Web Components
Programming Microsoft Office 2000 Web Components (Microsoft Progamming Series)
ISBN: 073560794X
EAN: 2147483647
Year: 1999
Pages: 111
Authors: Dave Stearns

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