How kendmaclean/pharo12 works
Project type and purpose
• This is a collection of Pharo v12 Smalltalk example programs and samples. There is no separate “frontend” and “backend”—each .st file is a self-contained sample that you load into the Pharo image to demonstrate core language features, UI patterns (Spec, Morphic), and simple CRUD/domain logic.
File structure
• Top-level files:
• README.md – describes the repo as a set of Pharo 12 code examples
• MyChickenFarm.st
• MySalesApp.st
• MyTaskManager.st
• SimpleInventoryApp.st
• SpecCRUD-Example-UI.st
• SpecCRUD-Example-UI-Composition.st
• No nested directories: each .st script is an independent sample.
• Key technology indicators: Spec (Pharo’s UI framework), possibly Morphic underneath.
README for additional insights
• The README simply declares “pharo 12 smalltalk code examples/sample programs.”
Main components
a. Pharo VM + Pharo Image (runtime & Smalltalk environment)
b. Shared UI frameworks:
– Spec framework
– Morphic graphics (implicitly underneath Spec)
c. Individual sample applications (each loaded as a separate script/class package):
– MyChickenFarm (domain logic: farm, animals, events)
– MySalesApp (domain logic: products, orders)
– MyTaskManager (domain logic: tasks, scheduling)
– SimpleInventoryApp (domain logic: inventory, stock)
– SpecCRUD-Example-UI (basic CRUD UI with Spec)
– SpecCRUD-Example-UI-Composition (composed UI demo with Spec)
d. (Optionally) External resources the samples might load (images, smalltalk libraries)
Relationships and interactions
• All sample applications “plug into” the central Pharo Image at runtime.
• Each sample invokes the Spec framework to render its UI.
• Data flow is in-memory: sample’s domain objects → Spec widgets → user events → domain operations.
• Under the hood, Spec maps to Morphic for actual rendering.
Architectural patterns and design principles
• Each sample follows a simple Model-View approach: domain classes vs. UI classes built with Spec presenters.
• UI Composition uses the Composition pattern in Spec (seen in SpecCRUD-Example-UI-Composition).
• Decoupling of domain logic (model classes) from UI (Spec presenters).
Relevant technologies / libraries
• Pharo v12 VM & Image
• Spec (primary UI framework in Pharo)
• Morphic (Spec’s underlying graphics engine)
• Native Smalltalk class libraries for collections, streams, etc.