Your SlideShare is downloading. ×
0
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

8 - OOP - Smalltalk Model

739

Published on

Published in: Education, Technology, Spiritual
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
739
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Stéphane Ducasse 1 Stéphane Ducasse stephane.ducasse@inria.fr http://stephane.ducasse.free.fr/ A Little Journey in the Smalltalk Model
  • 2. S.Ducasse 2 A pure and minimal object model Less is more!
  • 3. S.Ducasse 3 No constructors No types declaration No interfaces No packages/private/protected No parametrized types No boxing/unboxing Still powerful
  • 4. S.Ducasse 4 1600 simultaneous users 1.9 billions objects 10 000 updates/day QuickTime™ and a BMP decompressor are needed to see this picture. QuickTime™ and a BMP decompressor are needed to see this picture.
  • 5. S.Ducasse 5 QuickTime™ and a BMP decompressor are needed to see this picture. QuickTime™ and a BMP decompressor are needed to see this picture. QuickTime™ and a BMP decompressor are needed to see this picture. QuickTime™ and a BMP decompressor are needed to see this picture. QuickTime™ and a BMP decompressor are needed to see this picture.
  • 6. S.Ducasse 6 Objects are instances of Classes
  • 7. S.Ducasse 7 Objects are instances of Classes (10@200)
  • 8. S.Ducasse 8 Objects are instances of Classes (10@200) class
  • 9. S.Ducasse 9 Objects are instances of Classes (10@200) class Point
  • 10. S.Ducasse 10 Classes are objects too
  • 11. S.Ducasse 11 Classes are objects too Point selectors
  • 12. S.Ducasse 12 Classes are objects too Point selectors > an IdentitySet(#eightNeighbors #+ #isZero #sortsBefore: #degrees #printOn: #sideOf: #fourNeighbors #hash #roundUpTo: #min: #min:max: #max #adaptToCollection:andSend: #quadrantOf: #crossProduct: #= #nearestPointOnLineFrom:to: #bitShiftPoint: #* #guarded #insideTriangle:with:with: #grid: #truncateTo: #y #setR:degrees: #normal #directionToLineFrom:to: #truncated #nearestPointAlongLineFrom:to: #theta #scaleTo: #encodePostscriptOn: #> #asPoint #extent: #r #roundTo: #max: #interpolateTo:at: #triangleArea:with: #angleWith: #dotProduct: #isSelfEvaluating #'<=' #to:intersects:to: #'//' #isInsideCircle:with:with: #< #scaleFrom:to: #corner: #to:sideOf: #x #'>=' #roundDownTo: #onLineFrom:to:within: #transposed #ceiling #angle #basicType #translateBy: #asFloatPoint #'' #adaptToNumber:andSend: #abs #negated #octantOf: #asIntegerPoint #flipBy:centerAt: #scaleBy: #floor #onLineFrom:to: #isPoint #reflectedAbout: #/ #dist: #asNonFractionalPoint #bearingToPoint: #reciprocal #rotateBy:centerAt: #rotateBy:about: #rounded #setX:setY: #squaredDistanceTo: #normalized #veryDeepCopyWith: #- #storeOn: #rect: #deepCopy #isIntegerPoint #min #adhereTo: #adaptToString:andSend:)
  • 13. S.Ducasse 13 Classes are objects too Point instVarNames
  • 14. S.Ducasse 14 Classes are objects too Point instVarNames >#('x' 'y')
  • 15. S.Ducasse 15 Methods are public
  • 16. S.Ducasse 16 Instance variables are protected
  • 17. S.Ducasse 17 Single Inheritance
  • 18. S.Ducasse 18 Single Inheritance Object subclass: #Point instanceVariableNames: 'x y' classVariableNames: '' poolDictionaries: '' category: 'Graphics-Primitives'
  • 19. S.Ducasse 19 1 2
  • 20. S.Ducasse 20 Classes are objects too
  • 21. S.Ducasse 21 Classes are objects too Point class
  • 22. S.Ducasse 22 Classes are objects too Point class >Point class
  • 23. S.Ducasse 23 Classes are objects too Point class >Point class “Point class” is an anonymous class with only one instance: Point
  • 24. S.Ducasse 24 Class Parallel Inheritance
  • 25. S.Ducasse 25 Lookup and Class Methods 1 2 1 2 Workstation withName: ‘BigMac’ aWorkstation name
  • 26. S.Ducasse 26 About the Buttons
  • 27. S.Ducasse 27 Summary - Everything is an object - One single model - Single inheritance - Public methods - Protected attributes - Classes are simply objects too - Class is instance of another class - One unique method lookup look in the class of the receiver

×