Dec 13, 2008

Floggy: Brazilian Technology in Data Persistence

Hi all,

A short time ago, I was browsing a magazine called "Java Magazine", which I use to contribute with some articles about Java ME, and one of the articles mentioned a data persistence framework on suggested links section. I got curious and decided to take a look at it, in order to see its proposal.

The framework's name is Floggy. It is a free object persistence framework for J2ME/MIDP applications. The main goal is to abstract the data persistence details from the developer, reducing the development and maintenance effort. Roughly, it avoids that developers having to write thousands of code lines to handle with byte arrays by writing/reading data (ie. primitives and objects) on record stores.

The developer's work is just defining the bean classes that represent his application model and pass it to the PersistableManager class. This classe in turn provide methods for saving, editing, deleting and finding information. See below a code snippet showing how a given information is persisted.

Person p = new Person();
p.setName(...);
p.setBirthday(...);
p.setGender(...);
p.setPhones(...);

try {
int id = PersistableManager.getInstance().save(p);

} catch (FloggyException e) {
}


I particularly have not tested Floggy yet, so I can't opine whether the performance, one of the main requirements for a persistence framework, is good or not. What I can say is Floggy's proposal is good. It is worth by avoiding that tiresome work of handling byte arrays when working with record store.

For further information about Floggy, access here the framework's website. By the way, if you have already worked with Floggy, be my guest to comment on it.

See you in the next post...

No comments: