Chapter 6 Using Adaptive Server Anywhere with Jaguar
To build applications that access Adaptive Server Anywhere database, you must first create components and clients. This section gives an overview of how to create components and clients. See the Jaguar CTS Programmer's Guide for detailed information.
Jaguar applications are composed of clients and a Jaguar server that hosts components. Clients can run on different machines; the components execute on the server machine as part of the Jaguar server process. Some components, in turn, connect to databases, such as Adaptive Server Anywhere, on other machines.
You can create Java/EJB, C++ (CORBA), C, PowerBuilder, and ActiveX components. You use any development tool that supports the type of component you are creating.
To create components, follow this general procedure:
Instead of using Jaguar Manager to define component interfaces, you can define them in a Java source file and import it into Jaguar.
After deploying components, you create a client that executes the methods in the components. You can create PowerBuilder, Java (CORBA and Enterprise JavaBean), C++ (CORBA), ActiveX, and MASP clients. You can also develop PowerDynamo clients, see Chapter 4, "Using PowerDynamo with Jaguar" for more information.
In the client code, you use a client stub or proxy to invoke a component's methods. Stubs and ActiveX proxy interfaces contain the method prototypes that you include in your client source files and network marshalling code. After it has been developed and compiled, your client performs method calls across the network to the Jaguar server and executes the corresponding component methods.
Jaguar's server-side component support and client-side stub or proxy support are independent. Any Jaguar client can execute any type of component. A component of any model can execute components of another model using intercomponent calls without the use of additional gateway software.
All clients and components share a common interface repository. Component interfaces are stored in standard CORBA Interface Definition Language (IDL). Component developers can define, edit, and browse interfaces in Jaguar Manager.
In general, to create Jaguar clients:
Copyright © 2000 Sybase, Inc. All rights reserved. |