Re: JPA and desktop apps

From: Guy Rouillier <guyr-ml1(at)burntmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JPA and desktop apps
Date: 2010-07-27 20:35:31
Message-ID: 4C4F4313.8090901@burntmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 7/27/2010 2:56 AM, Craig Ringer wrote:

> This is what I'm talking about. Of course you can do it, it just sucks
> in terms of productivity. JPA, Hibernate etc can be used on the desktop
> in client apps, they're just (IMO) highly overrated. Most people who try
> to use them only seem to discover how many problems they leave to the
> programmer rather late in the process.

Agreed. We used JPA on one good-sized (but not large) internal
application. The amount of hand-holding it needed and the amount of
bulk it added to that app prompted us look at other solutions for a
rewrite of our customer portal.

Our team is proficient in SQL and JDBC, so we wanted something that
would take care of all the routine housekeeping but would not be as
bloated as JPA or Hibernate. We settled on MyBatis
(http://www.mybatis.org/) formerly iBATIS. This is a very light
framework; you write your own SQL using either an external XML file or
annotations, and it maps results to your Java objects and does all the
routine housekeeping like opening and closing connections, statements
and resultsets. It has an optional Java class generator for producing
classes from database tables.

Given our skill set, MyBatis is a much more livable solution than JPA.
Given the huge amount of bloat in JPA, it doesn't seem to make sense for
individual applications. If you have the luxury of starting from
scratch and building an enterprise model, then perhaps JPA would be a
good fit.

--
Guy Rouillier

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Guy Rouillier 2010-07-27 20:57:38 Re: JPA and desktop apps
Previous Message dmp 2010-07-27 16:44:51 Re: help