VisualWorks

VisualWorks

VisualWorks is one of the leading implementations of the Smalltalk programming language and environment.

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 [http://www.cincom.com/ 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 for free. [http://www.cincomsmalltalk.com/userblogs/cincom/blogView?content=smalltalk Download it here] . The non-commercial version has all the power and functionality of the commercial version. In both versions, as in all Smalltalks, one can see all the source code. This includes all the system classes, including the browser and GUI builder.

VisualWorks excels in 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.

Installation

All components of the VisualWorks system are installed in a 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 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 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, see reference [1] for details. 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 (1)organize the code, (2) 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. It 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 postLoad: thePackage, and any action executed. This is often an application launch.

The 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 Painteris loaded as a parcel.

The VisualWorks Launcher

The VisualWorks Launcher, usually just called "the Launcher", is the control centre for the VisualWorks system. It's the launching pad for all the major tools.

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 Small 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 loaded via a parcel but never declared, its name enters the Undeclared name space. Undeclared variables can cause certain program errors.

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

String and Files

[http://www.cincomsmalltalk.com/tutorials/version7/tutorial1/ 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 editOne 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, an object of class NTFSFilename (in Windows XP), and 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.

References

[1] VisualWorks Application Developer's Guide P46-0101-11, available free in the doc directory of the [http://www.cincomsmalltalk.com/userblogs/cincom/blogView?content=smalltalk Cincom Smalltalk nc download] (VisualWorks is part of Cincom Smalltalk).

External links

* [http://groups.google.co.uk/group/comp.lang.smalltalk comp.lang.smalltalk newsgroup] the group for VisualWorks users
* [http://www.cincomsmalltalk.com/userblogs/cincom/blogView?content=documentation VisualWorks documentation and FAQ] at Cincom
* [http://smalltalk-daily.cincomsmalltalk.com Smalltalk Daily Screencasts] at Cincom
* [http://industry-misinterpretations.cincomsmalltalk.com Smalltalk Podcast] at Cincom
* [http://www.cincomsmalltalk.com/blog/blogView Product Evangelist's Blog] at Cincom
* [http://www.cincomsmalltalk.com/CincomSmalltalkWiki Smalltalk Developer Wiki] at Cincom
* [http://smalltalk.cincom.com/tutorial/index.ssp?content=tutorials VisualWorks tutorial] at Cincom
* [http://st-www.cs.uiuc.edu/ VisualWorks archive] at UIUC
* [http://wiki.cs.uiuc.edu/VisualWorks VisualWorks wiki] at UIUC


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • VisualWorks — est une implémentation de Smalltalk développée initialement au Xerox PARC, puis par ParcPlace Systems et enfin repris par Cincom. VisualWorks s exécute sur plusieurs plateforme comme Apple Macintosh, GNU/Linux, plusieurs version d UNIX et Windows …   Wikipédia en Français

  • VisualWorks — Es otra de las opciones multiplataforma para programar en Smalltalk que están disponibles en el mercado, así como Squeak, VisualAge, SmalltalkX. Esta distribución de Smalltalk posee la máquina virtual más elogiada en el ámbito de Smalltalk por su …   Wikipedia Español

  • Smalltalk — This article is about the programming language. For other uses, see Small talk (disambiguation). Smalltalk Smalltalk 80: The Language and its Implementation, a.k.a. the Blue book , a seminal book on the language Paradigm(s) object oriented… …   Wikipedia

  • Smalltalk-80 (Programmiersprache) — Smalltalk Basisdaten Erscheinungsjahr: 1972 (Entwicklung ab 1969) Designer: Alan Kay, Dan Ingalls, Adele Goldberg E …   Deutsch Wikipedia

  • Smalltalk — Семантика: объектно ориентированная Появился в: Разработка начата в 1969 г., стал доступен для широкого использования в 1980 Автор(ы): Алан Кэй, Дэн Ингаллс, Xerox PARC Типизация данных: динамическая …   Википедия

  • SmallTalk — Apparu en Développement démarré en 1969, disponible publiquement en 1980 Auteur Alan Kay, Dan Ingals, Ted Kaehler, Adele Goldberg, Claude Roy …   Wikipédia en Français

  • SmallTalk (langage) — Smalltalk Apparu en Développement démarré en 1969, disponible publiquement en 1980 Auteur Alan Kay, Dan Ingals, Ted Kaehler, Adele Goldberg, Claude Roy …   Wikipédia en Français

  • Seaside (software) — Infobox Software name = Seaside caption = Screenshot of a web application in development mode collapsible = yes developer = [http://www.seaside.st/community/contributors The Seaside Team] latest release version = 2.8 latest release date = release …   Wikipedia

  • Programmiersprache Smalltalk — Smalltalk Logo von Smalltalk Basisdaten Entwickler: diverse Aktuelle Version: Smalltalk 80  (1980) …   Deutsch Wikipedia

  • Smalltalk-80 — Smalltalk Logo von Smalltalk Basisdaten Entwickler: diverse Aktuelle Version: Smalltalk 80  (1980) …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”