Using Core Libraries
The STK API consists of two major sub-systems: Connect and the
STK Object Model.
Connect is a
library of string commands for STK, originally designed to operate
over a TCP/IP socket.
Advantages of Connect include:
- Connect commands are easy to read, understand, and build.
- Connect commands make it very easy to set multiple parameters
on one or multiple objects with a single command.
- The TCP/IP interface enables STK to receive Connect commands
from other applications on the same machine, or other
- Connect commands can be sent from applications in any
programming language; all that is required is a socket connection
Disadvantages of Connect include:
- When generating Reports and Graphs via Connect, one is limited
to the pre-defined Report and Graph styles installed on the target
- Any report data returned from a Connect command will come in
the form of a string, which must be parsed.
- The Connect library is weighted heavily towards setting object
properties. It is not always possible to "get" current object
properties via Connect.
- Connect does not support auto completion or compile-time
debugging. The only way to determine whether a Connect command is
valid and free of typos is to send the command to STK and receive
an "ACK" (acknowledged) or "NACK" (not acknowledged) response.
- While Connect offers a "Verbose" mode for debugging, specific
error messages are not always available.
The STK Object Model
is an object-oriented interface to STK, built on Microsoft COM
Advantages of the STK Object Model include:
- The Object Model supports auto completion (i.e., IntelliSense,
Javadoc) and compile-time debugging.
- The Object Model is not dependent on report styles. Rather,
data values are pulled directly from the STK Data Providers.
- Data values returned from STK are returned as objects of an
appropriate form, eliminating unnecessary string parsing. For
instance, a series of data over time is returned as an array of
- The Object Model generally offers parity between property
setters and getters.
Disadvantages of the STK Object Model include:
- Becoming familiar with the Object Model involves a much steeper
learning curve than Connect, particularly for non-programmers.
- The Object Model often requires many more lines of code than
- The Object Model, being COM technology, is limited to
communication between applications on the same machine.
Choosing the Right Technology
The choice of Connect or Object Model should be driven by the
requirements of the application and the needs of the developer. It
is important to note, however, that this need not be an exclusive
choice. Connect commands can be used in a COM application,
side-by-side with Object Model code.
STK Engine for UNIX 11.3.0