SmalltalkAgents
Volume Number: 10
Issue Number: 4
Column Tag: Tools Of The Trade
Related Info: Script Manager
It’s Finally Here: SmalltalkAgents
A power-house development environment, terrific turnaround time, and
a great language
By Thornton Gale, Mercer Island, Washington
About the author
Thornton Gale is an Apple Developer who has been programming the Macintosh
for five years in C and Smalltalk. With over 30 years experience in all phases of
software engineering, he is the co-author of a forth coming book on object-oriented
technology to be published by SIGS Books in 1994. He lives and consults from his
home on Mercer Island, Washington, with his wife Marty and their cat Gracie. He can
be reached on AppleLink at D5854.
Announcing SmalltalkAgents
There’s a new object-oriented development environment on the market for
Macintosh developers: SmalltalkAgents, a new version of Smalltalk, a product of
Quasar Knowledge Systems (abbreviated QKS) of Bethesda, Maryland. SmalltalkAgents
is a complete implementation of the de facto-standard Smalltalk-80, but as we’ll see
in this review, SmalltalkAgents includes a number of very nice extensions to the
Smalltalk-80 standard. Also, SmalltalkAgents is a new-generation development
environment and raises the bar on what a development environment should be like.
Just what is Smalltalk?
Let’s begin with the history of Smalltalk and a brief description of the various
other Smalltalk development environments that are currently offered on the market.
Smalltalk is the second most popular object-oriented development environment,
second only to C++, and is the granddaddy of all object-oriented languages. Well, not
exactly. Simula which was developed in Norway in 1967 is considered the first
object-oriented language. Smalltalk originated at Xerox PARC (Palo Alto Re search
Center) in the early 1970’s and went through several major releases before finally
arriving at a state of relative perfection in Smalltalk-80. Smalltalk is mature and has
been around since its release in 1981.
Objectworks/Smalltalk
Several PARC veterans, including Adele Goldberg, started ParcPlace systems and
put out a Objectworks/Smalltalk. It is available on several platforms including Open
Look, Windows, OS/2 and OSF/Motif as well as the Macintosh. Objectworks/Smalltalk,
being the direct descendent of Smalltalk-80, is considered the de facto standard in the
Smalltalk world today. While expensive, it does something most development
environments only dream abou - the developer can port complete Smalltalk
applications from one platform to another in just minutes.
Digitalk Smalltalk/V
Digitalk, another major provider of Smalltalk, was founded in 1983 to bring
Smalltalk to the IBM/PC with their original DOS Smalltalk product called Methods
released in 1985. In 1986 Digitalk released the more powerful Smalltalk/V DOS
product, a Smalltalk for the masses. Later, versions of Smalltalk/V were released for
Windows, OS/2 and the Macintosh. Smalltalk/V applications are not as interoperable
on the various platforms as with Objectworks/Smalltalk but with some recoding, an
application could be ported from one platform to the other. Also, Digitalk has
announced plans for achieving interoperability by using a “common code base” for
their product on the various platforms.
Heritage with the Macintosh
Smalltalk has a strong heritage in the Macintosh world. Apple Fellow, Alan Kay,
envisioned an object-oriented environment and was a member of the team at Xerox
PARC in the 1970’s that designed Smalltalk-80. That talented team at Xerox PARC has
a lot of names familiar to Macintosh developers: Dan Ingalls (later of Apple, now
retired from the computer industry) and Larry Tesler (now Apple’s Chief Scientist),
both of Xerox PARC at the time, gave Steve Jobs the initial infamous 1979 demo of
Smalltalk. This demo of Smalltalk, according to Macintosh folk-lore, was a major
influence on Steve to develop the Lisa. The initial technology influence of Smalltalk on
the Lisa was strong, with many of its concepts working their way into Lisa, and then
into Macintosh.
A Serious Macintosh Development Environment
With so many implementations of Smalltalk out there, why would there be an all
out effort to develop another one? I talked to the QKS folks about this. I asked “Why
does the world need another Smalltalk?” Their answer was simple and direct: The
QKS designers of SmalltalkAgents spent a lot of time analyzing the needs of applications
development in the future. This analysis went far beyond the Macintosh environment
and included examining current CPU architectures (CISC, RISC, multiprocessors),
current GUI architectures, and existing development systems and environments in the
computer industry. The result of their analysis is SmalltalkAgents.
Some of us Macintosh developers have used the other Smalltalk products but we
always knew deep-down that our Macintosh version of Smalltalk began life on another
platform. In effect, our Macintosh version was just an afterthought and we knew that
all the resources and mindshare of the vendor were devoted first to that original target
platform. The difference with SmalltalkAgents is that the Macintosh is its original
target platform!
That’s not to say that portability is not a major objective of SmalltalkAgents.
After having talked with QKS about this issue, I can say that they are deeply committed
to portability. Their porting schedule calls for Macintosh first, followed by Power
Macintosh in the second quarter of 1994, Windows in the 3rd quarter of 1994, and
Sun SPARC in the fourth quarter of 1994. Other platforms will be added after that
depending on market demand.
Who Should Use it?
What about the Third-Party Developer?
Another question I asked was, “Just who are the target SmalltalkAgents
developers? What is the profile for developers using SmalltalkAgents?” QKS
answered that they are targeting SmalltalkAgents for a broad range of developers from
individual programmers to corporate developers. They see the developer who would
use SmalltalkAgents as anyone who wants to develop a double-clickable application.
One of the questions you may be having right now is what about the third-party
developer? While SmalltalkAgents can be used for so-called vertical applications, can
it be used for commercial applications sold to the general market? The answer: Yes!
Absolutely! Definitely! In fact, many sophisticated, commercial apps have been
written in the various dialects of Smalltalk, e specially GUI intensive applications such
as business process re-engineering, complex business analysis applications, and CASE
tools. The power and flexibility of the environment offset the somewhat large 1.5MB
minimum disk footprint and 2.5MBminimum RAM footprint of a standalone
application. The SmalltalkAgents package includes a runtime environment (the
SmalltalkAgents standalone kernel) on which commercial products can be run. The
SmalltalkAgents license agreement provides for royalty-free use of the standalone
runtime environment.
An important and often overlooked subset of the developer community is the
non-English language developer. SmalltalkAgents has been designed for the
non-English language developer as well. SmalltalkAgents uses the Macintosh Script
Manager. When using System 7.1, the developer can take full advantage of Apple’s
WorldScript II as well as the emerging Unicode standards. The WorldScript
capabilities are transparent and applications developed in SmalltalkAgents will
automatically be WorldScript capable.
It’s an Environment - It’s a Language - It’s Objects
All of the Smalltalk environments mentioned above, including SmalltalkAgents,
have a very important structure: each is both a language and a development
environment. In fact, the concept of the high-speed, integrated development
environment many of us have come to love with products like ThinkC or TurboPascal,
originated with Smalltalk. Two aspects distinguish Smalltalk from conventional
development environments: first, Smalltalk is a pure object environment; and second,
it uses a layered structure featuring a mechanism called the virtual machine. We'll
consider each in turn:
Pure Objects
Smalltalk is known in the object-oriented community as a pure object language.
In Smalltalk, everything is an object and work is done by sending objects messages.
This is contrasted to the hybrid approach taken by C++ which adds object-oriented
constructs to the traditional language C. In C++ some data are represented by objects
and other data by C language constructs (e.g., int, char, struct) which can be
manipulated directly outside the discipline of object encapsulation. With
SmalltalkAgents, you’re getting the real thing, true object-orientation.
The Virtual Machine
At the core of all the dialects of Smalltalk mentioned above is the virtual machine
(usually abbreviated as VCPU). The VCPU is a software layer which sits at the logical
level between the application and the hardware. It provides a level of abstraction so
that the programmer doesn’t need to worry about the host machine architecture. This
is how the interoperability of Smalltalk is achieved. To port a Smalltalk product to
another platform, the vendor must (among other things) implement the VCPU on that
platform.
In many ways, the VCPU is like an operating system in that it controls all
activity in the Smalltalk environment including execution threads, storage
management and generally functioning as the traffic cop between Smalltalk and the
outside world. In another way the VCPU can be thought of as an abstract computer
implemented in software. The programmer writes source code which is compiled into
the “machine-code” for the VCPU. The compile process actually creates a new object
called a CompiledMethod. This CompiledMethod object contains sequences of eight-bit
instructions called byte-codes as the executable form of the source code. The
byte-codes are analogous to the “machine-code” of a hypothetical stack-based machine
implemented by the VCPU. The byte codes are “executed” by the VCPU byte-code
interpreter.
Smalltalk has historically been plagued with the reputation for slow execution.
Actually, this hasn't been true for years but the bad reputation still persists. I can say
that speed of execution is not at all a problem for SmalltalkAgent’s applications
e specially on a modern Macintosh computer. On other platforms, industry experience
shows that applications ported from Smalltalk to C++ are only about 10% - 20%
faster on the same platform.
Many of the differences between Smalltalk-80 and SmalltalkAgents are
implemented in the VCPU. For example, the VCPU of SmalltalkAgents provides the
preemptive-multitasking capability that separates SmalltalkAgents from the herd.
We’ll return to this later. For now, we want to understand the VCPU as the provider of
what we call dynamic programming which we will discuss at length in the next section.
Where does SmalltalkAgents fit in the Developers Toolkit?
SmalltalkAgents (as well as any other Smalltalk environment) has an ideal target