logo       


Re: A few dumb questions: msg#00042

Subject: Re: A few dumb questions
Larry, thanks for the comparison! The possibilty to use dialect
specific sql code with different SQL mappings seems to be most
striking to me :)

Oliver

On Mon, 29 Nov 2004 17:07:16 -0700, Larry Meadors
<larry.meadors@xxxxxxxxxxxxx> wrote:
> >>> oliver.zeigermann@xxxxxxxxx 11/29/04 2:53 PM >>>
> > I see, what is the benefit over using pure SQL, JDBC or something like
> > http://jakarta.apache.org/commons/dbutils/index.html then?
> 
> I have not used dbUtils, but I just took a quick look at the examples
> page:
>  - http://jakarta.apache.org/commons/dbutils/examples.html
> 
> Here are some major differences I see:
> 
>  - The amount of code you have to write is much smaller with iBATIS. For
> example, the ResultSetHandler class that is shown on the dbUtils page is
> really always done for you in the sql maps.
> 
>  - The sql in the first example there is also extracted from your java
> code. Which would you rather read:
> 
> <mapped-statement name="getUnit" result-class="java.util.HashMap"
> cache-model="five-minute">
>     select
>         unt as "unit",
>         dsc as "description"
>     from
>         RMUnt
>     where
>         unt = #unit#
> </mapped-statement>
> 
>  - or -
> 
> String mySQL = "select unt as \"unit\", "
>  + "dsc as \"description\" "
>  + "from RMUnt "
>  + "where unt = ?";
> 
> (...add more code here to move the columns into a map entries, deal with
> caching, deal with empty resultsets, SQL exceptions and so on...)
> 
> Also, because your sql is external to your java code, you can use
> dialect specific sql very easily (by using a properties file to specify
> the path to the sql maps).
> 
> Larry
> 
>



Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe