Getting Started-JetNet


Lesson 3 . Setting Up the Client

The server is configured and the development team is ready to start. Now you need to set up the clients.

In this lesson you learn how to:

A Panther client can run either on UNIX or Windows; instructions are given for a native (local) UNIX client and a remote Windows client.

For Windows, instructions are given for editing the necessary files for workstation clients to automatically connect to the Panther servers and access shared libraries.


UNIX Client

  1. If your application server is not running, reactivate it now from the server machine (refer to "To resume the tutorial").

Apply environment settings

The local UNIX environment must know where and what to access on startup of the Panther client, such as which libraries to open and the location of the server configuration file.

  1. From the tutorial's application directory (homeDir/proltut), open up the setup.sh file using an editor. Make the following changes:
  2. Apply the settings in setup.sh:
    . setup.sh
  3. At the command line, type prodev.

    The editor workspace opens.

Connect to the middleware

A Panther client connects to servers through the middleware, which enables client connections to all active servers, including the file access server for access to re mote libraries and repositories, and the standard server for database interaction. Since a UNIX local client opens local libraries, you can request a middleware connection from within the editor.

  1. Choose FileOpenMiddleware Session.

    The Connect dialog box opens. The configuration file is provided if the entries in your setup file were properly set. If your user name is set in your environment, it will be provided as well.

  2. Choose OK. You are now connected to the middleware.

More About the Middleware

In a three-tier architecture, communication between clients and servers, across a network is managed by middleware software. Panther facilitates all interaction between these agents, passing information from client to middleware, middleware to server, and back again.

Open a library and access library members

A tutorial library is provided with the Panther installation and was copied to the tutorial's application directory. This library contains an example of a client screen and its corresponding service component. First, open the library to access its members.

More About Client Screens and Service Components

Client screens and service components each serve a specific purpose in Panther applications. They look very similar, but client screens reside on the client and represent the user interface, while service components reside on the server and are invisible to the user at runtime. A service component, which is a graphical representation of a service, provides a physical means of sending, receiving, and processing data between a client screen and a service.

  1. Choose ViewLibrary TOC.

    The Library Table of Contents opens.

  2. Under Libraries, choose the Open button to gain access to libraries stored on your system.

    The Open Library dialog box opens:

  3. From the /prolifics/samples/tutorial directory, select tutorial.lib and choose OK.

    The Library Table of Contents dialog reappears, and tutorial.lib is added to the list of open libraries.

  4. Select tutorial.lib, and double-click on lesson3.clt in the Members list to open it.

    The client screen lesson3.clt opens in the editor workspace.

  5. In the Library Table of Contents dialog, double-click on lesson3.svr in the Members list to open it.

    The service component lesson3.svr opens in the editor workspace.

Save members to appropriate libraries

Now save both the client screen and its corresponding service component to the appropriate remote libraries, under the same name. You must save the service component to the server library to make it available to the server, and to test the connection between client and server later on.

  1. With focus on lesson3.svr, choose FileSave AsLibrary Member.
  2. Enter test as the Member name, and save it to server.lib.

    The service component is now available to the server and visible to other developers.

  3. Close the service component by choosing FileClosetest.
  4. Change focus to lesson3.clt and choose FileSave asLibrary Member.
  5. Enter test as the Member name, and save it to client.lib.
  6. Close the screen by choosing FileClosetest.

If you take a break

If you take a break, you can close the editor by choosing FileExit and shut down the application in JetMan by choosing EditDeactivate (once the application is selected).

To continue the tutorial

To skip to the Lesson 3 summary, refer to page 3-14.


Windows Client

  1. If your application server is not running, reactivate it now from the server machine (UNIX; Windows).

Edit initialization files

In order to start a Panther client running on Windows, you must provide setup information in the Panther initialization files, which are included with the client installation. The Panther client must know the name and address of the application server so it can access remote libraries and repositories, and automatically open application libraries on startup.

