BeanFactory

    Overview

    Tutorial

    Manual

    Examples

    Downloads

    Java Doc ⇒


FormBeanFactory

    Tutorial

    Manual

    Examples

    Downloads

BeanFactory Distribution Home Page

The MyBeans.org BeanFactory provides a persistance package for JavaBeans. It allows instances of a JavaBean class to be easily read from and written to a database. As of this writing, there are two implementations of the BeanFactory: one stores data in a MySQL database and the second stores the data in CSV files. We anticipate ports to other relational databases in the future.

The goal is to strike a better balance between easy-of-use and performance. Specifically, when compared to the Hibernate persistence package, the BeanFactory package is much easier to use:

  • The BeanFactory generates no code
  • The BeanFactory uses no XML configuration file
  • The BeanFactory defines no special query language
We argue that the BeanFactory provides reasonable performance in most cases. Remember the many pithy adages that you are not to prematurely optimize code until you have a demonstrated performance problem. In those rare cases when performance analysis indicates that a specialized SQL query would yield a significant performance increase, we recommend coding only these specific queries directly using JDBC and SQL while leaving the rest of the database accesses more easily written using the BeanFactory.

This BeanFactory was written by Professor Jeffrey Eppinger as a simple course example of an Object-Relation Mapping (ORM) tool for JavaBeans. Over the past several years it has received a lot of use and some features have been added. We feel that for many applications, this simple ORM tool is all that's required. As of this writing, five Carnegie Mellon courses present this BeanFactory to their students as an example of a Object-Relation Mapping (ORM) tool.

Professor Eppinger also uses it for several of his own web application projects. He believes it's a lot easier to use than Hibernate. Nevertheless you may wish to consider using Hibernate as it's an open source implementation and surely has more features and fewer bugs.

To get started, begin reading the five-minute overview, then go on to the thirty-minute tutorial. For detailed questions, refer to the manual, examples, or the Java Doc. To run the software you'll need to download the current jar file from the downloads page.

   
  Copyright © 2005-2010 Jeffrey L. Eppinger. All Rights Reserved.