Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #14140
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Apache JDBC utils |
| Date | 2012-05-02 11:16 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <17910424.2120.1335982613195.JavaMail.geo-discussion-forums@pbcoq1> (permalink) |
| References | <jnn1pc$33c$1@dont-email.me> <3265763.6.1335834184189.JavaMail.geo-discussion-forums@pbph1> <jnnhmf$kd2$1@dont-email.me> <hzRnr.32$go4.1@newsfe14.iad> <jnp15c$uni$1@dont-email.me> |
On Tuesday, May 1, 2012 8:57:28 AM UTC-7, markspace wrote: > On 5/1/2012 6:29 AM, Arved Sandstrom wrote: > > > On 12-04-30 11:27 PM, markspace wrote: > >> If the authors of the projects say it's not ORM, I'll choose to believe > >> them. > > > To an extent I'm happy to go with what authors say also. More precisely > > DBUtils *is* an ORM - just look at the available ResultSetHandler > > > Right-o. I knew what Lew meant, but I still found his statement to be > inaccurate. It was clearly an exaggeration to say that dbutils is an > ORM just like JPA or Hibernate. JPA and dbutils are practically on I didn't say "just like JPA or Hibernate". Nor did the OP. > different planets. They solve a similar problem, but they take very > different approaches. > > > > I prefer to differentiate between basic OR mappers like DBUtils that do > > > This is good, I like the term "mapper" here instead of ORM. Data Mapper > is a design pattern. Specifically it's a lighter-weight one that DAO, > so it's a good fit to what dbutils is trying to accomplish. The "M" in "ORM" stands for "mapping" or "mapper". > <http://martinfowler.com/eaaCatalog/dataMapper.html> > <http://rrees.wordpress.com/2009/07/11/the-dao-anti-patterns/> By "monolithic" I mean, in the case of JPA, creating one data-access layer which sits between all object code and all DB access. Using a single 'EntityManager' to handle many things for a long time is monolithic, and causes persistence sessions to fill and get slow. Funneling everything through a single data-access construct suffers from the "God object" complex. "Non-monolithic" means, for example, a separate data-access class for each module that needs access. So your "FooOrder" module will have a data-access object with its own 'EntityManager', "BazHistoryMarker" will have another, and so on. This makes data access easier to reason about and to troubleshoot. It also obviates various run-time problems. As for "lightweight", I have only heard, "not many API calls" as a metric. How does dbutil rate as lighter than JPA by that metric? Even the short snippet posted here of dbutil code looks messier and harder to set up than JPA. JPA is the first ORM (sorry, folks, dbutil is an ORM) I've found worth using. I avoid Hibernate's JPA because it's too easy to slip into pre-JPA idioms with it, which in my view ruin its utility when you do. JPA has shown itself the leanest (in terms of programmer effort) and slickest way to handle its intended use cases (e.g., not bulk inserts) of anything I've tried. Unless it's abused horribly, which I've also seen. But the abusers of JPA are no better with JDBC, other Java idioms, and I predict nor with dbutils. -- Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Apache JDBC utils markspace <-@.> - 2012-04-30 14:55 -0700
Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-30 20:56 -0300
Re: Apache JDBC utils markspace <-@.> - 2012-04-30 17:50 -0700
Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-04-30 18:03 -0700
Re: Apache JDBC utils markspace <-@.> - 2012-04-30 19:27 -0700
Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-01 10:29 -0300
Re: Apache JDBC utils markspace <-@.> - 2012-05-01 08:57 -0700
Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 11:16 -0700
Re: Apache JDBC utils markspace <-@.> - 2012-05-03 07:51 -0700
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-01 19:22 -0400
Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-01 10:32 -0700
Re: Apache JDBC utils markspace <-@.> - 2012-05-01 11:22 -0700
Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-01 15:26 -0700
Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-01 19:44 -0300
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-01 19:26 -0400
Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-01 21:14 -0300
Re: Apache JDBC utils Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-01 22:22 -0500
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 13:52 -0400
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 13:51 -0400
Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-03 17:11 -0300
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 16:58 -0400
Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-03 18:25 -0300
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 19:55 -0400
Re: Apache JDBC utils Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-01 22:08 -0500
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 13:55 -0400
Re: Apache JDBC utils Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-03 13:44 -0500
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 15:06 -0400
Re: Apache JDBC utils "John B. Matthews" <nospam@nospam.invalid> - 2012-05-01 23:37 -0400
Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-02 07:37 -0300
Re: Apache JDBC utils "John B. Matthews" <nospam@nospam.invalid> - 2012-05-02 18:51 -0400
Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-02 12:22 +0200
Re: Apache JDBC utils markspace <-@.> - 2012-05-02 08:29 -0700
Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-02 22:02 +0200
Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 14:22 -0700
Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-02 18:53 -0300
Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:03 +0200
Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:14 +0200
Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:27 +0200
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 14:03 -0400
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-02 18:58 -0400
Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 16:18 -0700
Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-02 15:25 -0700
Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:59 +0200
Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 14:05 -0400
Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 16:24 -0700
Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-02 16:35 -0700
Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 01:46 +0200
Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 01:49 +0200
csiph-web