In section Design a GUI application we presented a fundamental design pattern of GUI application. 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 to read for any serious application development. Design patterns help to develop code easier to maintain; there are a common ground easing mutual understanding.
In the following sections we present several of these patterns with concrete use cases in application 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 platform |