SlideShare uma empresa Scribd logo
1 de 54
Dynamic Object-Oriented Programming with
Smalltalk
1. Introduction
Prof. O. Nierstrasz
Autumn Semester 2009
© Oscar Nierstrasz
ST — Introduction
1.2
Smalltalk
Lecturer Prof. Oscar Nierstrasz
Assistants
David Röthlisberger, Fabrizio Perin
Timur Altun
Lectures IWI 001, Wednesdays @ 10h15-12h00
Exercises IWI 001, Wednesdays @ 12h00-13h00
WWW http://scg.unibe.ch/teaching/smalltalk
Selected material courtesy Stéphane Ducasse
Birds-eye view
© Oscar Nierstrasz
ST — Introduction
1.3
Smalltalk is still today one of the
few fully reflective, fully dynamic,
object-oriented development
environments.
Smalltalk is still today one of the
few fully reflective, fully dynamic,
object-oriented development
environments.
We will see how a simple, uniform
object model enables live, dynamic,
interactive software development.
We will see how a simple, uniform
object model enables live, dynamic,
interactive software development.
© Oscar Nierstrasz
ST — Introduction
1.4
Roadmap
> Course schedule, goals, resources
> What is Smalltalk?
> Origins of Smalltalk
> Smalltalk key concepts
> The Smalltalk environment
© Oscar Nierstrasz
ST — Introduction
1.5
Roadmap
> Course schedule, goals, resources
> What is Smalltalk?
> Origins of Smalltalk
> Smalltalk key concepts
> The Smalltalk environment
© Oscar Nierstrasz
ST — Introduction
1.6
Course Schedule
Week Date Lecture
1 16-Sep-09 Introduction
2 23-Sep-09 Smalltalk Basics
3
30-Sep-09 Standard Classes
4 07-Oct-09 Smalltalk Coding Idioms
5 14-Oct-09 Seaside
6 21-Oct-09 Debugging
7 28-Oct-09 Best Practice Patterns
8 04-Nov-09 Refactoring and Design Patterns
9 11-Nov-09 Understanding Classes and Metaclasses
10 18-Nov-09 Reflection
11 25-Nov-09 Working with ByteCode
12 02-Dec-09 Virtual Machines
13 09-Dec-09 Traits and Classboxes
14 16-Dec-09 Final Exam
Pharo by Example (preview)
© Oscar Nierstrasz
ST — Introduction
1.7
Special preview
edition prepared
for this course
© Oscar Nierstrasz
ST — Introduction
1.8
Goals of this Course
> 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
What is surprising about Smalltalk
> 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
LECTURE TITLE
9
A Word of Advice
© Oscar Nierstrasz
ST — Introduction
1.10
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
Transcript show: ‘Hello World’. One of the great
leaps in OO is to be able to answer the question “How does
this work?” with “I don’t care”.
—Alan Knight. Smalltalk Guru
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
Transcript show: ‘Hello World’. One of the great
leaps in OO is to be able to answer the question “How does
this work?” with “I don’t care”.
—Alan Knight. Smalltalk Guru
© Oscar Nierstrasz
ST — Introduction
1.11
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
> European Smalltalk Users Group
— www.esug.org
© Oscar Nierstrasz
ST — Introduction
1.12
Recommended Books
> Alec Sharp, Smalltalk by Example, McGraw-Hill, 1997.
> Kent Beck, Smalltalk Best Practice Patterns, Prentice
Hall, 1997.
> Sherman Alpert et al., The Smalltalk Design Pattern
Companion, Addison-Wesley, 1998
© Oscar Nierstrasz
ST — Introduction
1.13
Roadmap
> Course schedule, goals, resources
> What is Smalltalk?
> Origins of Smalltalk
> Smalltalk key concepts
> The Smalltalk environment
© Oscar Nierstrasz
ST — Introduction
1.14
Why Smalltalk?
> Pure object-oriented language and environment
— “Everything is an object”
> Origin of many innovations in OO development
— RDD, IDE, MVC, XUnit …
> Improves on many of its successors
— Fully interactive and dynamic
© Oscar Nierstrasz
ST — Introduction
1.15
What is Smalltalk?
> Pure OO language
— Single inheritance
— Dynamically typed
> Language and environment
— Guiding principle: “Everything is an Object”
— Class browser, debugger, inspector, …
— Mature class library and tools
> Virtual machine
— Objects exist in a persistent image [+ changes]
— Incremental compilation
© Oscar Nierstrasz
ST — Introduction
1.16
Smalltalk vs. C++ vs. Java
Smalltalk 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
Some libraries Monitors
Modules
Categories,
namespaces
Namespaces Packages
© Oscar Nierstrasz
ST — Introduction
1.17
Smalltalk: a State of Mind
> Small and uniform language
— Syntax fits on one sheet of paper
> Large library of reusable classes
— Basic Data Structures, GUI classes, Database Access, Internet,
Graphics
> Advanced development tools
— Browsers, GUI Builders, Inspectors, Change Management Tools, Crash
Recovery Tools, Project Management Tools
> Interactive virtual machine technology
— Truly platform-independent
> Team Working Environment
— Releasing, versioning, deploying
© Oscar Nierstrasz
ST — Introduction
1.18
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
ST — Introduction
1.19
Roadmap
> Course schedule, goals, resources
> What is Smalltalk?
> Origins of Smalltalk
> Smalltalk key concepts
> The Smalltalk environment
© Oscar Nierstrasz
ST — Introduction
1.20
Origins of Smalltalk
> Project at Xerox PARC in 1970s
— Language and environment for new generation of graphical
workstations (target: “Dynabook”)
> In Smalltalk-72, every object was an
independent entity
— Language was designed for children (!)
— Evolved towards a meta-reflective architecture
> Smalltalk-80 is the standard
© Oscar Nierstrasz
ST — Introduction
1.21
Smalltalk — The Inspiration
> Flex (Alan Kay, 1969)
> Lisp (Interpreter, Blocks, Garbage Collection)
> Turtle graphics (The Logo Project, Programming for Children)
> Direct Manipulation Interfaces (Sketchpad, Alan Sutherland, 1960)
> NLS, (Doug Engelbart, 1968), “the augmentation of human
intellect”
> Simula (Classes and Message Sending)
> Xerox PARC (Palo Alto Research Center)
> DynaBook: a Laptop Computer for Children
— www.smalltalk.org/smalltalk/TheEarlyHistoryOfSmalltalk_Abstract.html
© Oscar Nierstrasz
ST — Introduction
1.22
Dynabook Mockup
www.artmuseum.net/w2vr/archives/Kay/01_Dynabook.html
© Oscar Nierstrasz
ST — Introduction
1.23
Smalltalk on Alto III
Alto: a Machine to Run Smalltalk
© Oscar Nierstrasz
ST — Introduction
1.24
Precursor, Innovator & Visionary
> First to be based on Graphics
— Multi-Windowing Environment (Overlapping Windows)
— Integrated Development Environment: Debugger, Compiler,
Text Editor, Browser
> With a pointing device yes, a Mouse
> Ideas were taken over
— Apple Lisa, Mac
— Microsoft Windows 1.0
> Platform-independent Virtual Machine
> Garbage Collector
> Just-in-time Compilation
> Everything was there, the complete Source Code
© Oscar Nierstrasz
ST — Introduction
1.25
History
© Oscar Nierstrasz
ST — Introduction
1.26
The History (Internal)
> 1972 — First Interpreter
— More Agents than Objects
(every object could specify its own syntax!)
> 1976 — Redesign
— A hierarchy of classes with a unique root, fixed syntax, compact
bytecode, contexts, processes, semaphores, browsers, GUI
library.
— Projects: ThingLab, Visual Programming Environment,
Programming by Rehearsal.
> 1978 — NoteTaker Project
— Experimentation with 8086 Microprocessor with only 256 KB
RAM.
© Oscar Nierstrasz
ST — Introduction
1.27
© Oscar Nierstrasz
ST — Introduction
1.28
The History (External)
> 1980 — Smalltalk-80
— ASCII, cleaning primitives for portability, metaclasses, blocks as first-
class objects, MVC.
— Projects: Gallery Editor (mixing text, painting and animations) +
Alternate Reality Kit (physics simulation)
> 1981 — Books + 4 external virtual machines
— Dec, Apple, HP and Tektronix
— GC by generation scavenging
> 1988 — Creation of Parc Place Systems
> 1992 — ANSI Draft
> 1995 — New Smalltalk implementations
— MT, Dolphin, Squeak, Smalltalk/X, GNU Smalltalk
> 2000 — Fscript, GNU Smalltalk, SmallScript
> 2002 — Smalltalk as OS: 128k ram
© Oscar Nierstrasz
ST — Introduction
1.29
What are Squeak and Pharo?
> Squeak is a modern, open-source, highly portable, fast,
full-featured Smalltalk implementation
— Based on original Smalltalk-80 code
> Pharo is a lean and clean fork of Squeak
— www.pharo-project.org
© Oscar Nierstrasz
ST — Introduction
1.30
Roadmap
> Course schedule, goals, resources
> What is Smalltalk?
> Origins of Smalltalk
> Smalltalk key concepts
> The Smalltalk environment
© Oscar Nierstrasz
ST — Introduction
1.31
Smalltalk — Key Concepts
> Everything is an object
— numbers, files, editors, compilers, points, tools, booleans …
> Everything happens by sending messages
> Every object is an instance of one class
— which is also an object
— A class defines the structure and the behavior of its instances.
> Objects have private (protected) state
— Encapsulation boundary is the object
> Dynamic binding
— Variables are dynamically typed and bound
© Oscar Nierstrasz
ST — Introduction
1.32
Objects and Classes
> Every object is an instance of a class
— A class specifies the structure and the behaviour of all its
instances
— Instances of a class share the same behavior and have a
specific state
— Classes are objects that create other instances
— Metaclasses are classes that create classes as instances
— Metaclasses describe class behaviour and state (subclasses,
method dictionary, instance variables...)
© Oscar Nierstrasz
ST — Introduction
1.33
Messages and Methods
> Message — which action to perform
> Method — how to carry out the action
aWorkstation accept: aPacket
aMonster eat: aCookie
accept: aPacket
(aPacket isAddressedTo: self)
ifTrue:[
Transcript show:
'A packet is accepted by the Workstation ',
self name asString ]
ifFalse: [super accept: aPacket]
© Oscar Nierstrasz
ST — Introduction
1.34
A bytethe vir
IMAGE2IMAGE2StandShar
IMAGE1.IMAGE1.
All the objeat a momen
One per us
+
Smalltalk Run-Time Architecture
> Virtual Machine + Image + Changes and Sources
> Image = bytecodes
> Sources and changes = code (text)
© Oscar Nierstrasz
ST — Introduction
1.35
Smalltalk Run-Time Architecture
> Byte-code is translated to native code by a just-in-time
compiler
— Some Smalltalks, but not Pharo
> Source and changes are not needed to interpret the
byte-code.
— Just needed for development
— Normally removed for deployment
> An application can be delivered as byte-code files that
will be executed with a VM.
— The development image is stripped to remove the unnecessary
development components.
© Oscar Nierstrasz
ST — Introduction
1.36
Roadmap
> Course schedule, goals, resources
> What is Smalltalk?
> Origins of Smalltalk
> Smalltalk key concepts
> The Smalltalk environment
© Oscar Nierstrasz
ST — Introduction
1.37
Mouse Semantics
Select
Operate
Window
© Oscar Nierstrasz
ST — Introduction
1.38
World Menu
© Oscar Nierstrasz
ST — Introduction
1.39
“Hello World”
© Oscar Nierstrasz
ST — Introduction
1.40
The Smalltalk Browser
© Oscar Nierstrasz
ST — Introduction
1.41
The Debugger
© Oscar Nierstrasz
ST — Introduction
1.42
The Inspector
© Oscar Nierstrasz
ST — Introduction
1.43
The Explorer
© Oscar Nierstrasz
ST — Introduction
1.44
Other Tools
> File Browser
— Browse, import, open files
> Method Finder, Message Name tool
— Find methods by name, behaviour
> Change Sorter
— Name, organize all source code changes
> SUnit Test Runner
— Manage & run unit tests
© Oscar Nierstrasz
ST — Introduction
1.45
File Browser
© Oscar Nierstrasz
ST — Introduction
1.46
Message Name Finder
© Oscar Nierstrasz
ST — Introduction
1.47
Method Finder
© Oscar Nierstrasz
ST — Introduction
1.48
Methods in ChangeSets & Versions
© Oscar Nierstrasz
ST — Introduction
1.49
Preferences
© Oscar Nierstrasz
ST — Introduction
1.50
SUnit
© Oscar Nierstrasz
ST — Introduction
1.51
Challenges of this Course
> Mastering Smalltalk syntax
— Simple, but not Java-like
> Pharo Programming Environment
— Requires some effort to learn at first, but worth the effort
> Pharo Class Library
— Need time to learn what is there
> Object-oriented thinking
— This is the hardest part!
> Fully dynamic environment
— This is the most exciting part!
> Smalltalk culture
— Best Practice Patterns (cf. book by Kent Beck)
© Oscar Nierstrasz
ST — Introduction
1.52
What you should know!
How does Smalltalk differ from Java or C++?
Where are Smalltalk programs stored?
Where are objects stored?
What was the Dynabook?
Is a class an object?
What is dynamic binding?
What is the difference between a message and a
method?
© Oscar Nierstrasz
ST — Introduction
1.53
Can you answer these questions?
What ideas did Smalltalk take from Simula? From Lisp?
Is there anything in Smalltalk which is not an object?
What exactly is stored in the changes file?
If objects have private state, then how can an Inspector
get at that state?
How do you create a new class?
What is the root of the class hierarchy?
If a class is an object, then what is its class? The class
of its class? …
If you don’t know, how would you find out?
© Oscar Nierstrasz
ST — Introduction
1.54
Attribution-ShareAlike 3.0 Unported
You are free:
to Share — to copy, distribute and transmit the work
to Remix — to adapt the work
Under the following conditions:
Attribution. You must attribute the work in the manner specified by the author or
licensor (but not in any way that suggests that they endorse you or your use of the
work).
Share Alike. If you alter, transform, or build upon this work, you may distribute the
resulting work only under the same, similar or a compatible license.
For any reuse or distribution, you must make clear to others the license terms of this work.
The best way to do this is with a link to this web page.
Any of the above conditions can be waived if you get permission from the copyright holder.
Nothing in this license impairs or restricts the author's moral rights.
License
http://creativecommons.org/licenses/by-sa/3.0/

