A Rudimentary Activity Planning example with MVC.
With and without DCI
This example is a very rudimentary activity planning application that demonstrates the use of MVC and DCI in combination. There is no user data input; the example network is hard coded.
Two versions of this application will be discussed here. The versions are opened in Squeak from the World Menu>open>BB4xPlan, where x is a or b.
- BB4aPlan: A conventional application without DCI.
- BB4bPlan: The application coded with DCI.
Both versions are identical from the user’s point of view. Both open a window with two Views as shown in the figure below. The top view is a dependency graph that shows the activities with their technological dependencies. The duration of each activity is given in parenthesis after the activity name. The bottom view shows a Gantt diagram with the frontloaded activities laid out along the time axis.
Three operations are realized as menu operations:
- build demo network: Build the demo activity network and display it as a dependency graph.
- frontload from week 1: Frontloading is to compute the earliest start for all activities. An activity can start when all its predecessors are finished.
- reset demo: Remove the current network.
The code can be read and run in BabyIDE. Informally, the code can be read at
BB4aPlan (no DCI):
reader-friendly code
printer-friendly codeBB4bPlan (DCI version)
reader-friendly code
printer-friendly code
There is a toggle for choosing between the versions at the top of the documents.