Chapter 4 Using PowerDynamo with Jaguar
The following diagram demonstrates one scenario in which a Dynamo client connects to Jaguar in order to process a Dynamo script, which contains a MASP call to a Jaguar component.
These steps correspond to the numbers in the diagram:
A Web author can imbed calls to Jaguar components within a Dynamo script or template. The Dynamo script will execute in the regular manner until it encounters the call to the Jaguar component. At this point, a connection (through Dynamo) will be made to the Jaguar server, the appropriate method will be executed, and the results will be returned to Dynamo. Dynamo processes the information and returns pure HTML to the client.
You can call Jaguar components from within a Dynamo script by using:
The SQL tag, COMPONENT tag, and the connection.CreateQuery and connection.CreateComponent methods allow Dynamo to call Jaguar components as though they were Methods As Stored Procedures (MASP). Each MASP invocation creates an instance of the component, invokes the method and then destroys the component instance. The COMPONENT tag can also be used to access ActiveX and Java objects--however, just as with MASP, each invocation creates an instance of the component, invokes the method and then destroys the component instance. The Dynamo CreateObject method allows the user to create an instance of an ActiveX object and access its methods and properties from within a script. The ActiveX object exists until it goes out of scope or until the ActiveX variable is assigned a new value. The Dynamo java.CreateComponent method allows the user to create an instance of a Java object and access its methods and properties from within a script. The Java object exists until it goes out of scope.
Within an application there are a few benefits to creating an instance of an ActiveX (using the CreateObject method) or Java object (using the java.CreateComponent method) against a Jaguar component instead of making a MASP method call:
If a script requires repeated use of a Jaguar component, the creation of an ActiveX object or Java stub is the preferred method of working with a Jaguar component and its methods. ActiveX, however, is a Microsoft technology, which means that it is available only on Microsoft operating systems. Java, on the other hand, is platform-independent, which means that Java objects can run anywhere. For a detailed explanation of MASP, see the Jaguar CTS Programmer's Guide.
Copyright © 2000 Sybase, Inc. All rights reserved. |