Re: JPA and desktop apps
От | Guy Rouillier |
---|---|
Тема | Re: JPA and desktop apps |
Дата | |
Msg-id | 4C4F4313.8090901@burntmail.com обсуждение исходный текст |
Ответ на | Re: JPA and desktop apps (Craig Ringer <craig@postnewspapers.com.au>) |
Ответы |
Re: JPA and desktop apps
|
Список | 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
В списке pgsql-jdbc по дате отправления: