Software design patterns, especially creational design patterns, have been of special interest to the software development community since their systematic formulation in the Gang-of-Four (GoF) publication. However, many factors specifically related to creational patterns, as well as pattern usage in general, have prevented their widespread use. This paper identifies many of these factors. The main subject of the paper is an ontology-driven approach for using creational design patterns, in which all the GoF creational patterns are implemented in an ontology comprising a generic ontology and an ontology manager. The implementation of several patterns is then described, including textual descriptions and unified modeling language (UML) diagrams, followed by a detailed description of the builder pattern, including Java code and a comparison of this ontology-based implementation with a traditional implementation. The two patterns are then compared using the JArchitect tool. The results show that there are fewer dependencies between classes in the ontology-based implementation. The advantages and disadvantages of separating the logic of the design pattern from that of the pattern itself are then discussed and summarized in the conclusion.
展开▼