As computing power increases, the number and variations of software applications built seem to have no end in sight. For a very large percentage of object-oriented applications, there is a constant need to store and retrieve application data. Without a doubt, the most popular storage mechanism is a relational database. However, the applications have to deal with the problem that arises due to the fact that objects (in the object-oriented world) are conceptually different in their structure and semantics from relational databases. In order to save objects in relational databases, there must be a mapping between the two domains. This mapping is often not natural and is described as the impedance mismatch (Ambler, 2002). The fundamental problem between the object-oriented world and the relational databases as the storage mechanism used is often referred to as the impedance mismatch. The object-oriented paradigm is based on proven software engineering principles, whereas the relational paradigm is based on proven mathematical principles. Because the underlying paradigms are different, the two technologies do not work together seamlessly (Ambler, 2002, 2000). To address this problem, a persistence framework is introduced to seamlessly provide the necessary mapping between the two worlds or paradigms.
There are a number of persistence frameworks available in the industry and academia to bridge the gap between object-oriented applications and relational database management systems (RDBMs). However, these frameworks are usually targeted to handle storage into relational databases and have little or no support for other persistence types, such as object-oriented databases and XML files. In addition, working with a persistence framework is rarely simple as it requires fairly complicated configuration to be done by the application developer before being able to use it.
The persistence framework described in this paper has the following goals:
* Provide transparent persistence (little or no intrusion into the application code).
* Support multiple persistence mechanism types, including relational databases, object-oriented databases and XML files.
* Be simple to use with little configuration required.
This paper describes the architecture and design of a transparent persistence framework called PersistF (Persistence Framework). PersistF addresses the inherent complexity of using a persistence framework by minimizing the required configuration that needs to be done by the application developer. In addition, if at all needed, it has a very minimal intrusion of its own code into the target application code, therefore being transparent to the developer. Finally, the system supports multiple persistence mechanism types, including relational databases, object-oriented databases and XML files for storage. In this paper, we focus on the application of software design patterns in the architecture of PersistF.
The remainder of this paper is organized as follows. Section 2 presents a brief overview of the major persistence frameworks currently available. Section 3 describes the features of PersistF. Section 4 describes the architecture and design of the framework as well as the application of design patterns in its implementation. In Section 5 some experiences in using the framework to build a web-based application are presented. Lastly, Section 6 summarizes our work and provides an outline for future work.
The issue of object storage is a highly debated one. There are quite a number of research projects and commercial tools available in the market and on the Internet. A brief overview of the most popular tools is presented below. The list, however, is not an exhaustive one.
JDO--Java Data Objects
The Java Data Objects (JDO) (Russell, 2003) API is a Java model's standard interface-based abstraction of persistence. …