Design patterns have proven to be important building blocks and means of reuse in software design. However, the mere number of available design patterns complicates the decision-making which design pattern to choose and demands tools assisting in this process. We hence propose a knowledge-based formal representation of design patterns, a representation that is accessible by tools.
Existing approaches to formalizing design patterns generally cover solely the formal description of the structure of design patterns. However, an important part of a design pattern description is the intent section, because the intent describes what the design pattern does and which design problems a pattern addresses.
In this work, we develop a novel approach of formalizing design patterns by their intent. The formal representation is based on OWL, the web ontology language. The developed ontology can serve as support for the decision-making of choosing the right design pattern. We furthermore develop a tool that uses the ontology as a knowledge-base. The tool allows the user to visually describe design problems and gives suggestions of design patterns that solve a given design problem.
Table of Contents
1 Introduction
2 Related Work
2.1 Classification of Design Patterns
2.2 Ontological and Other Formal Approaches
3 Design Patterns
3.1 The GOF Pattern Catalogue
3.1.1 Abstract Factory
3.1.2 Builder
3.1.3 Factory Method
3.1.4 Prototype
3.1.5 Singleton
3.1.6 Adapter
3.1.7 Bridge
3.1.8 Composite
3.1.9 Decorator
3.1.10 Facade
3.1.11 Flyweight
3.1.12 Proxy
3.1.13 Chain of Responsibility
3.1.14 Command
3.1.15 Interpreter
3.1.16 Iterator
3.1.17 Mediator
3.1.18 Memento
3.1.19 Observer
3.1.20 State
3.1.21 Strategy
3.1.22 Template Method
3.1.23 Visitor
4 Ontologies
4.1 The Web Ontology Language OWL
4.1.1 Classes
4.1.2 Properties
4.1.3 Individuals
4.1.4 The Manchester OWL Syntax
4.2 Other Ontology Languages
4.2.1 RDF and XML
4.2.2 RDFS
4.2.3 DAML+OIL
4.3 Conclusions
5 Ontology Engineering Tools
5.1 Protégé
5.2 Querying and Inference Approaches
5.2.1 SPARQL and the Jena Framework
5.2.2 The Pellet DIG Reasoner
5.2.3 RacerPro
5.2.4 The nRQL Query Language
5.3 Conclusions
6 Developing the DPIO
6.1 Knowledge-Engineering Methodology
6.2 Domain and Scope of the Ontology
6.3 Competency Questions
6.3.1 Meta Questions
6.3.2 Questions in the Domain of Design Patterns
6.4 Initial Vocabulary
6.4.1 Intent Classification
6.5 Modeling the Ontology
6.5.1 Classes
6.5.2 Properties
6.5.3 Instances
6.5.4 Examples of Modeled Design Problems
6.6 Completeness of the Ontology
6.7 Conclusions
7 Evaluation
7.1 Formalization of Competency Questions
7.1.1 Meta Questions
7.1.2 Questions in the Domain of Design Patterns
7.2 Test of the Ontology
7.3 Conclusions
8 The Design Pattern Wizard
8.1 Requirements
8.2 Architecture
8.3 The Wizard User Interface
8.4 Conclusions
9 Conclusions and Future Work
Objectives & Themes
This work addresses the challenge of selecting appropriate design patterns from the vast number of available options by proposing a knowledge-based, formal representation of pattern intents. The primary research goal is to develop a machine-accessible ontology—the Design Pattern Intent Ontology (DPIO)—that enables automated assistance in decision-making, coupled with a prototypical tool, the Design Pattern Wizard, to visually formulate design problems and receive pattern recommendations.
- Formalizing design pattern intent using the Web Ontology Language (OWL).
- Developing a comprehensive taxonomy of design problems and problem concepts.
- Creating an ontology-based tool for visual design problem definition and pattern suggestion.
- Evaluating the ontology's effectiveness using competency questions and the RacerPro reasoner.
- Architecting a robust, extensible software solution for knowledge-based design pattern retrieval.
Excerpt from the Book
3.1.1 Abstract Factory
The intent of Abstract Factory is to “provide an interface for creating families of related or dependent objects without specifying their concrete classes”. Abstract Factory belongs to the group of Creational Patterns. The main focus of the pattern lies in the creation of product families. A typical example is the creation process of different look-and-feel classes for graphical user interfaces (GUI). There, the Abstract Factory interface provides the methods for creating the different theme widgets, and concrete factories are responsible for creating concrete widget classes of a specific theme. Clients are isolated from the product creation process, the responsibility of it is encapsulated in the concrete factory. This makes it easy to exchange complete families of products, by simply exchanging a single concrete factory. On the other hand, it is difficult to add new kind of products, because in this case the interface of the abstract factory has to be changed or extended. Furthermore, all concrete factories that have implemented the Abstract Factory interface have to be altered as well.
Summary of Chapters
1 Introduction: Discusses the motivation for formalizing design patterns to aid decision-making and outlines the thesis goals, including the development of the DPIO and a supporting wizard tool.
2 Related Work: Surveys existing design pattern classification approaches and formal methods, identifying a research gap in intent-based formalization using ontologies.
3 Design Patterns: Provides a summary of the 23 GOF design patterns, focusing on their intent and applicability as the basis for the proposed ontology.
4 Ontologies: Introduces ontology concepts, the OWL language, and discusses the importance of semantic machine-understanding through conceptualization.
5 Ontology Engineering Tools: Evaluates tools like Protégé, reasoners such as Pellet and RacerPro, and query languages like SPARQL and nRQL for ontology development and querying.
6 Developing the Design Pattern Intent Ontology: Details the methodology for creating the DPIO, including domain scope, competency questions, vocabulary, and modeling the ontology in OWL.
7 Evaluation: Tests the DPIO by formalizing competency questions in nRQL and verifying that reasoning results align with the intended logic.
8 The Design Pattern Wizard: Describes the design and architecture of the prototype wizard, a tool that uses the DPIO to help users find suitable design patterns visually.
9 Conclusions and Future Work: Summarizes the contributions of the DPIO approach and suggests potential future improvements, such as supporting more complex queries or integration with UML tools.
Keywords
Design Patterns, Ontology, OWL, Intent, DPIO, Design Problem, Software Engineering, Knowledge Representation, RacerPro, SPARQL, nRQL, Decision Support, Protégé, Formalization, Reusability
Frequently Asked Questions
What is the core focus of this thesis?
This work focuses on the formalization of design pattern intents using ontologies to assist developers in choosing the right design pattern for specific problems.
What are the primary themes covered?
The thesis explores design pattern classification, ontology engineering, semantic web technologies (OWL), and the creation of tools for visual knowledge-based query generation.
What is the main objective or research question?
The goal is to move beyond mere structural descriptions of patterns and develop a knowledge-based representation that captures the intent of design patterns to support the decision-making process.
Which scientific methodology is employed?
The author uses a pragmatic ontology engineering methodology, defining competency questions to test the ontology's scope, iteratively modeling the DPIO, and evaluating it through reasoning and querying.
What topics are discussed in the main body?
The main sections cover existing related work, the specific intent of the 23 GOF design patterns, the fundamentals of ontologies, tools for ontology development, the specific development of the DPIO, and the implementation of a design pattern wizard.
What are the key terms characterizing the work?
Key terms include Design Patterns, OWL, DPIO, Knowledge Representation, and Ontology Engineering.
What is the "Design Pattern Intent Ontology" (DPIO)?
The DPIO is the primary contribution of this work; it is an ontology that captures the intent and applicability of design patterns to allow machines to reason about and suggest patterns based on user-defined design problems.
How does the "Design Pattern Wizard" assist users?
The wizard acts as a visual front-end that translates user-selected design constraints into machine-readable queries, shielding the user from the complexity of ontology query languages like SPARQL.
Why are competency questions used for evaluation?
Competency questions are used to verify if the ontology contains sufficient information to answer typical, domain-relevant questions, ensuring the modeled concepts are fit for their intended purpose.
- Quote paper
- Holger Kampffmeyer (Author), 2007, Formalization of Design Patterns by Means of Ontologies, Munich, GRIN Verlag, https://www.grin.com/document/186288