| Article: |
Lisp and Java | |
| Subject: | User | |
| Date: | 2004-03-30 08:30:40 | |
| From: | danmil | |
|
Response to: User
|
||
|
Interesting. What sort of problems? I like this approach because:
|
||
Showing messages 1 through 2 of 2.
-
User
2004-04-01 12:52:54 cpmurphy [View]
Interestingly, the approach described in the article is also used in the Spring framework's JdbcTemplate class: see the . As you'd expect from a framework, there are also higher level abstractions available.
-
User
2004-03-31 02:06:58 alanm1 [View]
Well, I see it as an unwanted intrusion of the ugly jdbc API into application layer. It doesn't eliminate the "JDBC boilerplate", it just splinters it up and puts it in hard to find places.
Maybe it works when well managed, but imagine a class that has:
- some constructors that take ResultSets and some that don't.
- constructors that pass ResultSets around to super classes, 'init' type methods and the constructors of member variables.
- as the kicker, potentially separate try\catch blocks in all those places to which the ResultSet is used.
Worst case scenario? Perhaps, but I've seen it.
Maybe I'm coming across a bit strong, because I really enjoyed the article. But passing around ResultSets in constructors is something I prefer to avoid, often in favour of a big constructor.


