The Pharo MOOC

WebPortal

Follow this course on the WebPortal!

About this course

If you are either a beginner or an expert in object-oriented programming, this MOOC will change the way you program with objects: come and learn or rediscover object-oriented programming with Pharo! more…

Pharo is a pure object-oriented programming language in the tradition of Smalltalk. It offers a unique developing experience in constant interaction with live objects. Pharo is elegant, fun to use and very powerful. It is very easy to learn and enables to understand advanced concept in a natural way. When programming in Pharo, you are immersed in a world of live objects. You have immediate feedback at any moment of your development on objects representing web applications, code itself, graphics, network…

Pharo is also a very powerful open-source environment used by companies to develop web applications.

In this MOOC, we will present more specifically Pharo’s Web stack which changes the way you build web applications.

In addition we will present fundamental programming concepts and how Pharo uses them. We will present some coding idioms and Design Patterns to better design object-oriented applications. Such concepts can be applied to any object-oriented programming language.

This MOOC is intended for people with a programming experience but everyone motivated could follow the course thanks to the numerous resources proposed. This MOOC will also have an interest for computer programming teachers: Pharo is a good teaching tool for object-oriented programming and the course will discuss object-oriented design principles (e.g. polymorphism, message sending, self/super, design patterns).

Throughout this MOOC you will :

  • learn how to program in Pharo,
  • be immersed in a live environment and live a new programming experience,
  • develop a web application to apply the different aspects of Pharo presented in the course.

This MOOC will also provide a new vision of the fundamental principles of object-oriented programming, i.e. polymorphism and late binding.

This course lasts 7 weeks.

Each week is composed of several sequences containing a video lecture, quizzes and other videos proposing application exercises and programming demonstrations.

This course is proposed in french and in english. Videos are in french with french and english subtitles. Pdf course documents (in english only) will be available. All other materials (quizzes, explanation texts…) will be offered in both languages.

Download Pharo

To get a version of Pharo ready for the MOOC, please follow these steps:

  1. Download and install the Pharo Virtual Machine (VM)
    Only for linux users (tested on Unbutu 16.04):
    sudo dpkg --add-architecture i386
    sudo apt-get update
    sudo apt-get install libx11-6:i386 libgl1-mesa-glx:i386 libfontconfig1:i386 libssl1.0.0:i386
    curl http://get.pharo.org/vm50 | bash
    # you now have a pharo-ui script in the current folder to launch pharo images
  2. Download and unzip the PharoWeb which is a Pharo 5.0 image specifically prepared for the MOOC
  3. Run the PharoWeb image with the Pharo virtual machine:
    • For Windows: drag and drop the image on the virtual machine;
    • For OS X: drag and drop the image ( *.image file) on the virtual machine ( Pharo5.0.app);
    • For Linux and other Unixes: pass the image as parameter to the virtual machine ( ./pharo-ui PharoWeb.image).

Week 1: Welcome on Board and Syntax Discovery

Download the slides, videos and exercises.

  1. Lecture Objectives of this MOOC
  2. Lecture Pharo: an Immersive Object-Oriented System
  3. Lecture Pharo Vision
  4. Lecture Pharo Object Model in a Nutshell
  5. Lecture Pharo Syntax in a Nutshell
  6. Lecture Class and Method Definitions
  7. Live Selecting and executing expressions
  8. Live Learn Pharo with Prof Stef
  9. Live Syntax Highlighting gives Feedback
  10. Live Learn Keyboard Shortcuts
  11. Redo Coding a Counter
  12. Exercise Expressions and Messages
  13. Exercise TinyBlog: Presentation and Model
  14. Challenge Challenge 0 - Retrieve the Pharo logo via Zinc and open it in a Morph

Week 2: Pharo Syntax, Blocks and Inspector

Download the slides, videos and exercises.

  1. Lecture Understanding Messages
  2. Lecture Messages for Java programmer
  3. Lecture Messages: Composition and Precedence
  4. Lecture Understanding Messages: Sequence and Cascade
  5. Live Finding Methods with Finder
  6. Live GTInspector 1: Inspect and Interact with Objects
  7. Lecture Introduction to Blocks
  8. Lecture Loops
  9. Lecture Booleans and Conditions
  10. Lecture Parenthesis vs Square Brackets
  11. Lecture Yourself
  12. Lecture The Essence of Dispatch through an Exercise
  13. Live Nautilus 1: First Meet with the Code Browser
  14. Live Nautilus 2: Packages, Tags and Groups
  15. Live Nautilus 3: Inheritance view
  16. Redo Coding a Counter in the Debugger
  17. Exercise Solution: Expressions and Messages
  18. Exercise Expression Results
  19. Exercise TinyBlog: Extending and Testing the Model
  20. Challenge Solution: Challenge 0
  21. Challenge Challenge 1

Week 3: Design, Class Methods and Collections

Download the slides, videos and exercises.

  1. Lecture Essence of Dispatch: Taking Pharo Booleans as Example
  2. Lecture Essence of Dispatch
  3. Lecture Variables
  4. Lecture A Simple HTTP Application: a Pretext to Revisit Pharo Syntax
  5. Live Nautilus 4: How to Become a Super Pharo Developer: Understanding Sender and Implementors
  6. Live Nautilus 5: Navigating Fast Inside Classes
  7. Lecture Class Methods
  8. Lecture An Overview of Essential Collections
  9. Live Spotter 1: Find and Browse a Class
  10. Live Spotter 2: Filter Results by Category
  11. Lecture Iterators
  12. Lecture Stream Overview
  13. Lecture Understanding Return
  14. Redo Coding a Little Domain Specific Language
  15. Exercise Solution: Expression Results
  16. Exercise Rewriting Expressions
  17. Exercise TinyBlog: A Simple Teapot Web Interface
  18. Challenge Solution: Challenge 1
  19. Challenge Challenge 2

