Java Reference
In-Depth Information
a shrink-wrapped product for which you have full design control, then you might
be in this situation.
When you have full control, you have a good reason to use a full object/
relational mapping solution such as Hibernate. You can fully leverage the design
benefits and productivity gains that an object relational mapper can provide.
There will probably not be any interference from an enterprise database group,
or a legacy system to integrate with. Furthermore, the database is probably
deployed with the application, which places this into the category of an
application database (see chapter 1). A good example of a packaged application
that uses Hibernate is JIRA from Atlassian. They supply their issue-tracking
software as a shrink-wrapped product over which they have full control.
It's important to consider where the application will be in the future, though.
If there is any chance that the database could fall out of the control of the
application developers, then you might want to carefully consider the impacts that
could have on your persistence strategy.
When your application requires fully dynamic SQL
If the core functionality of your application is the dynamic generation of SQL , then
i BATIS is the wrong choice. i BATIS supports very powerful dynamic SQL features that
in turn support advanced query capability and even some dynamic update
functions. However, if every statement in your system is dynamically generated, then
you're better off sticking with raw JDBC and possibly building your own framework.
Much of the power of i BATIS is that it allows you complete freedom to
manually write and manipulate SQL directly. This advantage is quickly lost when
the majority of your SQL is built dynamically from some SQL generator class.
When you're not using a relational database
There are JDBC drivers available for more than relational databases. There are
JDBC drivers for flat files, Microsoft Excel spreadsheets, XML , and other types of
data stores. Although some people have been successful using such drivers with
i BATIS , we don't recommend them for the majority of users.
i BATIS doesn't make many assumptions about your environment. But it does
expect that you're using a real relational database that supports transactions and
relatively typical SQL and stored procedure semantics. Even some well-known
databases don't support very key features of a relational database. Early versions
of My SQL did not support transactions, and therefore i BATIS did not work well
with it. Luckily today My SQL does support transactions and has a fairly compliant
JDBC driver.
Search WWH ::

Custom Search