Understand the key mechanisms and the essence of object-oriented design: messages, tests, hooks,
design patterns, double dispatch, object creation, sharing, inversion of control and types.
You will get to know and understand the key mechanisms and the essence of object-oriented design.
Whether you are a beginner or an expert, we are sure that you will not develop the same way after following
this unique lecture, built on more than 60 years of combined experience teaching object-oriented design.
Language independent
Pharo is the pedagogical vehicle, but every concept applies to any object-oriented language.
Why Pharo?
A pure object-oriented language with immediate feedback on live objects: the perfect environment to teach deep object-oriented programming.
Design exercises
From little interpreters to games and quizzes, collected in a companion exercise book.
Next level
The Pharo MOOC is not a requirement, but if you liked it, this MOOC brings you to the next level ;-)
What learners say
I love this course so much. I remember how difficult it was to understand OOD concepts in the early 2000s. There were a lot of aphorisms flowing around, but when I asked the people stating them to explain it, no one really did. It is so satisfying to see lecture after lecture explaining those object-oriented principles while refactoring examples. This is the course I wanted 24 years ago. So happy that it exists today.— bambooer
Hi, thank you for the excellent MOOC. I just completed Module 1. The quizzes really help. I am going to say this a lot. I am warning you. What a great course this is. The lectures are solid. I am working through the first exercise, and I have been learning so much and consolidating the information from the lectures along with practicing pharo. I believe this course will be my model whenever I write training in the future.— stfan10
In my opinion, this MOOC is a must-learn for any developer using Object-Oriented Programming. It teaches the essential concepts common to most OOP languages in a concise and well-paced way. The choice of Pharo as an illustrative language definitely felt appropriate, and was never an obstacle to understanding the content of the course. I would definitely recommend completing the companion exercises, whether in Pharo or your OOP language of choice.
High-level course stimulate your brain and gives you lots of inputs to go on learning more and more...
The knowledge, syllabus and pacing are excellent. Recording is of good quality (minus the occasional typos), even at an accelerated speed (I used 1.5x). Thank you so much for giving me the rationales to finally understand the OOP paradigm after years of working with it using heuristics and half-understood notions. It feels like a new beginning for me.
Modules 1-4 should be taught to and understood by anyone programming with an OOP language. I appreciate that these pieces of invaluable knowledge keep being repeated in the other modules.
My most sincere compliments. It is rare to find a course that is so specialized and practical at the same time.
Companion exercise book
We designed a set of exercises to train yourself on object-oriented design, packaged as a book.
Do them in Pharo or in your object-oriented language of choice.
Found a mistake? Please open an issue on
GitHub: it helps us improve and publish the book.
MOOC map
The map shows the modules and how they relate. See the MOOC overview as
slides or video.
Get started
Download and install the Pharo Launcher for your OS, and create an image of the latest Pharo version.
New to Pharo? Do the optional warm-up module, and execute ProfStef new go in Pharo for an interactive tutorial.
Follow the modules in order: each builds on the previous ones.
Modules
64 lectures in 10 modules, plus an optional warm-up. Each lecture comes with its slides and its video.
All slides are also available as a single zip.
Optional warm-upLittle Warm up with Pharo
This first optional module presents some lectures from the Pharo Mooc. It helps the reader who wants to follow the syntax used in the slides and do the exercises to learn fast Pharo. We suggest to execute the expression ProfStef new go and perform the proposed exercises.
Teaching objectives (2)
Pharo syntax
Pharo object model
Core elements — The following short videos explain the full language.
This first module revisits elementary concepts around self, super, and the power of dispatching to dedicated objects. The case study shows how to go from a monolithic design with one kind of format to the handling of optional different formats in the Pillar document compilation chain.
Teaching objectives (6)
Completely rethink what it means to send a message
Explain that sending a message is making a choice based on classes
Distinguish between static and dynamic approaches to inheritance
Understand what is to send a message and how lookup works
Understand deeply what super is
Apply the mechanics of a transformation that makes implicit behavior explicit
M1-1Essence of Dispatch: Taking Pharo Booleans as ExampleSlidesVideo
M1-2Essence of Dispatch: Let the receiver decideSlidesVideo
M1-6Reification and delegation - A case study: Microdown in PillarSlidesVideo
Module 2Tests
This module covers an important aspect: testing applications and how to take advantage of test driven design. It shows in particular the power of eXtreme Test Driven Design and how writing tests first and coding in the debugger is empowering the designer.
Teaching objectives (5)
Understand the structure and benefits of a test and specify a proper automated test
Identify the benefits and characteristics of a good test suite
Identify the benefits and apply a Test Driven Development workflow
Specify and apply the Xtrem Test Driven Development method with Pharo tools
Create a parameterized test and reuse it with specific values
M2-1Test 101: The minimum you should knowSlidesVideo
M2-4Xtreme Test Driven Development: Getting a productivity boostSlidesVideo
M2-5Parametrized Tests: Getting more tests out of test casesSlidesVideo
Module 3Hooks
In this module we will start to look at design patterns. In parallel, we will discuss a key point of object-oriented design which is how to design abstractions that are extensible using hooks. The case study is about going from monolithic to parametrized objects.
Teaching objectives (5)
Get exposed to design patterns
Use hooks to extend code
Analyze hook and template methods
Use a stream and avoid creating spurious objects
Move from a monolithic global design to one that can be parameterized
In this module we will focus on basic principle showing for example the difference between data and objects. We will start also to present some design patterns such as Singleton and Decorator.
Teaching objectives (6)
Rethink object API
Distinguish between an object and a data structure
Identify the different syntactic forms of global variables
Identify the disadvantages of fat classes and replace them with class hierarchies and delegation
Implement the Singleton pattern, with its advantages and disadvantages
Apply the Decorator design pattern and identify when to use it
M4-1Methods: the elementary unit of reuseSlidesVideo
M4-2Objects vs. Data - An API perspective studying the class PointSlidesVideo
In this module we will present some important and simple design patterns such as composite or state. We will then propose to compare use versus inheritance a way to understand the forces in presence.
Teaching objectives (9)
Understand the Composite design pattern and identify when to use it
Use the State design pattern to design objects with many states, complex transitions between states and operations that depend on each state
Understand the Command design pattern and identify when to use it
Use a design pattern in the real world
Compare inheritance-based and delegation-based designs
Identify the benefits of using objects to represent complex algos
Recognize when it is preferable to use objects rather than lexical closures
Identify the use of NullObject design pattern and the benefit of object state initialization
Manage methods with a large number of arguments and design fluid APIs
M5-1Composite: a Nice and Common Design PatternSlidesVideo
Free online resources are on the Pharo documentation page.
We recommend the updated Pharo by Example, the Pharo cheat sheet, and Learning Object-Oriented
Programming, Design and TDD with Pharo on books.pharo.org.
The authors
Stéphane Ducasse
Stéphane Ducasse is directeur de recherche at Inria. He leads the RMoD team. He is expert in two domains: object-oriented language design and reengineering. His works on traits have been introduced in AmbientTalk, Slate, Pharo, Perl-6, PHP 5.4 and Squeak. They have also influenced JavaScript, Scala and Fortress. Stéphane is also expert on software quality, program understanding, program visualisations, reengineering and metamodeling. He is one of the developers of Pharo. He is also one of the developers of Moose, an open-source software analysis platform. He created Synectique a company building dedicated tools for advanced software analysis. Stéphane wrote several books on programming learning and other topics such as web programming.
Luc Fabresse
Luc Fabresse is currently professor in computer science at IMT Nord Europe. His researches focus on dynamic and reflective languages such as Pharo to better support programming in the context of mobile robotics and IoT. It involves deployment, code update, memory management and bootstrapping. He also works on fleet of collaborating mobile robots involving challenges such as: localization, navigation and distributed coordination. Luc's long-term vision is to be able to use Jedi mind trick on mobile robots ;-) Meanwhile, Luc gives many computer science lectures, co-organizes events (technical days, conferences,...), promotes Smalltalk (ESUG board member) and participates to its open-source implementation Pharo.
Guillermo Polito
Guille Polito is a permanent researcher at Inria of the University of Lille, within the EVREF team. Guille’s main research interests are programming language implementations, Virtual machines, testing, programming tools, and modular systems. He has more than 15 years in teaching advanced OOP.
Pablo Tesone
Pablo Tesone is Pharo consortium engineer. He holds a PhD in Computer Science from the University of Lille. Prior to that, Pablo was during 10 years an engineer in large corporates. Pablo has a large spectrum of skills ranging from low-level assembly to high-level reflective systems. He is one of the engineers behind the Pharo Virtual machines. He is the father of stateful traits as available in Pharo. He has more than 15 years in teaching advanced OOP.