Week 4: Inheritance & Lookup and Web Development

Download the slides, videos and exercises.

  1. Lecture Inheritance Basics
  2. Lecture Inheritance & Lookup: Lookup
  3. Lecture Inheritance & Lookup: Super
  4. Lecture Inheritance & Lookup: DoesNotUnderstand:
  5. Lecture Inheritance & Lookup: Lookup in Metaclasses
  6. Lecture Class Methods at Work
  7. Lecture Overview of Pharo Web Stack
  8. Lecture Seaside: an Innovative Web Application Framework
  9. Lecture Seaside: Rendering Components
  10. Lecture Seaside: a Glance at MetaData and REST
  11. Lecture Voyage: NoSql Object Database
  12. Live How to load code from repository
  13. Live How to load projects
  14. Live Nautilus 6: An overview of Refactorings
  15. Live Nautilus 7: Using the Quality Assistant and Code Critic
  16. Exercise Solution: Rewriting Expressions
  17. Exercise TinyBlog: Data Persitency using Voyage and Mongo
  18. Exercise TinyBlog: Building a Web Interface with Seaside
  19. Exercise Building a Simple Contact Book Application
  20. Challenge Solution: Challenge 2
  21. Challenge Challenge 3

Week 5: Exception, Debugging and Reflection

Download the slides, videos and exercises.

  1. Lecture Seaside: Composing Components
  2. Lecture Really Understanding Class Methods
  3. Lecture Common Errors
  4. Lecture Powerful Exceptions: an Overview
  5. Lecture Debugging in Pharo
  6. Lecture SUnit: Unit Tests in Pharo
  7. Lecture Files in Pharo
  8. Lecture Reflection: Basic Introspection
  9. Lecture Benchmarking in Pharo
  10. Live Spotter 3: Scoping and Reducing Search
  11. Live Spotter 6: Search, Navigate and Preview Files
  12. Live Learning the Debugger
  13. Live How to find a bug?
  14. Live GTInspector 2: Inspect Files and Directories
  15. Exercise TinyBlog: Building an Admin Seaside Web Interface with Magritte
  16. Exercise TinyChat
  17. Challenge Solution: Challenge 3
  18. Challenge Challenge 4

Week 6: Rethink Lookup and Advanced Object-Oriented Design

Download the slides, videos and exercises.

  1. Lecture Did You Really Understand Super?
  2. Lecture Understanding the Implementation of ifTrue:ifFalse:
  3. Lecture Dice new vs. self class new
  4. Lecture Message sends are plans for reuse
  5. Lecture Hooks and Templates
  6. Lecture Runtime Architecture
  7. Lecture Characters, Strings and Symbols
  8. Lecture Dynamic Vs. Literal Arrays
  9. Live Understanding Images and Changes Files
  10. Live Using the Pharo Launcher to manage your Pharo images
  11. Live Diffing and Merging in Pharo
  12. Live GTInspector 4: Build Custom Tab Views for your Objects
  13. Exercise TinyBlog: Deployment (PharoWeb image for deployment which uses Pharo 4)
  14. Challenge Solution: Challenge 4
  15. Challenge Challenge 5

Week 7: More on Object-Oriented Design and Testing

Download the slides, videos and exercises.

  1. Lecture Advanced Points on Classes
  2. Lecture Variable Size Objects
  3. Lecture Understanding Metaclasses
  4. Lecture Reflective Operations for Live Programming
  5. Lecture DoesNotUnderstand: a Precious Hook
  6. Lecture Reflection: Stack as an Object
  7. Lecture Avoid Null Checks
  8. Lecture A Journey in Pharo: A Bright Future
  9. Live Spotter 4: The Preview pane
  10. Live Spotter 5: Search in Playground History
  11. Live GTInspector 3: Understand Pharo Internals by Inspection
  12. Challenge Solution: Challenge 5

Resources

You can find free and online ressources in the Documentation page. We recommend the Updated Pharo by Example book, the Pharo cheat-sheet, …

About

Damien Cassou

Damien Cassou

Damien Cassou received his PhD degree in Computer Science from the University of Bordeaux, France. He is working as associate professor (maître de conférences) at the University of Lille, France, and is a member of the RMoD research group (Inria, CRIStAL). Damien is working on dynamic programming languages (most notably around traits and modules) and software engineering (mainly tools for developers). Damien has co-organized many events (including ECOOP’14 and ESUG many times) and co-wrote several books. Because he loves programming, Damien is also an active member of the Smalltalk and Emacs-Lisp communities. Finally, he maintains many packages for NixOS.

Stéphane Ducasse

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 influencedJavaScript, 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

Luc Fabresse received his PhD in computer science in 2007 from the University of Montpellier 2, France. He is currently an associate professor in the CAR research theme at Mines Douai, Mines-Telecom Institute. Luc is the co-author of several research papers advocating the use of dynamic and reflective languages such as Pharo to support live programming of mobile and autonomous robots in an efficient way. Luc's long-term vision is to be able to use Jedi mind trick on mobile robots ;-) Meanwhile, he concretizes all his ideas (models and tools) in the PhaROS plateform (a Pharo client for the Robotics Operating System) to develop, debug, test, deploy, execute and benchmark robotics applications. Each year, Luc gives many computer science lectures and co-organizes events (technical days, conferences, ...). He also promotes Smalltalk (ESUG board member) and participates to its open-source implementation Pharo.

The Partners