by Tim McCormack
Design pattern for interactive applications.
Sample: Calculator.java, from http://www.sourcecodesworld.com/source/show.asp?ScriptID=1085
private MenuItem fmi1, fmi2, fmi3;
private Button num0, num1, num2, num3, num4, num5, num6;
fmi1 = new MenuItem(" Copy ");
fmi2 = new MenuItem(" Paste ");
fmi3 = new MenuItem(" Quit ");
num0 = new Button("0");
num1 = new Button("1");
num2 = new Button("2");
num3 = new Button("3");
EditMenu.add(fmi1);
EditMenu.add(fmi2);
EditMenu.addSeparator();
EditMenu.add(fmi3);
f.setLayout(new GridLayout(6, 1));
f.setResizable(false);
f.setSize(300, 250);
f.add(tField);
f.add(p2);
f.add(p3);
Fully half of the code was "architectural".
A language may serve in multiple roles.
This presentation is a proof of concept. (View source...)