Original article by: Daniel Duffy
The challenges in creating computer graphics applications for a variety of different classes of users are quite numerous. The author discusses the desire to make dynamic changes to the functionality of the program, to easily customize it for both high-end and low-end users.
Other problems include the ability to add new geometric objects to a graphics program without having to change their classes, and to include different types of algroithms that can be interchangably applied to objects at runtime. The author also discusses a desire to be able to define recursive aggregate objects.
The author suggests that the Decorator pattern could be use to dynamically add and remove functionaliy from objects within the program. The program would, by default, contain only a very minimal amount of functionality, and Decorators would be added to key objects in the program if the user required (or purchased) additional functionality.
The article suggests that the ability to run arbitrary algorithms on graphics objects at runtime could be handled by the Visitor pattern. Each graphical object would contain the necessary methods to allow the visitor to work on it, and there would exist vistor methods to perform all of the required algorithms.
The problem of creating aggregate objects can be naturally solved using the Composite pattern. Each composite object would be made up of either leaf objects or other composite objects.
None posed.