Getting Started with wwClient

The West Wind Client Tools is a rich toolset that is primarily designed as a modular set of classes. As such this is a developer product of tools that you can integrate into distributable applications of your own.

The classes of the installation are set up in a Classes directory. Most classes also rely on the WCONNECT.H header file located in the root directory of the installation. Make sure that this file moves with your classes as incorporate them into your own projects. Always make sure that WCONNECT.H is either availalbe in the current directory or accessible via the FoxPro Path when compiling your code.

You can load the classes with the following code (assuming the classes sit in the 'classes' directory):

DO classes\wwClient

which loads the classlibraries into memory. The loader uses flags defined in WCONNECT.H to determine which classes to load.

If you prefer you can also load classes individually. To do this we suggest you use code like the following:

SET PROCEDURE TO <wwClientPath>\classes\wwUtils
DO PATH WITH "<wwClientPath>\"
DO PATH WITH "<wwClientPath>\classes\"
DO PATH WITH "<wwClientPath>\tools\"    && Optional for developer tool classes

SET PROCEDURE TO wwHTTP ADDIT
SET CLASSLIB TO wwXML ADDITT
... etc.

Using the path function is optional, but it makes life easier and avoids hardcoding any sort of path into your projects.

Loading Classes

Most classes are contained in PRG files that you can load with SET PROCEDURE TO. The PRG classes generally also have a loader that you can invoke by simple DOing the PRG file of the main class that loads all the related classes. For example, the top wwHTTPSQL.prg preceeding the class definitions looks like this:

#INCLUDE WCONNECT.H

*** Load Libraries
SET PROCEDURE TO wwHTTPSQL ADDITIVE
SET PROCEDURE TO wwHTTP ADDITIVE
SET CLASSLIB TO wwXML ADDITIVE
SET PROCEDURE TO wwUtils ADDITIVE

RETURN

So by doing DO WWHTTPSQL you load the library and all the dependencies into the class/procedure cache. If there were other classes required they'd be loaded too.

VCX based classes (wwIPStuff, wwXML, wwBusiness,wwSQL etc.) OTOH require that you manually load supporting classes which is described in the dependencies of the individual classes.


Sample Code

Most of the more complex classes include sections in their respective help sections that show simple examples of how the code is used to perform its operations.

In addition, the West Wind Client tools ship with a few samples. The Internet Functionality is demonstrated best in the wwIPStuff_Samples directory with the wwHTTPDemo project. The business object and Web Data access is demonstrated in the wwDevRegistry\wwBusSample form, which demonstrates use of the business object against local Fox data and Web data (default).

The wwClient Console

A number of Wizards are provided with the West Wind Client Tools and these Wizard front ends are accessible from the wwClient Console. To start the console:

DO wwClientConsole

This console provides the following three Wizards:



  Last Updated: 12/18/2007 | © West Wind Technologies, 2008