ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: SQL Maps and/or DAO
Date Thu, 30 Dec 2004 18:00:14 GMT
Hi Albert,

1) DAO is an abstraction layer that sits between your persistence
solution and your service/domain layer.  It serves to maintain a
consistent API and transaction management facility to all of the
higher layers (like service and domain).  Without it, you will end up
with various different types of artifacts from your persistence
solution (like Session, or Connection) all mixed together.  You'll
also find yourself more tied to your persistence solution.  One point
about DAO -- don't be afraid to write your own DAO!  iBATIS is one
implementation, but of anything else in iBATIS, DAO is the part that's
is often best written for your specific application and customized to
your needs.

2) The answer to this depends on which version of JPetStore you're
using.  JPetStore version 4 uses DAO 2.0 and SQL Maps 2.0.


On Wed, 29 Dec 2004 17:05:58 -0800 (PST), Daniel H. F. e Silva
<dhfs@yahoo.com> wrote:
> Hi Albert,
>   Well, i'm not one of the masters of iBATIS but i'm going to try to answer your questions.
> Brandon, Larry and Clinton, please, you can slap me if i say something stupid. ;-)
>   1. DAO framework and SQL Maps framework are different things. You can use both to leverage
> application design, but, you can use anyone by itself. For example, i wrote once an application
> that used only DAO framework because i was not fetching data from a relational database
but from
> an LDAP data source. Doing so, DAO framework gave me a invaluable feature: decoupling.
No matter
> from where i was fetching data, my application would work the same way ever.
>   2. Clinton is the right guy to answer this question. But, as far as i know, JPetsore
uses DAO
> framework too. But i can be wrong (with a large probability ;-) ).
>   There is a simple tutorial that can help to make some points clearer to you. It was
written by a
> great guy and friend of Brandon, Larry and Clinton. His name is Rick. Look it here:
> http://www.reumann.net/struts/main.do. Pick the Struts with iBATIS tutorial.
>   That was my 2 cents!
> Cheers,
>  Daniel Silva.
> --- "Albert L. Sapp" <asapp@uiuc.edu> wrote:
> > 1.  Can someone explain to me how the DAO framework enhances the use of SQL
> > Maps framework or is the DAO framework a replacement for SQL Maps
> > framework?  Both of them seem to be used as transaction managers.  All I am
> > wanting to do is some transaction processing against a Oracle database
> > using a JDBC connection and SQL statements.
> >
> > 2.  When I look at the source code files for JPetStore, I can seem to
> > follow what is happening.  It seems to only use SQL Maps.  Am I correct?
> >
> > Once I know what the relationship between the two is, I may be able to
> > figure out how to complete the project I am working on.  Right now, none of
> > our dao.xml or sql-maps.xml files look very close to the pet store samples.
> >
> > Thanks,
> >
> > Al
> >
> >
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - now with 250MB free storage. Learn more.
> http://info.mail.yahoo.com/mail_250

View raw message