Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

spring JDBC OO fashion




I was reading folowing lines and I did not understand clearly.

writing JDBC code in a much
cleaner fashion. But the code was still tightly coupled to SQL. This is not necessarily
a bad thing. But what if we want to write JDBC code in a more OO fashion?
Spring provides a way to actually model database operations as objects. This adds
another layer of insulation between your code and straight JDBC.
Spring provides classes for both reading and writing data. As we work through
some examples of these, there are a couple of things you should know. First, these
database operation objects are thread-safe, meaning you need to create only one
instance per database operation. Second, any database operation object must be
compiled before being used. This lets the object know when to prepare the statement
so that it can be executed later. Not surprisingly, you compile a database operation
object by calling the compile() method. We will demonstrate this practice in
To start off, let’s see how we would create an object to write data to
the database.

Any ideas, resources,sample code,links, highly appreciated. thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Sathish David  Kumar N
Sathish David Kumar N
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial