Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > Re: Non-ORM lay...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 10 Topic 1905 of 2010
Post > Topic >>

Re: Non-ORM layers over JDBC

by craig@[EMAIL PROTECTED] (Craig Ringer) Mar 25, 2008 at 02:40 AM

David Clark wrote:
> If you want JDBC access that is more closely integrated into the
language I 
> would suggest using Groovy.  It REALLY simplifies JDBC access because of

> Groovy's dynamic typing, which is basically the same thing as using
variant 
> data types in C++, at least syntactically.  Groovy's way of executing
JDBC's 
> statements is also much easier to use.  Groovy compiles to Java class
files 
> and the JVM doesn't know the difference.  The groovy runtime/library is
just 
> a jar file that you stick on your classpath.
>   
This app needs to be maintainable by others and rather future-proof, so 
I'm a little leery of Groovy as something that's still a bit "out there" 
in Java land. I suspect that the best option here is plain old JDBC. 
Thankfully the app won't need too much SQL with highly variable WHERE 
clauses etc, so it shouldn't be too bad.

I've just spent some time looking over the website for iBatis, though, 
and I'd be interested in hearing if anybody has any experience with / 
comments about it. It looks closer to what I'm after than hibernate and 
friends do.

http://ibatis.apache.org/overview.html
> ORM for me works really well in OLTP situations.  If I am doing pure
OLTP I 
> rarely need to go outside of my ORM access layer, which is Hibernate.  
> Hibernate's query language (HQL) has lots of features to make writing
SQL 
> queries easier and lots of features to minimize performance problems.
Yep, it seems pretty attractive for that sort of role - but not much use 
for a 2 tier database app.

I'm trying to keep middleware application servers etc out of the picture 
to reduce the number of required components - simplify maintainance and 
administration, reduce dependencies, etc.

If I wasn't taking that approach I'd probably just build it in C++ with Qt
.
> If you have lots of screens where users are basically building up sql
queries, 
> using forms, then Hibernate's query by criteria makes this easy because
you 
> are not longer manually building up SQL (or HQL) queries by hand (which
is 
> really error prone).  All of my complicated search screens use this
feature 
> of Hibernate.
>   
Yep, I truly detest the "Hmm, do I need an AND here" comma-and-keyword 
juggling sort of low level syntax fiddling that's required for building 
up SQL queries programatically. The query languages offered by things 
like Hibernate look nice for that,  but Hibernate its self seems to be 
designed for use with middleware servers to the detriment of most other 
things. I haven't found much good said about its use in "direct" 
database apps, though it's clearly great for use in an appserver.

I've also found it more difficult than I thought to plug Hibernate 
queries directly into Swing for use as a data model, providing efficient 
database fetching etc. Then again, my Java is rather limited as is my 
Swing experience, so I might just be doing it wrong.

--
Craig Ringer

-
Sent via pgsql-jdbc mailing list (pgsql-jdbc@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
 




 10 Posts in Topic:
Non-ORM layers over JDBC
craig@[EMAIL PROTECTED]   2008-03-24 14:45:05 
Re: Non-ORM layers over JDBC
davidclark@[EMAIL PROTECT  2008-03-24 09:53:11 
Re: Non-ORM layers over JDBC
craig@[EMAIL PROTECTED]   2008-03-25 02:40:55 
Re: Non-ORM layers over JDBC
pg@[EMAIL PROTECTED] (Da  2008-03-24 22:18:59 
Re: Non-ORM layers over JDBC
Stephen.Denne@[EMAIL PROT  2008-03-25 09:57:24 
Re: Non-ORM layers over JDBC
craig@[EMAIL PROTECTED]   2008-03-25 10:01:26 
Re: Non-ORM layers over JDBC
petite.abeille@[EMAIL PRO  2008-03-26 20:28:12 
Re: Non-ORM layers over JDBC
halset@[EMAIL PROTECTED]   2008-03-26 11:21:45 
Re: Non-ORM layers over JDBC
petite.abeille@[EMAIL PRO  2008-03-26 20:48:10 
Re: Non-ORM layers over JDBC
mark.lewis@[EMAIL PROTECT  2008-03-26 08:15:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 20 8:27:13 CDT 2008.