Mais conteúdo relacionado

Destaque (20)

Stoop 301-internal objectstructureinvw
Stoop 301-internal objectstructureinvwStoop 301-internal objectstructureinvw
Stoop 301-internal objectstructureinvw
 
Stoop 430-design patternsintro
Stoop 430-design patternsintroStoop 430-design patternsintro
Stoop 430-design patternsintro
 
Stoop 423-smalltalk idioms
Stoop 423-smalltalk idiomsStoop 423-smalltalk idioms
Stoop 423-smalltalk idioms
 
Stoop 305-reflective programming5
Stoop 305-reflective programming5Stoop 305-reflective programming5
Stoop 305-reflective programming5
 
Stoop 431-visitor
Stoop 431-visitorStoop 431-visitor
Stoop 431-visitor
 
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
 
Stoop ed-subtyping subclassing
Stoop ed-subtyping subclassingStoop ed-subtyping subclassing
Stoop ed-subtyping subclassing
 
Double Dispatch
Double DispatchDouble Dispatch
Double Dispatch
 
Stoop 415-design points
Stoop 415-design pointsStoop 415-design points
Stoop 415-design points
 
Stoop 423-some designpatterns
Stoop 423-some designpatternsStoop 423-some designpatterns
Stoop 423-some designpatterns
 
