Object-Oriented Programming Basics with Smalltalk

Object-Oriented Programming Basics with Smalltalk

Presented at CodeMash 2016

9c25d5413c2e8688cfbce0311d2e0780?s=128

Larry Staton Jr.

January 07, 2016
Tweet

Transcript

  1. SMALLTALK OBJECT-ORIENTED PROGRAMMING BASICS

  2. @statonjr OOP Basics with Smalltalk 100 Dealerships 10,000+ Employees

  3. @statonjr OOP Basics with Smalltalk OVERVIEW

  4. @statonjr OOP Basics with Smalltalk What is OBJECT-ORIENTED PROGRAMMING?

  5. None
  6. @statonjr OOP Basics with Smalltalk 1966

  7. @statonjr OOP Basics with Smalltalk 1970

  8. @statonjr OOP Basics with Smalltalk 1972

  9. @statonjr OOP Basics with Smalltalk Six Main Ideas of Smalltalk

  10. @statonjr OOP Basics with Smalltalk Everything is an object

  11. @statonjr OOP Basics with Smalltalk Objects communicate by sending and

    receiving messages
  12. @statonjr OOP Basics with Smalltalk Objects have their own memory

  13. @statonjr OOP Basics with Smalltalk Every object is an instance

    of a class
  14. @statonjr OOP Basics with Smalltalk The class holds the shared

    behavior for its instances
  15. @statonjr OOP Basics with Smalltalk To eval a program list,

    control is passed to the first object and the remainder is treated as its message
  16. @statonjr OOP Basics with Smalltalk 1976

  17. @statonjr OOP Basics with Smalltalk

  18. @statonjr OOP Basics with Smalltalk Everything is an object

  19. @statonjr OOP Basics with Smalltalk Data Code

  20. @statonjr OOP Basics with Smalltalk Data Code Methods

  21. @statonjr OOP Basics with Smalltalk Data Code Methods Variables

  22. GENERALLY, WE DON'T WANT THE PROGRAMMER TO BE MESSING AROUND

    WITH STATE, WHETHER SIMULATED OR NOT. Alan Kay THE EARLY HISTORY OF SMALLTALK
  23. @statonjr OOP Basics with Smalltalk Objects communicate by sending and

    receiving messages
  24. @statonjr OOP Basics with Smalltalk SENDER RECEIVER Message Return Value

  25. @statonjr OOP Basics with Smalltalk Every object is an instance

    of a class
  26. @statonjr OOP Basics with Smalltalk Class Instances

  27. @statonjr OOP Basics with Smalltalk Class Instance Class Methods Class

    Variables Instance Methods Instance Variables Instance Methods Instance Variables
  28. @statonjr OOP Basics with Smalltalk The class holds the shared

    behavior for its instances
  29. @statonjr OOP Basics with Smalltalk COMPOSITION

  30. @statonjr OOP Basics with Smalltalk INHERITANCE

  31. @statonjr OOP Basics with Smalltalk name age grade Person Student

  32. @statonjr OOP Basics with Smalltalk POLYMORPHISM

  33. @statonjr OOP Basics with Smalltalk SMALLTALK SYNTAX

  34. @statonjr OOP Basics with Smalltalk SMALLTALK SYNTAX

  35. @statonjr OOP Basics with Smalltalk SMALLTALK SYNTAX Tokens: Identifiers, Numbers,

    ‘Strings’, “Comments”, Binary Operators, Keywords, Special Tokens
  36. @statonjr OOP Basics with Smalltalk SMALLTALK SYNTAX Special Tokens: #:^’|”;()[]

    Tokens: Identifiers, Numbers, ‘Strings’, “Comments”, Binary Operators, Keywords, Special Tokens
  37. @statonjr OOP Basics with Smalltalk SMALLTALK SYNTAX Special Tokens: #:^’|”;()[]

    Tokens: Identifiers, Numbers, ‘Strings’, “Comments”, Binary Operators, Keywords, Special Tokens Reserved Words: nil false true self super
  38. @statonjr OOP Basics with Smalltalk SMALLTALK SYNTAX Special Tokens: #:^’|”;()[]

    Tokens: Identifiers, Numbers, ‘Strings’, “Comments”, Binary Operators, Keywords, Special Tokens Reserved Words: nil false true self super Syntactic Forms: Unary messages, Binary messages, Keyword messages, Block closures, Return Value, Method definition, Assignment, Cascade
  39. @statonjr OOP Basics with Smalltalk DEMO

  40. @statonjr OOP Basics with Smalltalk RESOURCES http://pharo.org http://pharobyexample.org Smalltalk-80: The

    Language and Its Implementation http://files.pharo.org/books/ ProfStef go