Cincom
VisualWorks Tutorial


| Table of Contents |


Cincom VisualWorks Web Log Statistics Tutorial Summary

 

This tutorial was designed to teach you Smalltalk using VisualWorks. It assumed you knew ABSOLUTELY NOTHING about Smalltalk but a little something about programming. We hoped that you liked the approach that this tutorial took in trying to get you coding as quickly as possible. By now, you should have a good foundation of the Smalltalk "basics" and witnessed how powerful a language it really is.

If you worked through all the exercises and took advantage of all the additional primers, you have covered quite a lot. Someone once said "When programming in Smalltalk, you either re-invent the wheel or try to determine where the wheels are buried." What he was referring to was that VisualWorks comes delivered with a large class library (...where the wheels are buried...) and you use a combination of these classes with your own (...re-invent the wheel...). This tutorial exposed you to a handful of these classes and becoming more proficient in Smalltalk is simply a matter of becoming more familiar with them. If you want to do something, chances are Smalltalk already has a class that can do it - it's just a matter of finding "where that wheel is buried".

Actually, this is no different than learning another language. To be really proficient, you have to know what all the commands are, what they do and what their syntax is. The trouble is all those commands typically have a different syntax to them, making it hard to memorize. The good news about Smalltalk is that, from a syntax perspective, you have all you need to know about it right now! The language is amazingly consistent. This allows you to spend more time learning about the standard Smalltalk classes and methods and the more you know about them, the more powerful programmer you become.

Just in case you had trouble getting the code to work, click here to view the solution. Note: This file is in XML format and how it will be displayed will depend on how your browser handles XML files.

Just as a refresher, below is a list of major concepts that have been covered in this tutorial plus all the classes and their associated methods we have used. As you can see, you've made a very impressive start and have accomplished a great deal.

You now should know how to:

Display output 4 different ways

Iterate through a collection a fixed number of times

Move elements from one collection to another

Identify how to pass data from one method to another.

Read from and Write to external files

Save and retrieve your Smalltalk program

Use the System Browser to create a new category, class, protocol and method

Cascade Smalltalk statements

Perform loops

Identify Smalltalk naming conventions


The classes and their respective methods.

Class

Methods

Transcript

show: | cr

Dialog

warn: | request:initialAnswer:

Integer

squared | +

String

asFilename | copyUpTo: | directoryContents
findString:startingAt: | copyFrom:To:

Filename

fileSize | edit

Stream

readStream | writeStream | upTo:
close | atEnd | nextPutAll:

SortedCollection

add: | size | do: | sortBlock:

Bag

add: | size | do: | valuesAndCountsDo:

Association

key:value:

Set

add: | size | do:

Miscellaneous

printString | new | whileFalse: | ifFalse:
ifTrue: | self | super | ^ (carat : return)
; (semi-colon : cascade) | , (comma : catenate)

So where do you go from here? In the future, look for more tutorials like this one from Cincom. Until then, here are a few resources that you might find helpful.

Books

The Design Patterns Smalltalk Companion

Alpert, Sherman R., Kyle Brown, Bobby Woolf.

Addison-Wesley, 1998.

ISBN 0-201-18462-1

A companion volume to the famous Design Patterns book tailored and enhanced to the Smalltalk perspective.

Guide to Better Smalltalk

Beck, Kent.

Cambridge University Press/SIGS Books, 1999.

ISBN 0-521-64437-2

Collection of technical papers written by Kent Beck on idioms, models, object-oriented achitecture, and all things Smalltalk.

Smalltalk-80:The Language

Goldberg A., and David Robson.

Addison-Wesley, 1989.

ISBN 0-201-13688-0

The purple book--the seminal book on Smalltalk. Though dated with regard to most existing Smalltalk implementations, it is still often referenced by authors and an excellent introduction to Smalltalk.

The Art and Science of Smalltalk

Lewis, Simon.

Prentice Hall, 1995.

ISBN 0-13-371345-8

Highly readable introduction to object-oriented programming and Smalltalk.

Smalltalk, Objects, and Design

Liu, Chamond.

