VisualWorks

Last updated
VisualWorks
Paradigm Object-oriented
Designed by Alan Kay, Dan Ingalls, Adele Goldberg
Developers Xerox PARC, ParcPlace Systems, Cincom Systems
Typing discipline Dynamic
Platform Cross-platform
OS Cross-platform: Unix-like (several), macOS, Linux, Windows
License Proprietary
Website www.cincomsmalltalk.com
Influenced by
Lisp, Logo; Sketchpad, Simula

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.

Contents

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 named ObjectWorks, and then VisualWorks. On August 31, 1999, the VisualWorks product was sold to Cincom Systems. VisualWorks runs under many operating systems, including Windows, macOS, Linux, and several Unix versions.

VisualWorks supports cross-platform development projects, because of its built-in multi-platform features. For example, a graphical user interface (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 with no modifications. Only the virtual machine is platform-dependent.

Benefits and drawbacks

VisualWorks allows for very fast application development, as individual methods can be compiled even while the program to be developed is running. Compiling a Smalltalk method typically takes significantly less than a second, while doing the same for a C++ project often takes a minute or more, and cannot be done easily without restarting the process. The various code browsers of VisualWorks help the developer to quickly locate a class or method of interest.

The performance and throughput of Smalltalk programs can approach the performance of static languages such as C++, Fortran, Pascal, or Ada using a just-in-time compiler by generating machine code that is specialised for frequently used types, but numeric processing and programs that benefit from precise memory layout may still run slower. The generational garbage collector minimises most collection pauses, but may not be suitable for hard real-time and determinism requirements, as long full collections may occur, which may stop the world for tens to hundreds of milliseconds, proportional to heap size. However, garbage collection is preferable over manual memory management in an object-oriented language, and the programmer can take various actions to control when and for how long garbage collection occurs; so under most circumstances, garbage collection is not a concern.

Installation

All components of the VisualWorks system are installed on Windows 7 or later in a Program Files\Cincom directory 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 <Select>, <Operate>, and <Window>. Although, a one or two button mouse can be used along with Ctrl, Option, or Command keys. <Select> selects any interface object. <Operate> brings up a menu of operations for the current view/selection. <Window> initiates actions (move, close...) on VisualWorks windows.

File-in format

File-in format is the original Smalltalk 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 .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. [1] 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:

  1. Any prerequisite components are loaded.
  2. Any defined pre-load action is performed (e.g. undeclared variables initialized).
  3. Objects in the package are installed.
  4. Every class in the parcel is sent message post Load: the Package, 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 include 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.

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

Smalltalk 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.

Browsing and editing Smalltalk code

In traditional object-oriented programming 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.

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 server log files. 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:

  1. An object of class ByteString containing the string (as bytes) and the methods for manipulating it;
  2. An object of class NTFSFilename (in Windows XP); and
  3. An editor object.

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 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.

Related Research Articles

<span class="mw-page-title-main">Smalltalk</span> Object-oriented programming language first released in 1972

Smalltalk is a purely object oriented (OO) programming language, created in the 1970s for educational use, specifically for constructionist learning, at Xerox PARC by Learning Research Group (LRG) scientists, including Alan Kay, Dan Ingalls, Adele Goldberg, Ted Kaehler, Diana Merry, and Scott Wallace.

In computing, serialization is the process of translating a data structure or object state into a format that can be stored or transmitted and reconstructed later. When the resulting series of bits is reread according to the serialization format, it can be used to create a semantically identical clone of the original object. For many complex objects, such as those that make extensive use of references, this process is not straightforward. Serialization of object-oriented objects does not include any of their associated methods with which they were previously linked.

In computing, DLL Hell is a term for the complications that arise when one works with dynamic-link libraries (DLLs) used with Microsoft Windows operating systems, particularly legacy 16-bit editions, which all run in a single memory space.

<span class="mw-page-title-main">Genera (operating system)</span> Symbolics operating system based on Lisp

Genera is a commercial operating system and integrated development environment for Lisp machines created by Symbolics. It is essentially a fork of an earlier operating system originating on the Massachusetts Institute of Technology (MIT) AI Lab's Lisp machines which Symbolics had used in common with Lisp Machines, Inc. (LMI), and Texas Instruments (TI). Genera was also sold by Symbolics as Open Genera, which runs Genera on computers based on a Digital Equipment Corporation (DEC) Alpha processor using Tru64 UNIX. In 2021 a new version was released as Portable Genera which runs on DEC Alpha Tru64 UNIX, x86_64 and Arm64 Linux, x86_64 and Apple M1 macOS. It is released and licensed as proprietary software.

<span class="mw-page-title-main">Library (computing)</span> Collection of non-volatile resources used by computer programs

In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subroutines, classes, values or type specifications. In IBM's OS/360 and its successors they are referred to as partitioned data sets.

The resource fork is a fork or section of a file on Apple's classic Mac OS operating system, which was also carried over to the modern macOS for compatibility, used to store structured data along with the unstructured data stored within the data fork.

<span class="mw-page-title-main">JAR (file format)</span> Java archive file format

A JAR file is a package file format typically used to aggregate many Java class files and associated metadata and resources into one file for distribution.

The Visual Component Library (VCL) is a visual component-based object-oriented framework for developing the user interface of Microsoft Windows applications. It is written in Object Pascal.

<span class="mw-page-title-main">IBM System Object Model</span> Programming framework

In computing, the System Object Model (SOM) is an object-oriented shared library system developed by IBM. DSOM, a distributed version based on CORBA, allowed objects on different computers to communicate.

<span class="mw-page-title-main">Class browser</span> Feature of coding platforms

A class browser is a feature of an integrated development environment (IDE) that allows the programmer to browse, navigate, or visualize the structure of object-oriented programming code.

In NeXTSTEP, OPENSTEP, GNUstep, and their lineal descendants macOS and iOS, a bundle is a file directory with a defined structure and file extension, allowing related files to be grouped together as a conceptually single item.

<span class="mw-page-title-main">Seaside (software)</span>

Seaside, an acronym that stands for “Squeak Enterprise Aubergines Server with Integrated Development Environment,” is computer software, a web framework to develop web applications in the programming language Smalltalk. It is distributed as free and open-source software under an MIT License.

The Java Class Loader is a part of the Java Runtime Environment that dynamically loads Java classes into the Java Virtual Machine. Usually classes are only loaded on demand. The Java run time system does not need to know about files and file systems as this is delegated to the class loader.

Dynamic loading is a mechanism by which a computer program can, at run time, load a library into memory, retrieve the addresses of functions and variables contained in the library, execute those functions or access those variables, and unload the library from memory. It is one of the 3 mechanisms by which a computer program can use some other software; the other two are static linking and dynamic linking. Unlike static linking and dynamic linking, dynamic loading allows a computer program to start up in the absence of these libraries, to discover available libraries, and to potentially gain additional functionality.

Eclipse OpenJ9 is a high performance, scalable, Java virtual machine (JVM) implementation that is fully compliant with the Java Virtual Machine Specification.

Component Object Model (COM) is a binary-interface standard for software components introduced by Microsoft in 1993. It is used to enable inter-process communication object creation in a large range of programming languages. COM is the basis for several other Microsoft technologies and frameworks, including OLE, OLE Automation, Browser Helper Object, ActiveX, COM+, DCOM, the Windows shell, DirectX, UMDF and Windows Runtime. The essence of COM is a language-neutral way of implementing objects that can be used in environments different from the one in which they were created, even across machine boundaries. For well-authored components, COM allows reuse of objects with no knowledge of their internal implementation, as it forces component implementers to provide well-defined interfaces that are separated from the implementation. The different allocation semantics of languages are accommodated by making objects responsible for their own creation and destruction through reference-counting. Type conversion casting between different interfaces of an object is achieved through the QueryInterface method. The preferred method of "inheritance" within COM is the creation of sub-objects to which method "calls" are delegated.

The Java Development Kit (JDK) is a distribution of Java Technology by Oracle Corporation. It implements the Java Language Specification (JLS) and the Java Virtual Machine Specification (JVMS) and provides the Standard Edition (SE) of the Java Application Programming Interface (API). It is derivative of the community driven OpenJDK which Oracle stewards. It provides software for working with Java applications. Examples of included software are the virtual machine, a compiler, performance monitoring tools, a debugger, and other utilities that Oracle considers useful for a Java programmer.

<span class="mw-page-title-main">Mono (software)</span> Computer software project

Mono is a free and open-source .NET Framework-compatible software framework. Originally by Ximian, it was later acquired by Novell, and is now being led by Xamarin, a subsidiary of Microsoft and the .NET Foundation. Mono can be run on many software systems.

Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXTSTEP operating system. Due to Apple macOS’s direct lineage from NeXTSTEP, Objective-C was the standard programming language used, supported, and promoted by Apple for developing macOS and iOS applications until the introduction of the Swift programming language in 2014.

References

  1. "Running VisualWorks" (PDF). VisualWorks 7.6 Application Developer's Guide. Cincom. pp. 1–3. Retrieved 2009-04-25.