ArchShell Example
ArchShell Example
The following example illustrates the commands used to construct a simple Stack visualization. The graphical depiction of the architecture is presented on the right.
StackArch> new component ClassName: c2.comp.StackADT Name: StackADT StackArch> new component ClassName: c2.comp.StackArtist Name: StackArtist StackArch> new component ClassName: c2.comp.graphics.GraphicsBinding Name: GraphicsBinding StackArch> new connector ClassName: c2.framework.ConnectorThread Name: MainBus StackArch> new connector ClassName: c2.framework.ConnectorThread Name: BindingBus StackArch> weld Top entity: StackADT Bottom entity: MainBus StackArch> weld Top entity: MainBus Bottom entity: StackArtist StackArch> weld Top entity: StackArtist Bottom entity: BindingBus StackArch> weld Top entity: BindingBus Bottom entity: GraphicsBinding StackArch> start Entity: StackArchNotice that the last command, start, initiates execution of the architecture. To demonstrate the runtime architecture modification, we add the StackPieArtist component to the running application. The graphical depiction of the architecture is presented on the right.
StackArch> new component ClassName: c2.comp.StackPieArtist Name: StackPieArtist StackArch> weld Top entity: MainBus Bottom entity: StackPieArtist StackArch> weld Top entity: StackPieArtist Bottom entity: BindingBus StackArch> start Entity: StackPieArtistThe current syntax for constructing architectures is extremely verbose. Future versions of ArchShell will also support a more compact textual syntax along with a graphical notation.