Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #6108
| From | Arved Sandstrom <asandstrom3minus1@eastlink.ca> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Spring/hibernate and JDBC |
| References | <3c16e5e7-3c0b-4126-9dd9-88f372a58f03@e26g2000prf.googlegroups.com> <ivamk9$dph$1@dont-email.me> <a8ce2398-e1f7-4dfd-966e-48e8daa03416@p10g2000prf.googlegroups.com> <a82cc215-f2a4-4366-8e4d-e5f4ed5a70b2@t38g2000prj.googlegroups.com> <a029a3e5-83e9-4929-8fa4-5579972b4ce7@h25g2000prf.googlegroups.com> |
| Message-ID | <fYUSp.12822$Kd6.5147@newsfe05.iad> (permalink) |
| Organization | Public Usenet Newsgroup Access |
| Date | 2011-07-12 07:01 -0300 |
On 11-07-11 08:39 PM, Jack wrote: > On Jul 11, 11:25 am, lewbloch <lewbl...@gmail.com> wrote: [ SNIP ] >> >> Asking about "efficiency" for use of JPA vs. JDBC calls is like asking >> if it's more efficient to use an automobile than a bicycle. The use >> cases differ, so where one is more appropriate the other is less so, >> and "efficiency" has little to nothing to do with it. That is to say, >> "efficiency with respect to what?" is your real question. >> >> So, efficiency with respect to what? > > Certainly using spring/hibernate has a shorter development circle than > JDBC and the code is easier to maintain. You can probably find a tutorial/example scenario, or a specific toy application, that fosters the impression that Spring+Hibernate has a shorter development cycle than JDBC, and is easier to maintain. In general it's my belief that the opposite is true, and that's with Hibernate (or EclipseLink) only, not even including Spring. The use of Spring substantially adds to the maintenance burden of an application; I'll leave off discussing it because I don't know why anyone wants to use it these days. A fair comparison of JDBC versus JPA has to assume that competent developers are applying best practices to both. In either case a data access layer (DAL) will contain the persistence code; the rest of the application simply sees domain objects and uses "repository" methods to do things with them. As much thought and effort goes into deciding what domain classes will be exposed to the rest of an app by a JPA-based DAL as for a JDBC-based DAL. Of course you might be thinking of not using a DAL at all, and using JPA directly in every layer. That's a prescription for maintenance problems straight off. I recommend against it...although I think I might be a voice in the wilderness on this point. JPA is _not_ easier to use than JDBC. It may often be less _laborious_ to use, but that's for one-time only coding anyway. But JPA as an API that has to be understood well is not easier than JDBC. This goes directly to the maintenance argument. > Here for efficiency, I mean performance. For a server with frequent > and large amount of database accesses(insert/delete/update), which way > has a better performance? Neither, or both. In all cases that type of performance depends on the instructions sent to the DB, and generally speaking both JDBC and JPA can issue the same instructions. That type of performance depends on the competence of your developers. AHS
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Spring/hibernate and JDBC Jack <junw2000@gmail.com> - 2011-07-09 14:56 -0700
Re: Spring/hibernate and JDBC markspace <-@.> - 2011-07-09 16:01 -0700
Re: Spring/hibernate and JDBC Jack <junw2000@gmail.com> - 2011-07-09 17:29 -0700
Re: Spring/hibernate and JDBC Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 17:55 -0400
Re: Spring/hibernate and JDBC Jack <junw2000@gmail.com> - 2011-07-09 17:32 -0700
Re: Spring/hibernate and JDBC Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-07-10 08:27 -0300
Re: Spring/hibernate and JDBC Aéris <aeris@imirhil.fr> - 2011-07-10 13:33 +0200
Re: Spring/hibernate and JDBC lewbloch <lewbloch@gmail.com> - 2011-07-11 11:25 -0700
Re: Spring/hibernate and JDBC Aéris <aeris@imirhil.fr> - 2011-07-11 20:44 +0200
Re: Spring/hibernate and JDBC Jack <junw2000@gmail.com> - 2011-07-11 16:39 -0700
Re: Spring/hibernate and JDBC lewbloch <lewbloch@gmail.com> - 2011-07-11 17:06 -0700
Re: Spring/hibernate and JDBC Gene Wirchenko <genew@ocis.net> - 2011-07-11 21:37 -0700
Re: Spring/hibernate and JDBC Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-07-12 07:01 -0300
Re: Spring/hibernate and JDBC Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 18:00 -0400
Re: Spring/hibernate and JDBC Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 17:58 -0400
Re: Spring/hibernate and JDBC Tom Anderson <twic@urchin.earth.li> - 2011-07-22 17:24 +0100
Re: Spring/hibernate and JDBC Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 17:52 -0400
Re: Spring/hibernate and JDBC Tom Anderson <twic@urchin.earth.li> - 2011-07-10 13:34 +0100
Re: Spring/hibernate and JDBC Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-07-10 11:08 -0300
Re: Spring/hibernate and JDBC Stanimir Stamenkov <s7an10@netscape.net> - 2011-07-10 17:45 +0300
Re: Spring/hibernate and JDBC Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-07-10 17:35 -0300
Re: Spring/hibernate and JDBC Steve Sobol <sjsobol@JustThe.net> - 2011-07-10 09:42 -0700
Re: Spring/hibernate and JDBC Tom <tom400f@gmail.com> - 2011-07-10 22:29 +0000
Re: Spring/hibernate and JDBC Gunter Herrmann <notformail0106@earthlink.net> - 2011-07-11 10:19 -0400
Re: Spring/hibernate and JDBC Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 18:09 -0400
Re: Spring/hibernate and JDBC Aéris <aeris@imirhil.fr> - 2011-07-10 13:24 +0200
Re: Spring/hibernate and JDBC Elegie <elegie@anonymous.invalid> - 2011-07-10 13:56 +0200
Re: Spring/hibernate and JDBC Aéris <aeris@imirhil.fr> - 2011-07-10 14:17 +0200
Re: Spring/hibernate and JDBC Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-07-10 10:44 -0300
Re: Spring/hibernate and JDBC Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2011-07-11 09:52 +0300
Re: Spring/hibernate and JDBC lewbloch <lewbloch@gmail.com> - 2011-07-11 11:31 -0700
Re: Derby and Java SE (was: Spring/hibernate and JDBC) lewbloch <lewbloch@gmail.com> - 2011-07-11 15:46 -0700
Re: Spring/hibernate and JDBC iadb <freeinternetarticles@gmail.com> - 2011-07-17 10:17 -0700
Re: Spring/hibernate and JDBC Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 17:47 -0400
Re: Spring/hibernate and JDBC Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 18:02 -0400
csiph-web