Stoop 450-s unit
Stoop 450-s unitStoop 450-s unit
Stoop 450-s unit
 
Debugging VisualWorks
Debugging VisualWorksDebugging VisualWorks
Debugging VisualWorks
 
07 bestpractice
07 bestpractice07 bestpractice
07 bestpractice
 
Stoop 422-naming idioms
Stoop 422-naming idiomsStoop 422-naming idioms
Stoop 422-naming idioms
 
Stoop 400 o-metaclassonly
Stoop 400 o-metaclassonlyStoop 400 o-metaclassonly
Stoop 400 o-metaclassonly
 
Stoop 436-strategy
Stoop 436-strategyStoop 436-strategy
Stoop 436-strategy
 
Stoop metaclasses
Stoop metaclassesStoop metaclasses
Stoop metaclasses
 
Stoop ed-frameworks
Stoop ed-frameworksStoop ed-frameworks
Stoop ed-frameworks
 
05 seaside
05 seaside05 seaside
05 seaside
 
10 - OOP - Inheritance (a)
10 - OOP - Inheritance (a)10 - OOP - Inheritance (a)
10 - OOP - Inheritance (a)
 

Semelhante a 01 intro

Take the Smalltalk Red Pill
Take the Smalltalk Red PillTake the Smalltalk Red Pill
Take the Smalltalk Red PillOSOCO
 
