Professional Documents
Culture Documents
Dynamic Object-Oriented Programming With Smalltalk: Prof. O. Nierstrasz Autumn Semester 2009
Dynamic Object-Oriented Programming With Smalltalk: Prof. O. Nierstrasz Autumn Semester 2009
Dynamic Object-Oriented Programming With Smalltalk: Prof. O. Nierstrasz Autumn Semester 2009
Smalltalk
1. Introduction
Prof. O. Nierstrasz
Autumn Semester 2009
ST Introduction
Smalltalk
Lecturer
Assistants
Lectures
Exercises
WWW
http://scg.unibe.ch/teaching/smalltalk
1.2
ST Introduction
Birds-eye view
Oscar Nierstrasz
1.3
ST Introduction
Roadmap
>
>
>
>
>
Oscar Nierstrasz
1.4
ST Introduction
Roadmap
>
>
What is Smalltalk?
>
Origins of Smalltalk
>
>
Oscar Nierstrasz
1.5
ST Introduction
Course Schedule
Week
Date
Lecture
16-Sep-09
Introduction
23-Sep-09
Smalltalk Basics
30-Sep-09
Standard Classes
07-Oct-09
14-Oct-09
Seaside
21-Oct-09
Debugging
28-Oct-09
04-Nov-09
11-Nov-09
10
18-Nov-09
Reflection
11
25-Nov-09
12
02-Dec-09
Virtual Machines
13
09-Dec-09
14
16-Dec-09
Final Exam
Oscar Nierstrasz
1.6
ST Introduction
Special preview
edition prepared
for this course
Oscar Nierstrasz
1.7
ST Introduction
>
>
>
>
>
>
Some history
A pure object-oriented model
Classes and metaclasses
Reflection (not just introspection)
Design and implementation of dynamic languages
Advanced object-oriented design concepts
Oscar Nierstrasz
1.8
LECTURE TITLE
>
>
>
>
>
>
>
Everything is an object
Everything happens by sending messages
All the source code is there all the time
You can't lose code
You can change everything
You can change things without restarting the system
The Debugger is your Friend
Oscar Nierstrasz
ST Introduction
A Word of Advice
You do not have to know everything!!!
Try not to care Beginning Smalltalk programmers often
have trouble because they think they need to understand all
the details of how a thing works before they can use it. This
means it takes quite a while before they can master
Transcriptshow:HelloWorld. One of the great
leaps in OO is to be able to answer the question How does
this work? with I dont care.
Alan Knight. Smalltalk Guru
Oscar Nierstrasz
1.10
ST Introduction
Resources
>
Pharo
www.pharo-project.org
>
History
en.wikipedia.org/wiki/Smalltalk
www.smalltalk.org/smalltalk/history.html
>
Free books
stephane.ducasse.free.fr/FreeBooks.html
>
Oscar Nierstrasz
1.11
ST Introduction
Recommended Books
>
>
>
Oscar Nierstrasz
1.12
ST Introduction
Roadmap
>
>
What is Smalltalk?
>
Origins of Smalltalk
>
>
Oscar Nierstrasz
1.13
ST Introduction
Why Smalltalk?
>
>
>
Oscar Nierstrasz
1.14
ST Introduction
What is Smalltalk?
>
Pure OO language
Single inheritance
Dynamically typed
>
>
Virtual machine
Oscar Nierstrasz
1.15
ST Introduction
C++
Java
Object model
Pure
Hybrid
Hybrid
Garbage collection
Automatic
Manual
Automatic
Inheritance
Single
Multiple
Single
Types
Dynamic
Static
Static
Reflection
Fully reflective
Introspection
Introspection
Concurrency
Semaphores,
Monitors
Categories,
namespaces
Some libraries
Monitors
Namespaces
Packages
Modules
Oscar Nierstrasz
1.16
ST Introduction
>
>
>
>
Truly platform-independent
Oscar Nierstrasz
1.17
ST Introduction
Smalltalk in industry
>
Worldwide:
>
http://www.esug.org/companiesdevelopinginsmalltalk/
http://www.whysmalltalk.com/production/index.htm
http://www.stic.org/companies/companies.htm
http://www.goodstart.com/whousessmalltalk.php
In Bern:
Netstyle.ch
DVBern AG
Mobiliar (in-house)
Pulinco
Oscar Nierstrasz
1.18
ST Introduction
Roadmap
>
>
What is Smalltalk?
>
Origins of Smalltalk
>
>
Oscar Nierstrasz
1.19
ST Introduction
Origins of Smalltalk
>
>
>
Oscar Nierstrasz
1.20
ST Introduction
>
>
>
>
>
>
>
>
Oscar Nierstrasz
1.21
ST Introduction
Dynabook Mockup
www.artmuseum.net/w2vr/archives/Kay/01_Dynabook.html
Oscar Nierstrasz
1.22
ST Introduction
Oscar Nierstrasz
1.23
ST Introduction
>
>
>
>
>
>
Oscar Nierstrasz
1.24
ST Introduction
History
Oscar Nierstrasz
1.25
ST Introduction
>
1976 Redesign
>
Oscar Nierstrasz
1.26
ST Introduction
Oscar Nierstrasz
1.27
ST Introduction
1980 Smalltalk-80
ASCII, cleaning primitives for portability, metaclasses, blocks as firstclass objects, MVC.
Projects: Gallery Editor (mixing text, painting and animations) + Alternate
Reality Kit (physics simulation)
>
>
>
>
>
>
Oscar Nierstrasz
1.28
ST Introduction
>
>
Oscar Nierstrasz
1.29
ST Introduction
Roadmap
>
>
What is Smalltalk?
>
Origins of Smalltalk
>
>
Oscar Nierstrasz
1.30
ST Introduction
>
Everything is an object
>
>
Dynamic binding
Oscar Nierstrasz
1.31
ST Introduction
>
Oscar Nierstrasz
1.32
ST Introduction
>
Oscar Nierstrasz
1.33
ST Introduction
Alltheobje
Abyte
atamomen
thevir
IMAGE1.
Stand
IMAGE2
Shar
Oneperus
>
>
Image = bytecodes
Sources and changes = code (text)
>
Oscar Nierstrasz
1.34
ST Introduction
>
>
>
Oscar Nierstrasz
1.35
ST Introduction
Roadmap
>
>
What is Smalltalk?
>
Origins of Smalltalk
>
>
Oscar Nierstrasz
1.36
ST Introduction
Mouse Semantics
Operate
Select
Oscar Nierstrasz
Window
1.37
ST Introduction
World Menu
Oscar Nierstrasz
1.38
ST Introduction
Hello World
Oscar Nierstrasz
1.39
ST Introduction
Oscar Nierstrasz
1.40
ST Introduction
The Debugger
Oscar Nierstrasz
1.41
ST Introduction
The Inspector
Oscar Nierstrasz
1.42
ST Introduction
The Explorer
Oscar Nierstrasz
1.43
ST Introduction
Other Tools
>
File Browser
>
>
Change Sorter
>
Oscar Nierstrasz
1.44
ST Introduction
File Browser
Oscar Nierstrasz
1.45
ST Introduction
Oscar Nierstrasz
1.46
ST Introduction
Method Finder
Oscar Nierstrasz
1.47
ST Introduction
Oscar Nierstrasz
1.48
ST Introduction
Preferences
Oscar Nierstrasz
1.49
ST Introduction
SUnit
Oscar Nierstrasz
1.50
ST Introduction
>
>
>
Object-oriented thinking
>
>
Smalltalk culture
Oscar Nierstrasz
1.51
ST Introduction
Oscar Nierstrasz
1.52
ST Introduction
Oscar Nierstrasz
1.53
ST Introduction
License
http://creativecommons.org/licenses/by-sa/3.0/
1.54