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 knowledgebased 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 thestructureof design patterns. However, an important part of a design pattern description is theintentsection, 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 and Topics
This thesis aims to address the challenge of selecting appropriate design patterns from an ever-growing catalog by formalizing their intent using an ontology. The primary research goal is to develop the Design Pattern Intent Ontology (DPIO) and a supportive tool that assists developers in identifying the most suitable design pattern for a given software design problem.
- Formal classification of the 23 GoF design patterns based on their intent.
- Development of the Design Pattern Intent Ontology (DPIO) using the Web Ontology Language (OWL).
- Creation of the Design Pattern Wizard, a prototype tool that leverages the ontology to suggest design patterns.
- Implementation of a knowledge-based approach to visual problem definition and automated pattern recommendation.
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 behind formalizing design pattern intents to assist in the complex selection process, highlighting the limitations of narrative text in traditional pattern catalogs.
2 Related Work: Provides a comprehensive overview of existing classification schemes for design patterns and formal approaches to pattern representation.
3 Design Patterns: Summarizes the intent and applicability of the 23 classic GoF design patterns, which serve as the foundation for the developed ontology.
4 Ontologies: Introduces ontology concepts, emphasizing the role of OWL in making domain knowledge machine-understandable.
5 Ontology Engineering Tools: Reviews development environments and query languages, specifically focusing on Protégé, SPARQL, and nRQL for ontology manipulation and inference.
6 Developing the DPIO: Describes the systematic engineering process for building the Design Pattern Intent Ontology, covering methodology, vocabulary, and modeling decisions.
7 Evaluation: Details the formal evaluation of the DPIO by testing it against defined competency questions using the nRQL query language.
8 The Design Pattern Wizard: Presents the architecture and user interface of the prototypical tool that utilizes the DPIO to provide visual pattern suggestions to developers.
9 Conclusions and Future Work: Reflects on the effectiveness of the proposed ontological approach and outlines potential enhancements for future iterations.
Keywords
Design Patterns, Ontology, OWL, DPIO, Design Pattern Wizard, Software Engineering, Knowledge Representation, SPARQL, nRQL, Pattern Selection, Intent Formalization, GoF, Protégé, Ontology Engineering, Reuse
Frequently Asked Questions
What is the core problem addressed in this work?
The thesis addresses the difficulty developers face in selecting the right design pattern from an increasing number of options, as traditional catalogs are optimized for human reading rather than tool-based support.
What are the central thematic fields?
The central fields include software design patterns, ontology engineering, formal knowledge representation, and intelligent tool development for software architecture.
What is the primary research goal?
The goal is to build a "Design Pattern Intent Ontology" (DPIO) that formally describes the intent of design patterns and to develop a wizard tool that helps users select patterns based on their specific design problems.
Which scientific method is employed?
The author uses a knowledge-engineering methodology to build the ontology, incorporating concepts from description logic, OWL, and formal query languages to test the ontology's completeness via competency questions.
What is covered in the main section?
The main sections cover the formalization of pattern intents, the development of the DPIO hierarchy, the evaluation of the ontology, and the architectural implementation of the Design Pattern Wizard.
Which keywords best characterize the work?
Design patterns, ontology, formal representation, pattern selection, and software engineering tools are the central pillars of the research.
How does the ontology handle the n:m relationship between problems and patterns?
The ontology models design problems as separate "containers" of constraints, which are linked to design patterns via the object property "isSolutionTo", allowing a many-to-many mapping.
How is the Design Pattern Wizard integrated into a development workflow?
The wizard acts as a visual front-end that translates user-defined constraints into SPARQL queries, suggesting relevant patterns without requiring the user to have deep knowledge of the underlying ontology query language.
- Quote paper
- Holger Kampffmeyer (Author), 2007, Formalization of Design Patterns by Means of Ontologies, Munich, GRIN Verlag, https://www.grin.com/document/70194