Innoslate the Gateway to SysML 2.0 and Beyond
Innoslate the Gateway to SysML 2.0 and BeyondInnoslate the Gateway to SysML 2.0 and Beyond
Innoslate the Gateway to SysML 2.0 and BeyondSarahCraig7
 
Smalltalk In A Nutshell
Smalltalk In A NutshellSmalltalk In A Nutshell
Smalltalk In A Nutshellscg
 
201708 OpenStack Seminar in Myanmar
201708 OpenStack Seminar in Myanmar201708 OpenStack Seminar in Myanmar
201708 OpenStack Seminar in MyanmarTakashi Torii
 
DME for ZYNQ FPGA - A new way to design your SOC
DME for ZYNQ FPGA - A new way to design your SOCDME for ZYNQ FPGA - A new way to design your SOC
DME for ZYNQ FPGA - A new way to design your SOCBengt Edlund
 
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...Russell Pavlicek
 
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at ScaleUsing AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at ScaleData Works MD
 
ASP.NET And Web Programming
ASP.NET And Web ProgrammingASP.NET And Web Programming
ASP.NET And Web ProgrammingKimberly Pulley
 
Snipmatch - Snippets for the World
Snipmatch - Snippets for the WorldSnipmatch - Snippets for the World
Snipmatch - Snippets for the WorldMarcel Bruch
 
object oriented-programming
object oriented-programmingobject oriented-programming
object oriented-programmingRajendran
 
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...The Linux Foundation
 
KDE in Your Life from Desktop to Pocket
KDE in Your Life from Desktop to PocketKDE in Your Life from Desktop to Pocket
KDE in Your Life from Desktop to PocketOpenBossa
 
From the South: building together a high-tech ecosystem
From the South: building together a high-tech ecosystemFrom the South: building together a high-tech ecosystem
From the South: building together a high-tech ecosystemNicolás Erdödy
 