Manning Publications, 1996.

ISBN 0-13-268335-0

Excellent hands-on introduction and broad review of object-oriented programming in Smalltalk.

Rapid Software Development with Smalltalk: Advances in Object Technology Series

Lorenz, Mark.

SIGS Books, 1995.

ISBN 0134497376

Review in progress

Smalltalk with Style

Skublics, Suzanne, Edward J. Klimas, and David A. Thomas.

Prentice-Hall, 1996

ISBN 0-13-165549-3

Style guide, tips, naming conventions and techniques for Smalltalk coding.

Advanced Smalltalk

Pletzke, Jonathan.

John Wiley and Sons, 1996.

ISBN 0471163503

Includes CD-ROM. Programming examples and issues with the four popular versions of Smalltalk.

On To Smalltalk

Winston, Patrick Henry.

Addison-Wesley, 1998.

ISBN 0-201-49827-8

Hands-on stepwise tutorial of Smalltalk programming principles using predominately the Smalltalk Express/Visual Smalltalk version but features VisualWorks.

Smalltalk: An Introduction to Application Development Using VisualWorks

Hopkins, Trevor and Bernard Horan.

Prentice-Hall, 1995.

ISBN 0-13-318387-4

Introductory book on Smalltalk with emphasis on VW 2.0. Includes programming examples.

The Smalltalk Developer's Guide to VisualWorks

Howard, Tim.

SIGS Books, 1995.

PH ISBN 0-13-442526-X

Indispensible reference on development with VisualWorks with an in-depth presentation of how to understand, use, and extend it. Includes disk with online documentation and examples.

Smalltalk by Example

Sharp, Alec.

McGraw-Hill, 1997.

ISBN 0-07-913036-4

Hands-on introduction and reference to Smalltalk. With programming examples and disk.

Smalltalk and Object Orientation. An Introduction

Hunt, John.

Springer-Verlag, 1997.

ISBN 3-540-76115-2

Introduction to OO programming with Smalltalk with design by UML and patterns.

Distributed Smalltalk Survival Guide

Montlick, Terry.

SIGS Books, 1998

ISBN 0-52-164552-2

Discusses commercial, off the shelf choices available to developers for building distributed Smalltalk systems. Covers all versions of Smalltalk and their integration with CORBA and the Web.

Discovering Smalltalk

LaLonde, Wilf.

Addison-Wesley, 1994

ISBN 0-80-532720-7

Review in progress

Smalltalk/V Practice and Experience

LaLonde, Wilf and John Pugh.

Prentice Hall, 1994.

ISBN 0-13-814039-1

Review in progress

Smalltalk Programming for Windows

Shafer, Dan.

Prima Computer Books, 1993

ISBN 1-55958-237-5

Out of print

Succeeding with Objects: Decision Frameworks for Project Management

Goldberg, A. and Kenneth Rubin.

Addison-Wesley, 1995.

ISBN 0-201-62878-3

Object-oriented programming concepts and project management.

 

On the Web

Cincom Smalltalk

All things related to Cincom Smalltalk Cincom Smalltalk Information Center site

Product Manager's Blog

Information on Smalltalk and other industry related news James Robertson

University of Illinois - Urbana-Champaign

VisualWorks Wiki at UIUC UIUC VW Wiki

Cincom Smalltalk Wiki

The Cincom Smalltalk Wiki CST Wiki

Smalltalk Industry Council (STIC)

www.smalltalkindustrycouncil.org

Yahoo Smalltalk Reference List

Yahoo category for Smalltalk

comp.lang.smalltalk

A usenet newsgroup devoted to the topic of Smalltalk.

We hoped you enjoyed this tutorial and learned a little something about VisualWorks Smalltalk in the process. As always, we welcome your comments and would like to know if this tutorial was of benefit to you. We also would like to know what other topics you think would make good tutorials. This will help us plan and give us a good sense of producing material that you, the customer, want.

Please send you comments to:
James Robertson
Cincom Smalltalk Product Manager
Cincom Systems, Inc.
jrobertson@cincom.com


| Table of Contents |