Finally, this is a tutorial, not a reference manual: I cannot say to you "Jump over this chapter is you are not interested" because all the chapters are equally important in this sequence.
Version 1.0 Date: February 2001 First Version for Squeak 2.8
Native Format: Sgml
New version of this documentThe document is available from the Author at his main site (http://objectsroot.com/squeak/squeak_tutorial.html) in these formats:
- Html Optimized for WWW Browsing (small files)
- Text format
Contact Information and feedbackIf you have any suggestions, corrections, or comments, please send them to me, and I will incorporate them in the next revision of this document. I expect to do the next mayor revision of this document near April 2002, but a small revision will be done near the Feb 2002 for adding a MVC section.
You can reach me using one of these email addresses: email@example.com, firstname.lastname@example.org
I thank a lot Stephen T. Pope (email@example.com) for including this document in the Squeak cd-rom and for his supervision. I thank also my friends for reading this document before its final revision: Cristian Ghezzi, Daniele Bufarini, Marco Lamberto.
About the AuthorGiovanni Giorgi is born in 1974 and is tall 1.80 meters, with black hair and brown eyes He got a Master Thesis at Dep. of Comp. Sci. (DSI) of Milan, on 23th Feb 2000, with a Thesis on Design Patterns and UML. He works with Java, likes Smalltalk and loves cats. Preferred Film: Blade Runner by Ridley Scott, The tiger and the Dragon.
http://pobox.com/~cg/sgmltools) of the linux-doc project. The arrow of the html version and all the screen-shots has been done using the GIMP http://www.gimp.org. I have changed Html2Html.pm module to fit my needs.
The valuable editor is Emacs 20.6.1 and the O.S. is linux
I thank a lot the GNU projects for their efforts.
For medium limitations, the best version is the html version. The Postscript version is a nice printed version, but for images see the images directory!
The text version is the final, desperate solution for who wants to read it in a palm computer with no-so-much-ram :-)
We will use this text for code you must type in your Smalltalk implementation and try it.
Smalltalk versionsThis tutorial is for Squeak, but you can adapt a lots of concepts to other Smalltalks. For instance, VisualAge for Smalltalk and VisualWorks should work with most of this examples.
You can copy/distribute this document providing that:
- You do not alter or modify the document in any part
- You do not ask money for it, excluding for the distribution.
Smalltalk is a old programming language, born before Java, C/C++. Smalltalk has a good base library (first attempt to build it was done before 1980!) and a very productive engine.
If you use Java in your work-of-every-day, you can run Smalltalk without loosing speed or efficency (and probably you can get a good improvements with a commercial Smalltalk version!).
Why Smalltalk is not so used? The reason was the high cost of Smalltalk in the '80 years and until the 1995. Worst, the fastest Intel-PC in the 1990 was too slow for using Smalltalk (or Java or Lisp) in the all-day work.
If you feel C/Java language is nice, but you want a way for increase your productivity without looking for bugged code every day, Smalltalk can give you a solution. C++ is not often a solution because a good C programmers continue to use is as an "enhanced C" without using the full power of the OOP. C++ is for efficency: but efficency can lead to bad Object Oriented code, because you do NOT tend to isolate the classes as they should be.
I used Java, C and C++, then I discovered Smalltalk. It seems incredible, but you can do a lot of thing with Smalltalk: you can find the bug very quickly and enjoy a lot!!
In the last five years you can download free version of Smalltalk, which are quite powerful and fast, and you can buy a professional Smalltalk at a reasonable price.
This because the competition of Java has lowered the costs of the implementations.
Best, you can find the same Smalltalk implementation under Unix, MS-Windows and Mac, so it is widespread as the Java/C languages.
So, why not invest a bit of our time to learn a dynamic, powerful and fun language?
- You must know Java: you must not be a wizard, but you must know all the Java reserved words, data types, and so on. You can ignore how to do fantastic tricks as Enterprise Java Beans (but you know what is a Bean, right?!)
- You should be a bit familiar with Object Oriented concept like class, inheritance and so on. If you are not do not worry, but you should have a vague idea of the meaning of this words, because I am not going to do a course on O.O.P. in a strict sense. As we'll see Smalltalk is the first Object Oriented language that induce the concept of Object and inheritance as we know it now. But Smalltalk has some lacks (no a strong information-hiding concept, no protection, no static behavior).
- You should know how to start a Smalltalk image, execute some code.
- You should have a little of time to invest, and an open mind....