How monitoring OpenStack can positively affect your sleeping habits and hairstyl
How monitoring OpenStack can positively affect your sleeping habits and hairstylHow monitoring OpenStack can positively affect your sleeping habits and hairstyl
How monitoring OpenStack can positively affect your sleeping habits and hairstylDirk Wallerstorfer
 

Semelhante a 01 intro (20)

2 - OOP
2 - OOP2 - OOP
2 - OOP
 
Take the Smalltalk Red Pill
Take the Smalltalk Red PillTake the Smalltalk Red Pill
Take the Smalltalk Red Pill
 
Innoslate the Gateway to SysML 2.0 and Beyond
Innoslate the Gateway to SysML 2.0 and BeyondInnoslate the Gateway to SysML 2.0 and Beyond
Innoslate the Gateway to SysML 2.0 and Beyond
 
Smalltalk In A Nutshell
Smalltalk In A NutshellSmalltalk In A Nutshell
Smalltalk In A Nutshell
 
201708 OpenStack Seminar in Myanmar
201708 OpenStack Seminar in Myanmar201708 OpenStack Seminar in Myanmar
201708 OpenStack Seminar in Myanmar
 
DME for ZYNQ FPGA - A new way to design your SOC
DME for ZYNQ FPGA - A new way to design your SOCDME for ZYNQ FPGA - A new way to design your SOC
DME for ZYNQ FPGA - A new way to design your SOC
 
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
OSAC16: Unikernel-powered Transient Microservices: Changing the Face of Softw...
 
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at ScaleUsing AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
 
Squeak
SqueakSqueak
Squeak
 
ASP.NET And Web Programming
ASP.NET And Web ProgrammingASP.NET And Web Programming
ASP.NET And Web Programming
 
Snipmatch - Snippets for the World
Snipmatch - Snippets for the WorldSnipmatch - Snippets for the World
Snipmatch - Snippets for the World
 
object oriented-programming
object oriented-programmingobject oriented-programming
object oriented-programming
 
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
 
Smalltalk and Business
Smalltalk and BusinessSmalltalk and Business
Smalltalk and Business
 
99 questions
99 questions99 questions
99 questions
 
Children of Ruby
Children of RubyChildren of Ruby
Children of Ruby
 
KDE in Your Life from Desktop to Pocket
KDE in Your Life from Desktop to PocketKDE in Your Life from Desktop to Pocket
KDE in Your Life from Desktop to Pocket
 
From the South: building together a high-tech ecosystem
From the South: building together a high-tech ecosystemFrom the South: building together a high-tech ecosystem
From the South: building together a high-tech ecosystem
 
01 intro
01 intro 01 intro
01 intro
 
How monitoring OpenStack can positively affect your sleeping habits and hairstyl
How monitoring OpenStack can positively affect your sleeping habits and hairstylHow monitoring OpenStack can positively affect your sleeping habits and hairstyl
How monitoring OpenStack can positively affect your sleeping habits and hairstyl
 

Mais de The World of Smalltalk (20)

05 seaside canvas
05 seaside canvas05 seaside canvas
05 seaside canvas
 
13 traits
13 traits13 traits
13 traits
 
12 virtualmachine
12 virtualmachine12 virtualmachine
12 virtualmachine
 
11 bytecode
11 bytecode11 bytecode
11 bytecode
 
10 reflection
10 reflection10 reflection
10 reflection
 
09 metaclasses
09 metaclasses09 metaclasses
09 metaclasses
 
08 refactoring
08 refactoring08 refactoring
08 refactoring
 
06 debugging
06 debugging06 debugging
06 debugging
 
04 idioms
04 idioms04 idioms
04 idioms
 
03 standardclasses
03 standardclasses03 standardclasses
03 standardclasses
 
02 basics
02 basics02 basics
02 basics
 
Stoop sed-smells
Stoop sed-smellsStoop sed-smells
Stoop sed-smells
 
Stoop sed-sharing ornot
Stoop sed-sharing ornotStoop sed-sharing ornot
Stoop sed-sharing ornot
 
Stoop sed-class initialization
Stoop sed-class initializationStoop sed-class initialization
Stoop sed-class initialization
 
Stoop sed-class initialization
Stoop sed-class initializationStoop sed-class initialization
Stoop sed-class initialization
 
Stoop ed-unit ofreuse
Stoop ed-unit ofreuseStoop ed-unit ofreuse
Stoop ed-unit ofreuse
 
Stoop ed-some principles
Stoop ed-some principlesStoop ed-some principles
Stoop ed-some principles
 
Stoop ed-lod
Stoop ed-lodStoop ed-lod
Stoop ed-lod
 
Stoop ed-inheritance composition
Stoop ed-inheritance compositionStoop ed-inheritance composition
Stoop ed-inheritance composition
 
Stoop ed-class forreuse
Stoop ed-class forreuseStoop ed-class forreuse
Stoop ed-class forreuse
 

