VisualWorks
Encyclopedia
VisualWorks is a cross-platform implementation of the Smalltalk
language. It is implemented as a development system based on "images", which are dynamic collections of software objects, each contained in a system image
.
The lineage of VisualWorks goes back to the first Smalltalk-80 implementation by Xerox PARC
. 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 Cincom
. VisualWorks runs under many operating systems, including Windows
, Mac OS X
, Linux
, and several versions of Unix
.
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 GUI
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 machine
is platform-dependent.
named after the version number of the installed system – for instance,
, Option
, or Command
keys.
format for representing classes
as text files. These can be "filed in" to the VisualWorks IDE
to generate any classes not already contained in the Smalltalk image
. Every file-in document provides a simple textual representation of a Smalltalk class, or classes, in a text file with a
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:
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.
command. In Smalltalk
, code libraries are loaded into the running system, and become part of the environment. For example, the UI Painter is loaded as a parcel.
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 IDEs
like Squeak
and Dolphin Smalltalk
. The illustrative examples here work in VisualWorks Smalltalk, but may not work in other Smalltalks because the classes and/or methods may differ.
environments a developer directly edits a plain text source code
file containing class and method
definitions. In VisualWorks, like all Smalltalks, everything is an executing object
, 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.
log file
s. It illustrates how things like strings
and files
can be easily subsumed into the object structure within VisualWorks. Consider the Smalltalk 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:
The latter is a simple notebook
-like editor containing the contents of the file. That is, the evaluation created a filename object as a gateway to the file
Smalltalk
Smalltalk 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 image
System image
A system image in computing is a copy of the entire state of a computer system stored in some non-volatile form such as a file. A system is said to be capable of using system images if it can be shut down and later restored to exactly the same state...
.
The lineage of VisualWorks goes back to the first Smalltalk-80 implementation by Xerox PARC
Xerox PARC
PARC , formerly Xerox PARC, is a research and co-development company in Palo Alto, California, with a distinguished reputation for its contributions to information technology and hardware systems....
. 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 Cincom
Cincom
Cincom Systems is a privately held, multinational, computer technology corporation founded in 1968 by Tom Nies, Tom Richley and Claude Bogardus....
. VisualWorks runs under many operating systems, including Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
, Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
, Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
, and several versions of Unix
Unix
Unix is a multitasking, multi-user 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 GUI
Gui
Gui 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 machine
Virtual machine
A virtual machine is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software emulation or hardware virtualization or both together.-VM Definitions:A virtual machine is a software...
is platform-dependent.
Installation
All components of the VisualWorks system are installed in a directoryDirectory (file systems)
In computing, a folder, directory, catalog, or drawer, is a virtual container originally derived from an earlier Object-oriented programming concept by the same name within a digital file system, in which groups of computer files and other folders can be kept and organized.A typical file system may...
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 CtrlControl key
In 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...
, Option
Option key
The 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. There are two option keys on modern Mac desktop and notebook keyboards, one on each side of the space bar....
, or Command
Command key
The Command key, also historically known as the Apple key, open-Apple key or meta key is a modifier key present on Apple Keyboards. The Command key's purpose is to allow the user to enter keyboard shortcut commands to GUI applications...
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
Smalltalk 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 classes
Class (computer science)
In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior...
as text files. These can be "filed in" to the VisualWorks IDE
Integrated development environment
An integrated development 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 image
System image
A system image in computing is a copy of the entire state of a computer system stored in some non-volatile form such as a file. A system is said to be capable of using system images if it can be shut 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 includeHeader file
Some programming languages use header files. These files allow programmers to separate certain elements of a program's source code into reusable files. Header files commonly contain forward declarations of classes, subroutines, variables, and other identifiers...
command. In Smalltalk
Smalltalk
Smalltalk 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
Smalltalk 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 IDEs
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...
like Squeak
Squeak
The Squeak programming language is a Smalltalk implementation. It is object-oriented, class-based and reflective.It was derived directly from Smalltalk-80 by a group at Apple Computer that included some of the original Smalltalk-80 developers...
and Dolphin Smalltalk
Dolphin Smalltalk
Dolphin 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
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...
environments a developer directly edits a plain text source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...
file containing class and method
Method (computer science)
In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...
definitions. In VisualWorks, like all Smalltalks, everything is an executing object
Executable
In computing, an executable file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a data file that must be parsed by a program to be meaningful. These instructions are traditionally machine code instructions for a physical CPU...
, 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 serverServer (computing)
In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients"...
log file
Log file
The term log file can refer to:*Text saved by a computer operating system to recored its activities, such as by the Unix syslog facility*Output produced by a data loggerAlso see Wikibooks chapter...
s. It illustrates how things like strings
String (computer science)
In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set or alphabet....
and files
Computer file
A 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 expression
Expression (programming)
An expression in a programming language is a combination of explicit values, constants, variables, operators, and functions that are interpreted according to the particular rules of precedence and of association for a particular programming language, which computes and then produces another value...
:
'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 objectObject (computer science)In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...
of class ByteString containing the string (as byteByteThe byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. Historically, a byte was the number of bits used to encode a single character of text in a computer and for this reason it is the basic addressable element in many computer...
s) and the methodsMethod (computer science)In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...
for manipulating it; - An object of class NTFSNTFSNTFS 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 XPWindows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...
); and - An editor object.
The latter is a simple notebook
Notebook
A notebook is a book or binder composed of pages of notes, often ruled, made out of paper, used for purposes including recording notes or memoranda, writing, drawing, and scrapbooking....
-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
- comp.lang.smalltalk newsgroup the group for VisualWorks users
- VisualWorks documentation and FAQ at Cincom
- Smalltalk Daily Screencasts at Cincom
- Smalltalk Podcast at Cincom
- Product Evangelist's Blog at Cincom
- Smalltalk Developer Wiki at Cincom
- VisualWorks tutorial at Cincom
- VisualWorks archive at UIUC
- VisualWorks wiki at UIUC