Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 69326 invoked from network); 12 Jan 2009 22:42:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2009 22:42:48 -0000 Received: (qmail 85599 invoked by uid 500); 12 Jan 2009 22:42:47 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 85304 invoked by uid 500); 12 Jan 2009 22:42:46 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 85294 invoked by uid 99); 12 Jan 2009 22:42:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 14:42:46 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of fatboysuns@gmail.com designates 209.85.146.182 as permitted sender) Received: from [209.85.146.182] (HELO wa-out-1112.google.com) (209.85.146.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 22:42:39 +0000 Received: by wa-out-1112.google.com with SMTP id k17so6013416waf.0 for ; Mon, 12 Jan 2009 14:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=novYWHXgW0lQdWp2/wSijADVeXR6t3ONkwmTnu9cF+Y=; b=QnzAmIsbAGw687uNqu9/va3y6MW80vo8Y3lLXEjddgMEbCkMoD/gkZJl0CMm2sQFvz wOJ49HFBi3iMJuZ+gXg7bimVv7euOz19RaOAgmMCgdZqq55vT3SjDqAHxTD7oXCy3Brr dBfrZuT2gKz1cuoAiPK7zDSJAWmfk8XTDkVtA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=dJHd46W/3QgumFKbNugbeeDQc4tdRzM85z0EVYrmtkRVKPDote/8XuIJjNBs2nRlg+ l7RdLmgf1g9EmWD1byaBUgUvcyqwNXfbs6zOT1n1JGCrXJ/uqUhCbU76ENOUAjtxZGaP KuMDSRwyVb7ZTtAKU14faQ0Fv+XZJCzFB4mso= Received: by 10.115.110.6 with SMTP id n6mr19834070wam.72.1231800139097; Mon, 12 Jan 2009 14:42:19 -0800 (PST) Received: by 10.115.111.10 with HTTP; Mon, 12 Jan 2009 14:42:19 -0800 (PST) Message-ID: Date: Mon, 12 Jan 2009 15:42:19 -0700 From: "Sundar Sankar" To: user-java@ibatis.apache.org Subject: Re: iBATIS DAO vs SqlMapClientDaoSupport In-Reply-To: <535a60b10901121354m60c2d804r4d1360b2661029ca@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13461_29338387.1231800139091" References: <583d4dff0901090834l798e7e39k341a2ef652c5554f@mail.gmail.com> <29DE2E073DFD104182C9DDDF037555947AD938@server01.wh.lan> <583d4dff0901120855m6f92f98csbec0e94651e60b5c@mail.gmail.com> <583d4dff0901121223s2671a556ia6ae73ea046206d1@mail.gmail.com> <583d4dff0901121321k7f5e8d8dga6dcc5fed5652d2b@mail.gmail.com> <535a60b10901121354m60c2d804r4d1360b2661029ca@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_13461_29338387.1231800139091 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I guess I missed this one. But why do u need to use applicationContext.getBean. Those are ancient man. With Spring Annotations (check the 2.5+ documentation), U hardly need xmls and all of this crappy code. I am not sure if that and the need for those huge amounts of xmls worried u about Spring as such. But Those were my $0.02 about the same. -S On Mon, Jan 12, 2009 at 2:54 PM, Chris O'Connell < oconnell@gorillachicago.com> wrote: > I have used Spring to configure multiple instances of the same set of DAO's > to hit different databases. Right there Spring has a huge advantage over > having to hardcode a specific config file right into the code. Also, using > DI makes it easier to code against interfaces and let Spring worry about > having to instantiate the correct instance of that interface. You haven't > indicated anything about who is actually going to be creating all the > objects you will be needing. I'm a big fan of the rule that code should > either use an object or create it, but not both. That doesn't necessarily > have anything to do with iBatis, but Spring's DI certainly makes that > easier. > > Once again, if Spring doesn't solve any of your problems, don't use it. > But your reasons for not using it seem a little inconsistent. You state > that the only thing that Spring would do for you is allow you to use a > Spring utility class. But you then state that you don't want to use DI > because you don't want clients of your API to depend on Spring. Well, those > things really are independent of each other. I have nothing to gain by you > using Spring, but you might want to take another look at what Spring really > does before you decide you don't want to use it. > ------=_Part_13461_29338387.1231800139091 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I guess I missed this one. But why do u need to use applicationContext.getBean. Those are ancient man. With Spring Annotations (check the 2.5+ documentation), U hardly need xmls and all of this crappy code.
I am not sure if that and the need for those huge amounts of xmls worried u about Spring as such. But Those were my $0.02 about the same.

-S

On Mon, Jan 12, 2009 at 2:54 PM, Chris O'Connell <oconnell@gorillachicago.com> wrote:
I have used Spring to configure multiple instances of the same set of DAO's to hit different databases.  Right there Spring has a huge advantage over having to hardcode a specific config file right into the code.  Also, using DI makes it easier to code against interfaces and let Spring worry about having to instantiate the correct instance of that interface.  You haven't indicated anything about who is actually going to be creating all the objects you will be needing.  I'm a big fan of the rule that code should either use an object or create it, but not both.  That doesn't necessarily have anything to do with iBatis, but Spring's DI certainly makes that easier.

Once again, if Spring doesn't solve any of your problems, don't use it.  But your reasons for not using it seem a little inconsistent.  You state that the only thing that Spring would do for you is allow you to use a Spring utility class.  But you then state that you don't want to use DI because you don't want clients of your API to depend on Spring.  Well, those things really are independent of each other.  I have nothing to gain by you using Spring, but you might want to take another look at what Spring really does before you decide you don't want to use it.

------=_Part_13461_29338387.1231800139091--