Two tutorial-specific initialization files are in the Windows directory (typically C:\WINDOWS):

In both initialization files, variables need to be set as follows.

  1. In both prtut.ini and jifedtut.ini files, verify that SMBASE is set to the path name of your Panther installation on Windows. For example:
    SMBASE=C:\Prolifics\Panther
  2. In both initialization files, set the server's host name and port, as obtained in Lesson 1:
    SMRBHOST=host
    SMRBPORT=hostAddress

The variable SMFLIBS identifies the libraries to open when you start Panther components. Because you want only remote libraries to open for the tutorial, all SMFLIBS settings should include your server's host name:

  1. In prtut.ini, set SMFLIBS as follows:
    SMFLIBS=host!client.lib;host!common.lib;host!server.lib
  2. In jifedtut.ini, set SMFLIBS as follows:
    SMFLIBS=host!common.lib

Connect to the middleware

A Panther client connects to servers through the middleware, which enables client connections to all active servers, including the file access server for access to remote libraries and repositories, and the standard server for database interaction. During development, middleware connections can be established in one of two ways, depending on the client setup:

  1. From the Start menu, choose ProgramsPanther ClientTutorial (folder)Tutorial.

  2. If the Connect dialog does not appear, choose FileOpenMiddleware Session. Assuming that the .ini settings in Step 3 are set correctly, the Connect dialog box opens. If remote libraries are specified in the .ini file, the Connect dialog opens automatically.

More About the Middleware

In a three-tier architecture, communication between clients and servers across a network is managed by middleware software. Panther facilitates all interaction between these agents, passing information from client to middleware, middleware to server, and back again.

  1. The configuration file and your user name are provided if the entries in your setup file were properly set. Choose OK.

    If the host and port settings are correct–that is, they match the entries in the configuration file broker.bin–and the server is active, then you are connected to the middleware. The editor workspace opens.

Open a library and access library members

A tutorial library is provided with the Panther installation and is stored locally on your workstation or PC. This library contains an example of a client screen and its corresponding service component. First, open the library to access its members.

More About Client Screens and Service Components

Client screens and service components each serve a specific purpose in Panther applications. They look very similar, but client screens reside on the client and represent the user interface, while service components reside on the server and are invisible to the user at runtime. A service component, which is a graphical representation of a service, provides a physical means of sending, receiving, and processing data between a client screen and a service.

  1. Choose ViewLibrary TOC.

    The Library Table of Contents opens.

  2. Under Libraries, choose the Open button to gain access to libraries stored on your system.

    The Open Library dialog box opens.

  3. From the tutorial directory (pantherInstallDir\Samples\Tutorial), select tutorial.lib and choose Open.

    The Library Table of Contents dialog reappears, and tutorial.lib is added to the list of open libraries.

  4. Select tutorial.lib, and double-click on lesson3.clt in the Members list to open it.

    The client screen lesson3.clt opens in the editor workspace.

  5. In the Library Table of Contents dialog, double-click on lesson3.svr in the Members list to open it.

    The service component lesson3.svr opens in the editor workspace.

Save members to appropriate libraries

Now save both the client screen and its corresponding service component to the appropriate remote libraries, under the same name. You must save the service component to the server library to make it available to the server, and to test the connection between client and server later on.

  1. With focus on lesson3.svr, choose FileSave AsLibrary Member.
  2. Enter test as the Member name, click on the (remote) server.lib to select it, and choose OK.

    The service component is now available to the server and visible to other developers.

  3. Close the service component by choosing FileClosetest.
  4. Change focus to lesson3.clt and choose FileSave AsLibrary Member.
  5. Enter test as the Member name, and click on the (remote) client.lib to select it, and choose OK.
  6. Close the screen by choosing FileClosetest.

If you take a break

If you take a break, you can close the editor by choosing FileExit and shut down the application in JetMan by choosing EditDeactivate (once the application is selected).


What did you do?

In this lesson, you performed these tasks:

What did you learn?

You learned: