Jump to content

VisualWorks: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Monkbot (talk | contribs)
m →‎Benefits and drawbacks: Task 16: replaced (1×) / removed (0×) deprecated |dead-url= and |deadurl= with |url-status=;
WP:LEADSENTENCE MOS:BOLDSYNonyms add. Cut needless carriage return whitespace character in section: standardize, aid edits via mobile devices. Small WP:COPYEDITs WP:EoS WP:TERSE.
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{More citations needed|date=September 2010}}
{{multiple issues|
{{Infobox programming language
{{Refimprove|date=September 2010}}
| name = VisualWorks
{{Advert|date=November 2010}}
| logo =
| logo caption =
| screenshot =
| screenshot caption =
| paradigm = [[Object-oriented programming|Object-oriented]]
| designers = [[Alan Kay]], [[Dan Ingalls]], [[Adele Goldberg (computer scientist)|Adele Goldberg]]
| developers = [[PARC (company)|Xerox PARC]], ParcPlace Systems, [[Cincom Systems]]
| released = <!--{{Start date and age|1985?}}-->
| latest release version =
| latest release date = <!--{{Start date and age|2022?}}-->
| typing = [[Type system|Dynamic]]
| implementations =
| dialects =
| influenced by = [[Lisp (programming language)|Lisp]], [[Logo (programming language)|Logo]]; [[Sketchpad]], [[Simula]]
| influenced =
| platform = [[Cross-platform]]
| operating system = [[Cross-platform]]: [[Unix-like]] (several), [[macOS]], [[Linux]], [[Microsoft Windows|Windows]]
| license = [[Proprietary software|Proprietary]]
| file ext =
| website = {{URL|www.cincomsmalltalk.com}}
}}
}}


'''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]].
'''VisualWorks''' (formerly '''ObjectWorks''', afterward '''Cincom Smalltalk''') 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 [[Microsoft Windows|Windows]], [[Mac OS X]], [[Linux]], and several versions of [[Unix]].
The lineage of VisualWorks goes back to the first Smalltalk-80 implementation by [[PARC (company)|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 [[Microsoft Windows|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.
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.


== Benefits and drawbacks ==
== 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. Also, the various code browsers of Visualworks help the developer to quickly locate a class or method of interest.
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.


Execution performance in terms of CPU time and memory consumption of Smalltalk programs is generally not as good as that of statically typed {{Citation needed|reason=this is widely understood to be false|date=October 2013}} and binary-compiled languages such as [[C++]], [[Fortran]], [[Pascal (programming language)|Pascal]] or [[Ada (programming language)|Ada]] {{Citation needed|reason=these claims are unverifiable, the source material only compares to C++|date=October 2013}}, as shown by a previous version of [[The Computer Language Benchmarks Game]], for example.<ref>{{Cite web |url=http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=vw |title=Smalltalk VisualWorks vs. Java 6 |access-date=2008-12-18 |archive-url=https://web.archive.org/web/20081218141523/http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=vw |archive-date=2008-12-18 |url-status=live }}</ref><ref>[http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=vw&lang2=gpp VisualWorks vs. GNU C++] (broken link)</ref> The Smalltalk-inherent [[Garbage collection (computer science)|Garbage Collection]] makes Smalltalk less than ideal for applications with hard realtime requirements {{Citation needed|date=October 2013}}. However, 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.
The performance and throughput of Smalltalk programs can approach the performance of static languages such as [[C++]], [[Fortran]], [[Pascal (programming language)|Pascal]], or [[Ada (programming language)|Ada]] using a [[Just-in-time compilation|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 collection (computer science)|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 ==
== Installation ==

All components of the VisualWorks system are installed on Windows 7 or later in a Program Files\Cincom [[Directory (file systems)|directory]] named after the [[Software versioning|version number]] of the installed system – for instance, <code>vw7.5nc</code>. This directory contains several [[/var/run|subdirectories including bin, doc]], examples and many others.
All components of the VisualWorks system are installed on Windows 7 or later in a Program Files\Cincom [[Directory (file systems)|directory]] named after the [[Software versioning|version number]] of the installed system – for instance, <code>vw7.5nc</code>. This directory contains several [[/var/run|subdirectories including bin, doc]], examples and many others.


== Mouse buttons and menus ==
== Mouse buttons and menus ==

VisualWorks assumes a three-button mouse with buttons having logical names <code><nowiki><Select></nowiki></code>, <code><nowiki><Operate></nowiki></code>, and <code><nowiki><Window></nowiki></code>. Although, a one or two button mouse can be used along with [[Control key|Ctrl]], [[Option key|Option]], or [[Command key|Command]] keys. <code><nowiki><Select></nowiki></code> selects any interface object. <code><nowiki><Operate></nowiki></code> brings up a menu of operations for the current view/selection. <code><nowiki><Window></nowiki></code> initiates actions (move, close...) on VisualWorks windows.
VisualWorks assumes a three-button mouse with buttons having logical names <code><nowiki><Select></nowiki></code>, <code><nowiki><Operate></nowiki></code>, and <code><nowiki><Window></nowiki></code>. Although, a one or two button mouse can be used along with [[Control key|Ctrl]], [[Option key|Option]], or [[Command key|Command]] keys. <code><nowiki><Select></nowiki></code> selects any interface object. <code><nowiki><Operate></nowiki></code> brings up a menu of operations for the current view/selection. <code><nowiki><Window></nowiki></code> initiates actions (move, close...) on VisualWorks windows.


== File-in format==
== File-in format==

File-in format is the original [[Smalltalk]] format for representing [[Class (computer science)|classes]] as text files. These can be "filed in" to the VisualWorks [[Integrated development environment|IDE]] to generate any classes not already contained in the Smalltalk [[System image|image]]. Every file-in document provides a simple textual representation of a Smalltalk class, or classes, in a text file with a <code>.st</code> 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.
File-in format is the original [[Smalltalk]] format for representing [[Class (computer science)|classes]] as text files. These can be "filed in" to the VisualWorks [[Integrated development environment|IDE]] to generate any classes not already contained in the Smalltalk [[System image|image]]. Every file-in document provides a simple textual representation of a Smalltalk class, or classes, in a text file with a <code>.st</code> 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 ==

Parcels are external file representations of packages.
Parcels are external file representations of packages.


Line 40: Line 54:
| work = VisualWorks 7.6 Application Developer's Guide
| work = VisualWorks 7.6 Application Developer's Guide
| publisher = Cincom
| publisher = Cincom
| accessdate = 2009-04-25
| access-date = 2009-04-25
}}</ref>
}}</ref>
The parcel path is the list of directories where VisualWorks looks for parcels. This can be set using the System Settings tool.
The parcel path is the list of directories where VisualWorks looks for parcels. This can be set using the System Settings tool.
Line 53: Line 67:
# Any defined pre-load action is performed (e.g. undeclared variables initialized).
# Any defined pre-load action is performed (e.g. undeclared variables initialized).
# Objects in the package are installed.
# 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.
# Every class in the parcel is sent message post Load: the Package, and any action executed. This is often an application launch.


== Parcel manager ==
== 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.
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.


Line 64: Line 77:


== Packages ==
== 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.
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 ==
== Loading code libraries ==

The initial [[visual.im]] image contains minimal development facilities, using basic [[Class library|class libraries]]. Additional class libraries are provided by VisualWorks or third-party vendors, usually as parcel files. For most non-Smalltalk development environments, [[Code library|code libraries]] are imported at compile time, using an [[Header file|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.
The initial [[visual.im]] image contains minimal development facilities, using basic [[Class library|class libraries]]. Additional class libraries are provided by VisualWorks or third-party vendors, usually as parcel files. For most non-Smalltalk development environments, [[Code library|code libraries]] are imported at compile time, using an [[Header file|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 ==
== 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.
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 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 [[Integrated development environment|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.
[[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 [[Integrated development environment|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 ==
== Browsing and editing Smalltalk code ==

In traditional [[object-oriented programming]] environments a developer directly edits a plain text [[source code]] file containing [[Class library|class]] and [[Method (computer science)|method]] definitions. In VisualWorks, like all Smalltalks, everything is an [[Executable|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.
In traditional [[object-oriented programming]] environments a developer directly edits a plain text [[source code]] file containing [[Class library|class]] and [[Method (computer science)|method]] definitions. In VisualWorks, like all Smalltalks, everything is an [[Executable|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.


Line 86: Line 94:


== Undeclared variables ==
== 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.
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 ==
== 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 (computing)|server]] [[Computer data logging|log files]]. It illustrates how things like [[String (computer science)|strings]] and [[Computer file|files]] can be easily subsumed into the object structure within VisualWorks. Consider the Smalltalk [[Expression (programming)|expression]]:
[http://www.cincomsmalltalk.com/tutorials/version7/tutorial1/ Cincom's first tutorial on VisualWorks] illustrates how VisualWorks can be used to manipulate [[Server (computing)|server]] [[Computer data logging|log files]]. It illustrates how things like [[String (computer science)|strings]] and [[Computer file|files]] can be easily subsumed into the object structure within VisualWorks. Consider the Smalltalk [[Expression (programming)|expression]]:


Line 97: Line 103:
One can evaluate this expression as-is in a VisualWorks workspace using one command in the operate menu. This creates:
One can evaluate this expression as-is in a VisualWorks workspace using one command in the operate menu. This creates:


# An [[Object (computer science)|object]] of class [[ByteString]] containing the string (as [[byte]]s) and the [[Method (computer science)|methods]] for manipulating it;
# An [[Object (computer science)|object]] of class ByteString containing the string (as [[byte]]s) and the [[Method (computer science)|methods]] for manipulating it;
# An object of class [[NTFS]]Filename (in [[Windows XP]]); and
# An object of class [[NTFS]]Filename (in [[Windows XP]]); and
# An editor object.
# 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 <code>ws000101.log</code> 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.
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 <code>ws000101.log</code> 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 ==
== Tutorials ==
[http://smalltalk-daily.cincomsmalltalk.com Tutorials] are produced for Cincom Smalltalk often, and a [http://www.cincomsmalltalk.com/userblogs/cincom/blogView?content=smalltalk_daily_seaside_intro Seaside tutorial] exists.

There are daily [http://smalltalk-daily.cincomsmalltalk.com tutorials] produced for Cincom Smalltalk, and there's a [http://www.cincomsmalltalk.com/userblogs/cincom/blogView?content=smalltalk_daily_seaside_intro Seaside tutorial] as well.


== References ==
== References ==
{{Reflist}}

{{reflist}}


== External links ==
== External links ==
* {{Official website|www.cincomsmalltalk.com}}, Cincom
* {{Official website|www.cincomsmalltalk.com}}, Cincom
* [https://web.archive.org/web/20061210204111/http://wiki.cs.uiuc.edu/VisualWorks VisualWorks wiki] at UIUC archived at archive.org
* [http://groups.google.co.uk/group/comp.lang.smalltalk comp.lang.smalltalk newsgroup] the group for VisualWorks users
* [http://st-www.cs.uiuc.edu/ VisualWorks archive] at UIUC
* [https://web.archive.org/web/20061210204111/http://wiki.cs.uiuc.edu/VisualWorks VisualWorks wiki] at UIUC


{{Smalltalk programming language}}
{{Smalltalk programming language}}

Latest revision as of 07:07, 6 January 2023

VisualWorks
ParadigmObject-oriented
Designed byAlan Kay, Dan Ingalls, Adele Goldberg
DevelopersXerox PARC, ParcPlace Systems, Cincom Systems
Typing disciplineDynamic
PlatformCross-platform
OSCross-platform: Unix-like (several), macOS, Linux, Windows
LicenseProprietary
Websitewww.cincomsmalltalk.com
Influenced by
Lisp, Logo; Sketchpad, Simula

VisualWorks (formerly ObjectWorks, afterward Cincom Smalltalk) 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 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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

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

[edit]

Tutorials are produced for Cincom Smalltalk often, and a Seaside tutorial exists.

References

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