Último

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Último (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

01 intro

  • 1. Dynamic Object-Oriented Programming with Smalltalk 1. Introduction Prof. O. Nierstrasz Autumn Semester 2009
  • 2. © Oscar Nierstrasz ST — Introduction 1.2 Smalltalk Lecturer Prof. Oscar Nierstrasz Assistants David Röthlisberger, Fabrizio Perin Timur Altun Lectures IWI 001, Wednesdays @ 10h15-12h00 Exercises IWI 001, Wednesdays @ 12h00-13h00 WWW http://scg.unibe.ch/teaching/smalltalk Selected material courtesy Stéphane Ducasse
  • 3. Birds-eye view © Oscar Nierstrasz ST — Introduction 1.3 Smalltalk is still today one of the few fully reflective, fully dynamic, object-oriented development environments. Smalltalk is still today one of the few fully reflective, fully dynamic, object-oriented development environments. We will see how a simple, uniform object model enables live, dynamic, interactive software development. We will see how a simple, uniform object model enables live, dynamic, interactive software development.
  • 4. © Oscar Nierstrasz ST — Introduction 1.4 Roadmap > Course schedule, goals, resources > What is Smalltalk? > Origins of Smalltalk > Smalltalk key concepts > The Smalltalk environment
  • 5. © Oscar Nierstrasz ST — Introduction 1.5 Roadmap > Course schedule, goals, resources > What is Smalltalk? > Origins of Smalltalk > Smalltalk key concepts > The Smalltalk environment
  • 6. © Oscar Nierstrasz ST — Introduction 1.6 Course Schedule Week Date Lecture 1 16-Sep-09 Introduction 2 23-Sep-09 Smalltalk Basics 3 30-Sep-09 Standard Classes 4 07-Oct-09 Smalltalk Coding Idioms 5 14-Oct-09 Seaside 6 21-Oct-09 Debugging 7 28-Oct-09 Best Practice Patterns 8 04-Nov-09 Refactoring and Design Patterns 9 11-Nov-09 Understanding Classes and Metaclasses 10 18-Nov-09 Reflection 11 25-Nov-09 Working with ByteCode 12 02-Dec-09 Virtual Machines 13 09-Dec-09 Traits and Classboxes 14 16-Dec-09 Final Exam
  • 7. Pharo by Example (preview) © Oscar Nierstrasz ST — Introduction 1.7 Special preview edition prepared for this course
  • 8. © Oscar Nierstrasz ST — Introduction 1.8 Goals of this Course > 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
  • 9. What is surprising about Smalltalk > 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 LECTURE TITLE 9
  • 10. A Word of Advice © Oscar Nierstrasz ST — Introduction 1.10 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 Transcript show: ‘Hello World’. One of the great leaps in OO is to be able to answer the question “How does this work?” with “I don’t care”. —Alan Knight. Smalltalk Guru 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 Transcript show: ‘Hello World’. One of the great leaps in OO is to be able to answer the question “How does this work?” with “I don’t care”. —Alan Knight. Smalltalk Guru
  • 11. © Oscar Nierstrasz ST — Introduction 1.11 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 > European Smalltalk Users Group — www.esug.org
  • 12. © Oscar Nierstrasz ST — Introduction 1.12 Recommended Books > Alec Sharp, Smalltalk by Example, McGraw-Hill, 1997. > Kent Beck, Smalltalk Best Practice Patterns, Prentice Hall, 1997. > Sherman Alpert et al., The Smalltalk Design Pattern Companion, Addison-Wesley, 1998
  • 13. © Oscar Nierstrasz ST — Introduction 1.13 Roadmap > Course schedule, goals, resources > What is Smalltalk? > Origins of Smalltalk > Smalltalk key concepts > The Smalltalk environment
  • 14. © Oscar Nierstrasz ST — Introduction 1.14 Why Smalltalk? > Pure object-oriented language and environment — “Everything is an object” > Origin of many innovations in OO development — RDD, IDE, MVC, XUnit … > Improves on many of its successors — Fully interactive and dynamic
  • 15. © Oscar Nierstrasz ST — Introduction 1.15 What is Smalltalk? > Pure OO language — Single inheritance — Dynamically typed > Language and environment — Guiding principle: “Everything is an Object” — Class browser, debugger, inspector, … — Mature class library and tools > Virtual machine — Objects exist in a persistent image [+ changes] — Incremental compilation
  • 16. © Oscar Nierstrasz ST — Introduction 1.16 Smalltalk vs. C++ vs. Java Smalltalk 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 Some libraries Monitors Modules Categories, namespaces Namespaces Packages
  • 17. © Oscar Nierstrasz ST — Introduction 1.17 Smalltalk: a State of Mind > Small and uniform language — Syntax fits on one sheet of paper > Large library of reusable classes — Basic Data Structures, GUI classes, Database Access, Internet, Graphics > Advanced development tools — Browsers, GUI Builders, Inspectors, Change Management Tools, Crash Recovery Tools, Project Management Tools > Interactive virtual machine technology — Truly platform-independent > Team Working Environment — Releasing, versioning, deploying
  • 18. © Oscar Nierstrasz ST — Introduction 1.18 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
  • 19. © Oscar Nierstrasz ST — Introduction 1.19 Roadmap > Course schedule, goals, resources > What is Smalltalk? > Origins of Smalltalk > Smalltalk key concepts > The Smalltalk environment
  • 20. © Oscar Nierstrasz ST — Introduction 1.20 Origins of Smalltalk > Project at Xerox PARC in 1970s — Language and environment for new generation of graphical workstations (target: “Dynabook”) > In Smalltalk-72, every object was an independent entity — Language was designed for children (!) — Evolved towards a meta-reflective architecture > Smalltalk-80 is the standard
  • 21. © Oscar Nierstrasz ST — Introduction 1.21 Smalltalk — The Inspiration > Flex (Alan Kay, 1969) > Lisp (Interpreter, Blocks, Garbage Collection) > Turtle graphics (The Logo Project, Programming for Children) > Direct Manipulation Interfaces (Sketchpad, Alan Sutherland, 1960) > NLS, (Doug Engelbart, 1968), “the augmentation of human intellect” > Simula (Classes and Message Sending) > Xerox PARC (Palo Alto Research Center) > DynaBook: a Laptop Computer for Children — www.smalltalk.org/smalltalk/TheEarlyHistoryOfSmalltalk_Abstract.html
  • 22. © Oscar Nierstrasz ST — Introduction 1.22 Dynabook Mockup www.artmuseum.net/w2vr/archives/Kay/01_Dynabook.html
  • 23. © Oscar Nierstrasz ST — Introduction 1.23 Smalltalk on Alto III Alto: a Machine to Run Smalltalk
  • 24. © Oscar Nierstrasz ST — Introduction 1.24 Precursor, Innovator & Visionary > First to be based on Graphics — Multi-Windowing Environment (Overlapping Windows) — Integrated Development Environment: Debugger, Compiler, Text Editor, Browser > With a pointing device yes, a Mouse > Ideas were taken over — Apple Lisa, Mac — Microsoft Windows 1.0 > Platform-independent Virtual Machine > Garbage Collector > Just-in-time Compilation > Everything was there, the complete Source Code
  • 25. © Oscar Nierstrasz ST — Introduction 1.25 History
  • 26. © Oscar Nierstrasz ST — Introduction 1.26 The History (Internal) > 1972 — First Interpreter — More Agents than Objects (every object could specify its own syntax!) > 1976 — Redesign — A hierarchy of classes with a unique root, fixed syntax, compact bytecode, contexts, processes, semaphores, browsers, GUI library. — Projects: ThingLab, Visual Programming Environment, Programming by Rehearsal. > 1978 — NoteTaker Project — Experimentation with 8086 Microprocessor with only 256 KB RAM.
  • 27. © Oscar Nierstrasz ST — Introduction 1.27
  • 28. © Oscar Nierstrasz ST — Introduction 1.28 The History (External) > 1980 — Smalltalk-80 — ASCII, cleaning primitives for portability, metaclasses, blocks as first- class objects, MVC. — Projects: Gallery Editor (mixing text, painting and animations) + Alternate Reality Kit (physics simulation) > 1981 — Books + 4 external virtual machines — Dec, Apple, HP and Tektronix — GC by generation scavenging > 1988 — Creation of Parc Place Systems > 1992 — ANSI Draft > 1995 — New Smalltalk implementations — MT, Dolphin, Squeak, Smalltalk/X, GNU Smalltalk > 2000 — Fscript, GNU Smalltalk, SmallScript > 2002 — Smalltalk as OS: 128k ram
  • 29. © Oscar Nierstrasz ST — Introduction 1.29 What are Squeak and Pharo? > Squeak is a modern, open-source, highly portable, fast, full-featured Smalltalk implementation — Based on original Smalltalk-80 code > Pharo is a lean and clean fork of Squeak — www.pharo-project.org
  • 30. © Oscar Nierstrasz ST — Introduction 1.30 Roadmap > Course schedule, goals, resources > What is Smalltalk? > Origins of Smalltalk > Smalltalk key concepts > The Smalltalk environment
  • 31. © Oscar Nierstrasz ST — Introduction 1.31 Smalltalk — Key Concepts > Everything is an object — numbers, files, editors, compilers, points, tools, booleans … > Everything happens by sending messages > Every object is an instance of one class — which is also an object — A class defines the structure and the behavior of its instances. > Objects have private (protected) state — Encapsulation boundary is the object > Dynamic binding — Variables are dynamically typed and bound
  • 32. © Oscar Nierstrasz ST — Introduction 1.32 Objects and Classes > Every object is an instance of a class — A class specifies the structure and the behaviour of all its instances — Instances of a class share the same behavior and have a specific state — Classes are objects that create other instances — Metaclasses are classes that create classes as instances — Metaclasses describe class behaviour and state (subclasses, method dictionary, instance variables...)
  • 33. © Oscar Nierstrasz ST — Introduction 1.33 Messages and Methods > Message — which action to perform > Method — how to carry out the action aWorkstation accept: aPacket aMonster eat: aCookie accept: aPacket (aPacket isAddressedTo: self) ifTrue:[ Transcript show: 'A packet is accepted by the Workstation ', self name asString ] ifFalse: [super accept: aPacket]
  • 34. © Oscar Nierstrasz ST — Introduction 1.34 A bytethe vir IMAGE2IMAGE2StandShar IMAGE1.IMAGE1. All the objeat a momen One per us + Smalltalk Run-Time Architecture > Virtual Machine + Image + Changes and Sources > Image = bytecodes > Sources and changes = code (text)
  • 35. © Oscar Nierstrasz ST — Introduction 1.35 Smalltalk Run-Time Architecture > Byte-code is translated to native code by a just-in-time compiler — Some Smalltalks, but not Pharo > Source and changes are not needed to interpret the byte-code. — Just needed for development — Normally removed for deployment > An application can be delivered as byte-code files that will be executed with a VM. — The development image is stripped to remove the unnecessary development components.
  • 36. © Oscar Nierstrasz ST — Introduction 1.36 Roadmap > Course schedule, goals, resources > What is Smalltalk? > Origins of Smalltalk > Smalltalk key concepts > The Smalltalk environment
  • 37. © Oscar Nierstrasz ST — Introduction 1.37 Mouse Semantics Select Operate Window
  • 38. © Oscar Nierstrasz ST — Introduction 1.38 World Menu
  • 39. © Oscar Nierstrasz ST — Introduction 1.39 “Hello World”
  • 40. © Oscar Nierstrasz ST — Introduction 1.40 The Smalltalk Browser
  • 41. © Oscar Nierstrasz ST — Introduction 1.41 The Debugger
  • 42. © Oscar Nierstrasz ST — Introduction 1.42 The Inspector
  • 43. © Oscar Nierstrasz ST — Introduction 1.43 The Explorer
  • 44. © Oscar Nierstrasz ST — Introduction 1.44 Other Tools > File Browser — Browse, import, open files > Method Finder, Message Name tool — Find methods by name, behaviour > Change Sorter — Name, organize all source code changes > SUnit Test Runner — Manage & run unit tests
  • 45. © Oscar Nierstrasz ST — Introduction 1.45 File Browser
  • 46. © Oscar Nierstrasz ST — Introduction 1.46 Message Name Finder
  • 47. © Oscar Nierstrasz ST — Introduction 1.47 Method Finder
  • 48. © Oscar Nierstrasz ST — Introduction 1.48 Methods in ChangeSets & Versions
  • 49. © Oscar Nierstrasz ST — Introduction 1.49 Preferences
  • 50. © Oscar Nierstrasz ST — Introduction 1.50 SUnit
  • 51. © Oscar Nierstrasz ST — Introduction 1.51 Challenges of this Course > Mastering Smalltalk syntax — Simple, but not Java-like > Pharo Programming Environment — Requires some effort to learn at first, but worth the effort > Pharo Class Library — Need time to learn what is there > Object-oriented thinking — This is the hardest part! > Fully dynamic environment — This is the most exciting part! > Smalltalk culture — Best Practice Patterns (cf. book by Kent Beck)
  • 52. © Oscar Nierstrasz ST — Introduction 1.52 What you should know! How does Smalltalk differ from Java or C++? Where are Smalltalk programs stored? Where are objects stored? What was the Dynabook? Is a class an object? What is dynamic binding? What is the difference between a message and a method?
  • 53. © Oscar Nierstrasz ST — Introduction 1.53 Can you answer these questions? What ideas did Smalltalk take from Simula? From Lisp? Is there anything in Smalltalk which is not an object? What exactly is stored in the changes file? If objects have private state, then how can an Inspector get at that state? How do you create a new class? What is the root of the class hierarchy? If a class is an object, then what is its class? The class of its class? … If you don’t know, how would you find out?
  • 54. © Oscar Nierstrasz ST — Introduction 1.54 Attribution-ShareAlike 3.0 Unported You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. Any of the above conditions can be waived if you get permission from the copyright holder. Nothing in this license impairs or restricts the author's moral rights. License http://creativecommons.org/licenses/by-sa/3.0/

Notas do Editor

  1. Flex - an early desktop computer with graphical user interface and object-oriented operating system NLS - “oNLine System”, early interactive system with mouse. Demo: http://sloan.stanford.edu/mousesite/1968Demo.html