BabyIDE examples


Selected program code for seven Squeak/DCI examples has been printed out as .HTML files for your convenience. Each example is in two forms: A readable file with table of contents in the margin and a printable file.

BB2Shapes - An animation of a universe of interacting objects

BB3Greed - A clumsy implementation of the game of Greed.

BB4Plan - A rudimentary program for activity network planning.
Two versions: BB4aPlan is implemented without DCI. BB4bPlan implemented with DCI.
The example illustrates one way of using DCI to support MVC.

BB5Bank - The well known Bank transfer example
Illustrates A simple Context with two interacting Roles.

BB6PayBills - Uses the above to pay a list of bills.
Illustrates that a Context can be instantiated and triggered from a RoleMethod.

BB7Dijkstra - Implements a restricted form of the Dijkstra algorithm for finding the shortest route through a graph.
Illustrates recursion and different Roles being bound to the same object in the same execution. Builds on Jim Coplien's implementation of the same algorithm.

BB8MoveShape - Consider a Draw program such as the PowerPoint slide editor. A user can create and place different shapes such as ovals, polygons, and lines. A Connector is a special line that runs from one shape to another. The line will always connect the two shapes even if the shapes move. This program implements the shape:move: operation. Two versions: BB8MoveShape that is restricted to a single Connector, and BB8bMoveShape that handles normal drawings with any number of Connetors.

BB9Planning (aka Prokon) An extended planning example that illustrates the combination of DCI and MVC.

BBa11PP Ellen's smart alarm clock that wakes her only if the weather forecast promises a dry day.