In section Design a GUI Application, we presented a fundamental design pattern for GUI applications. As the development of your GUI application progresses and grows in complexity, you may want to use additional design patterns. The book Design Patterns Smalltalk Companion is a must-read for any serious application developer. Design patterns help to develop code that is easier to maintain; they provide a common ground, easing mutual understanding.
In the following sections, we present several of these patterns with concrete use cases in applications developed with the Cuis-Smalltalk system.
• Command: | Manage undo and redo operations | |
• Flyweight: | Factory to create or retrieve objects | |
• Builder: | Build object according to user given input | |
• Template Method: | Generalize a building process then specialize | |
• State: | Manage GUI tools and tool states | |
• Bridge: | Output a GUI representation to a file | |
• Strategy: | Adapt to various host platforms |