wiki:FmgVen/Overview

Project Overview

fmgVen is an alternative to heavyweight ORM tools, where mapping is problematic, and having problems because of lazy loading, etc. It maps java domain objects to database tables without mapping configuration. Data access must be simple and lightweight. The points of fmgVen are;

  • Convention over Configuration
  • Simplicity
  • Lightweight
  • ORM tool should not aim to abstract out SQL knowledge
  • Performance out of the box, without having to tweak anything
  • Typed Criteria API
  • Oldest possible JRE support (1.4, 1.5)

Motivation

I strongly dislike Hibernate (since Hibernate hates Spring). Instead, I mostly prefer to use Spring JDBC Template. However, with JDBC template, if you need to map resulting list to nested objects, you have a problem. I ended up writing similar private mapping methods which maps resultset to nested objects. The queries were similar, too. If there is a way to do these mappings automatically and generate queries automatically, why should I do them by hand? There was fmgVen, the initial version at 2006. It was very nice, still used in some projects. But I moved on to other projects, and abandoned it. It had some limitations such that it required Java 1.5 and could not do many to many mappings, and do not work on Oracle. My new projects didn't had complex db acccess, so I sticked with Spring JDBC Template.

Until now! I realize that fmgVen is good enough not to be abandoned, and I decided to give it another shot. Current motivation is to make it a production ready tool which can be used in new projects.

Literature Review

In the second pass (2010) I did a thorough literature review, in order not to reinvent the wheel, and to gain vision. I searched for similar tools, similar attempts and where would fmgVen stand within those. Here are the similar attempts;

  • Ebean: The closest one to fmgVen. They even have auto-fetch feature which I thought to implement in 2006! Ebean userguide is here. Why fmgVen;
    • fmgVen is aimed to be simpler, having more powerful and type-safe criteria API. Support java 1.4 and convention-over-configuration mapping.
  • JPA: The mostly used ORM solution, hibernate and the like. And their typesafe alternatives;
    • Liquidform: LINQ inspired, typesafe alternative to JPA. Performs some tricks to make it.
    • Querydsl: Typesafe queries for JPA.
    • Quaere: SQL to Java apps. (Linq like)
  • Empiredb: Similar motivations but different approach. Not CoC.
  • LINQ: A very good attempt by MS. Linq to sql would be what we need, but still not CoC.
  • Spring BeanPropertyRowMapper: Similar mapping approach, but that's it, no criteria to joins.
  • ActiveJDBC: inspired by Ruby on Rails ActiveRecord. CoC. Extracts meta data from database. Why fmgVen; Although it has very similar design principles, fmgVen does not infer meta data from database, database queries are inferred from data objects (the opposite). The emphasis is on the java side, and strongly typing.
  • New findings;
    • .NET Entity Framework
    • Active Objects
    • Bean Keeper
Last modified 12 years ago Last modified on Mar 20, 2012, 1:34:13 PM