VisualWorks is a cross-platform implementation of the
SmalltalkSmalltalk is an object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis." It was designed and created in part for educational use, more so for constructionist...
language. It is implemented as a development system based on "images", which are dynamic collections of software objects, each contained in a
system imageA system image in computing is the state of a computer or software system stored in some non-volatile form. The form of storage is often a file. A system is said to be capable of using system images if it can be closed down and later restored to exactly the same state...
.
The lineage of VisualWorks goes back to the first Smalltalk-80 implementation by
Xerox PARCPARC , formerly Xerox PARC, is a research and development company in Palo Alto, California with a distinguished reputation for its contributions to information technology....
. In the late 1980s, a group of Smalltalk-80 developers spun off ParcPlace Systems to further develop Smalltalk-80 as a commercial product. The commercial product was initially called ObjectWorks, and then VisualWorks. On August 31, 1999, the VisualWorks product was sold to
CincomCincom Systems is a privately held, multinational, computer technology corporation founded in 1968 by Thomas M. Nies, Tom Richley and Claude Bogardus....
. VisualWorks runs under many operating systems, including
WindowsMicrosoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces...
,
Mac OS XMac OS X is a line of computer operating systems developed, marketed, and sold by Apple Inc., and since 2002 has been included with all new Macintosh computer systems...
,
LinuxLinux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed,...
, and several versions of
UnixUnix is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
.
VisualWorks has a very active third-party developers community, with a non-commercial version available free. The non-commercial version has all the power and functionality of the commercial version. In both versions, as in all Smalltalks, the user can see all the source code. This includes all the system classes, including the browser and GUI builder.
VisualWorks supports cross-platform development projects, because of its built-in multi-platform features. For example, a
GUIGui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...
application needs to be developed only once, and can then be switched to different widget styles. A VisualWorks application can be run on all supported platforms without any modifications. Only the
virtual machineA virtual machine is a software implementation of a machine that executes programs like a physical machine.-Definitions:...
is platform-dependent.
Installation
All components of the VisualWorks system are installed in a
directoryFolder, directory, catalog, or drawer, in computing, is a virtual container within a digital file system, in which groups of computer files and other folders can be kept and organized....
named after the version number of the installed system – for instance,
vw7.5nc. This directory contains several subdirectories including bin, doc, examples and many others.
Mouse buttons and menus
VisualWorks assumes a three-button mouse with buttons having logical names
,
, and
. Although, a one or two button mouse can be used along with
CtrlIn computing, a Control key is a modifier key which, when pressed in conjunction with another key, will perform a special operation ; similar to the Shift key, the Control key rarely performs any function when pressed by itself. The control key is located on or near the bottom left side of most...
,
OptionThe Option key is a modifier key present on Apple keyboards. It is located between the Control key and Command key on a typical Mac keyboard. For desktop keyboards, there are usually two, while a laptop may have only one to make room for the arrow keys...
, or
CommandThe Command key, also historically known as the Apple key or open-Apple key, is a modifier key present on Apple Keyboards. An "extended" Macintosh keyboard—the most common type—has two command keys, one on each side of the space bar; some compact keyboards have one only on the...
keys.
selects any interface object.
brings up a menu of operations for the current view/selection.
initiates actions (move, close...) on VisualWorks windows.
File-in format
File-in format is the original
SmalltalkSmalltalk is an object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis." It was designed and created in part for educational use, more so for constructionist...
format for representing
classesIn object-oriented programming, a class is a construct that is used as a blueprint to create objects of that class. This blueprint describes the state and behavior that the objects of the class all share. An object of a given class is called an instance of the class. The class that contains that...
as text files. These can be "filed in" to the VisualWorks
IDEAn integrated development environment also known as integrated design environment or integrated debugging environment is a software application that provides comprehensive facilities to computer programmers for software development...
to generate any classes not already contained in the Smalltalk
imageA system image in computing is the state of a computer or software system stored in some non-volatile form. The form of storage is often a file. A system is said to be capable of using system images if it can be closed down and later restored to exactly the same state...
. Every file-in document provides a simple textual representation of a Smalltalk class, or classes, in a text file with a
.st suffix. It is still supported in VisualWorks, but has been superseded by a Parcels mechanism. There are examples in file-in format in the examples subdirectory.
Parcels
Parcels are external file representations of packages.
An Examples Browser is provided as a parcel in the examples directory. Several image level switches are available to specify parcel loading on image startup.
The parcel path is the list of directories where VisualWorks looks for parcels. This can be set using the System Settings tool.
Parcels provide the component technology for VisualWorks. Packages and bundles organize the code and model the contents of parcels. Parcels are created by publishing packages/bundles. The term
components, in the VisualWorks sphere, is used to refer to parcels, packages, and bundles when it is not necessary to be specific.
The parcel code's organization on loading is determined by its creation. If it was created by publishing a package, it is loaded into the same package. If created from a bundle, it can be reloaded as the bundle or as one package.
The load sequence for a package is:
- Any prerequisite components are loaded.
- Any defined pre-load action is performed (e.g. undeclared variables initialized).
- Objects in the package are installed.
- Every class in the parcel is sent message postLoad: thePackage, and any action executed. This is often an application launch.
Parcel Manager
The Parcel Manager is used to load and unload all parcels on the parcel path. A Suggestions view lists Categories containing key add-in parcels-by selecting a category, you get a list of recommended parcels. For example, the UI Painter is located in the Essentials category. There is also a Directory-tree view of the parcel path, for finding parcels outside the Suggestions view. A Loaded view lists all parcels already in the image. Only loaded parcels can be browsed.
A supported VisualWorks product parcel is represented by an icon that looks like a parcel. Parcels from other vendors look like a shopping sack. Because of the convoluted history of Smalltalk class development this can be very useful. For instance, a parcel icon indicates that the Arbor hypertext system is now VisualWorks supported.
One can also load and unload parcels programmatically from the application.
Packages
When a parcel is loaded it is organized as a package, or bundle of packages. When looking for code loaded from a parcel, one can locate the bundle or package with the same name in the System Browser. Packages are categories that organize classes into related groups, according to component. Packages can be grouped into bundles. Packages and bundles can be saved (published) as parcels, or saved into a source code repository.
Loading code libraries
The initial visual.im image contains minimal development facilities, using basic class libraries. Additional class libraries are provided by VisualWorks or third-party vendors, usually as parcel files. For most non-Smalltalk development environments, code libraries are imported at compile time, using an
includeA header file commonly contains forward declarations of classes, subroutines, variables, and other identifiers. Programmers who wish to declare standardized identifiers in more than one source file can place such identifiers in a single header file, which other code can then include whenever the...
command. In
SmalltalkSmalltalk is an object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis." It was designed and created in part for educational use, more so for constructionist...
, code libraries are loaded into the running system, and become part of the environment. For example, the UI Painter is loaded as a parcel.
VisualWorks Launcher
The VisualWorks Launcher, usually just called
the Launcher, is the control centre for the VisualWorks system. It is the launching pad for all the major tools.
Smalltalk basics
SmalltalkSmalltalk is an object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis." It was designed and created in part for educational use, more so for constructionist...
is a pure object oriented programming language, which means the only way to get something to happen within Smalltalk is by sending messages to objects. VisualWorks uses the Smalltalk-80 language as standard, but comes with its own set of classes and methods. So even basic classes, like Object, differ from those in other Smalltalk-80
IDEsAn integrated development environment also known as integrated design environment or integrated debugging environment is a software application that provides comprehensive facilities to computer programmers for software development...
like
SqueakThe Squeak programming language is a Smalltalk implementation, derived directly from Smalltalk-80 by a group at Apple Computer that included some of the original Smalltalk-80 developers. Its development was continued by the same group at Walt Disney Imagineering, where it was intended for use in...
and
Dolphin SmalltalkDolphin Smalltalk, or "Dolphin" for short , is an implementation of the Smalltalk programming language by Object Arts, targeted at the Microsoft Windows platform.The last major release was Dolphin Smalltalk X6, which comes in two versions:...
. The illustrative examples here work in VisualWorks Smalltalk, but may not work in other Smalltalks because the classes and/or methods may differ.
Browsing and editing Smalltalk code
In traditional
object-oriented programmingObject-oriented programming is a programming paradigm that uses "objects" – data structures consisting of datafields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as information hiding, data...
environments a developer directly edits a plain text
source codeIn computer science, source code is any collection of statements or declarations written in some human-readable computer programming language...
file containing class and
methodIn object-oriented programming, a method is a subroutine that is exclusively associated either with a class or with an object...
definitions. In VisualWorks, like all Smalltalks, everything is an
executing objectIn computing, an executable causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a file that only contains data. Files that contain instructions for an interpreter or virtual machine may be considered executables, but are more specifically called scripts...
, including classes. In browsing Smalltalk classes the developer gleans definitions from executing objects. The main browser/editor in VisualWorks is the System Browser. It allows the developer to browse classes either in the overall class hierarchy or through their packages. It is launched from the VisualWorks Launcher.
List panes in the System Browser allow developers to navigate to class and method definitions. They can then be viewed or edited in a code view, or modified with a new definitions.
Undeclared variables
When a variable is deleted while references to it still exist, or is loaded via a parcel but never declared, its name enters the Undeclared name space. Undeclared variables can cause certain program errors.
String and files
Cincom's first tutorial on VisualWorks illustrates how VisualWorks can be used to manipulate
serverA server is an application running on a computer that delivers a service. For example, a web server will deliver web pages when requested by a browser . The way a server and a client dialogs is called a protocol...
log files. It illustrates how things like
stringsIn mathematics, a string is an sequence of symbols that are chosen from a set or alphabet.In computer programming, a string is, essentially, a sequence of characters...
and
filesA computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...
can be easily subsumed into the object structure within VisualWorks. Consider the Smalltalk
expressionExpression may refer to:* A statement or sentence * Idiom* Facial expression* Artificial discharge of breast milk; see breastfeeding* Expression...
:
'ws000101.log' asFilename edit
One can evaluate this expression as-is in a VisualWorks workspace using one command in the operate menu. This creates:
- An object
In computer science, an object, in the domain of object-oriented programming, usually means a compilation of attributes and behaviors encapsulating an entity....
of class ByteString containing the string (as byteA byte is a unit of information storage representing the smallest addressable element for a given computer architecture. It often designates a sequence of bits whose length is determined by the architecture...
s) and the methodsIn object-oriented programming, a method is a subroutine that is exclusively associated either with a class or with an object...
for manipulating it;
- An object of class NTFS
NTFS is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, and Windows 7....
Filename (in Windows XPWindows XP is a line of operating systems produced by Microsoft for use on personal computers, including home and business desktops, laptops, and media centers. The name "XP" is short for "eXPerience"...
); and
- An editor object.
The latter is a simple
notebookA notebook is a book, made of paper or computer based, of which various uses can be made, including writing, drawing, and scrapbooking.-Paper Notebooks:...
-like editor containing the contents of the file. That is, the evaluation created a filename object as a gateway to the file
ws000101.log and opened an editor onto it. The editor itself is an object, as are all its components (down to and including the characters in its menus). The source code is available for all these objects, and VisualWorks has a plethora of inspectors, browsers, and other tools for anyone to evaluate and inspect the code in static or dynamic mode.
Tutorials
There are daily
tutorials produced for Cincom Smalltalk, and there's a
Seaside tutorial as well.
External links