pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guy Rouillier <guyr-ml1@burntmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: JPA and desktop apps
Date: Tue, 27 Jul 2010 16:35:31 -0400
Message-ID: <4C4F4313.8090901@burntmail.com> (raw)
In-Reply-To: <4C4E832B.20101@postnewspapers.com.au>
References: <4C47B5F7.4050303@postnewspapers.com.au>
	<i2c31v$elh$1@news.albasani.net>
	<4C4E832B.20101@postnewspapers.com.au>

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



view thread (14+ messages)  latest in thread

Message-ID: <4C4F4313.8090901@burntmail.com>
Permalink:  ../4C4F4313.8090901@burntmail.com/
Also on:    postgresql.org/message-id/4C4F4313.8090901@burntmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: guyr-ml1@burntmail.com
  Subject: Re: JPA and desktop apps
  In-Reply-To: <4C4F4313.8090901@burntmail.com>
  References: <4C47B5F7.4050303@postnewspapers.com.au> <i2c31v$elh$1@news.albasani.net> <4C4E832B.20101@postnewspapers.com.au> <4C4F4313.8090901@burntmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox