Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 53291 invoked from network); 19 Aug 2009 05:13:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Aug 2009 05:13:22 -0000 Received: (qmail 69481 invoked by uid 500); 19 Aug 2009 05:13:40 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 69451 invoked by uid 500); 19 Aug 2009 05:13:40 -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 69443 invoked by uid 99); 19 Aug 2009 05:13:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2009 05:13:40 +0000 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 (nike.apache.org: domain of clinton.begin@gmail.com designates 209.85.212.199 as permitted sender) Received: from [209.85.212.199] (HELO mail-vw0-f199.google.com) (209.85.212.199) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2009 05:13:28 +0000 Received: by vws37 with SMTP id 37so3500467vws.27 for ; Tue, 18 Aug 2009 22:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=D2zmhm1MGBnz/5RA1m7UKlwIMkBX6oLsWas64ODOBcE=; b=Mr12cgJMiAUBdMpZ6uYLS5f7QXtYyhcWnpL0Bcd6i6OnJpGfbFIVmMo3BqyCgUG4Rf cy9pzKObVKAguKiYK9vVqj8pDiL6+aykFUCqgj3sj2GLIXlr3eAntlgPpNg9sMAinepn K6h6UsfCAvJXlPX1FXiCBQJnHhIB9/uFKDDGc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=TGB9iXrr7NCnPhyWoc+QRqPasayJF7xpGYhzsnGzry/XcqyIBaZ7N2BCAjxOfNwMZU v2WdISBYV6aLhKpMEEmw7KRh2OwmsoqbWZU1NUXgUMK2gX5curTp12FXsaZ4axXGbx5U kS1BugJn8dKxqohnCJwmIvIQlzR6o5sShojOc= MIME-Version: 1.0 Received: by 10.220.120.20 with SMTP id b20mr8043662vcr.40.1250658786950; Tue, 18 Aug 2009 22:13:06 -0700 (PDT) In-Reply-To: <550685970.22791371250658155302.JavaMail.root@amundsen.cs.athabascau.ca> References: <468949057.22791231250657921269.JavaMail.root@amundsen.cs.athabascau.ca> <550685970.22791371250658155302.JavaMail.root@amundsen.cs.athabascau.ca> Date: Tue, 18 Aug 2009 23:13:06 -0600 Message-ID: <16178eb10908182213h16636591w92396bf320e05f65@mail.gmail.com> Subject: Re: Request for input on porting iBatis XML from 2.x to 3.0 From: Clinton Begin To: user-java@ibatis.apache.org, "Trenton D. Adams" Content-Type: multipart/alternative; boundary=001517577440bb43c3047177b093 X-Virus-Checked: Checked by ClamAV on apache.org --001517577440bb43c3047177b093 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hey, I'm glad you love it so much, that way I don't have to write it. :-) Don't get me wrong, Java DOM code generally sucks too... but I'll choose my evil, and it isn't XSLT. Clinton On Tue, Aug 18, 2009 at 11:02 PM, Trenton D. Adams wr= ote: > Hi Clinton, > > ----- "Clinton Begin" wrote: > > > From: "Clinton Begin" > > To: user-java@ibatis.apache.org, "Trenton D. Adams" < > trenta@athabascau.ca> > > Sent: Tuesday, August 18, 2009 6:13:01 PM GMT -07:00 US/Canada Mountain > > Subject: Re: Request for input on porting iBatis XML from 2.x to 3.0 > > > > Thanks Trenton... That's exactly how iBATIS 1 > 2 worked. But then I > > swore I'd never write XSLT again. :-) That said, if you have it, > > that is awesome. > > > > The approach we're looking at would be a ConfigurationWriter that > > took > > an instance of Configuration and wrote out the XML files. That way > > you could more easily handle the edge cases that require logic that's > > difficult to implement in XSLT... like some of the dynamic SQL > > changes, and the type aliases that need to be rolled up into the > > configuration file, etc. > > XSLT has functionality that allows you to call methods from the language > you are using (Java in our case *grin*). In the case where there is data > inside of an XML element, that is not XML itself, you can just pass that = to > the Java code. That's one of the benefits of XSL. It allows a mix of Ja= va > (or other languages you run it from) and XSL. The XSL would then control > the flow of conversion, but some Java code could run that does other stuf= f. > Presumably (not knowing the internals of iBatis), you could pass the > element contents to existing methods that iBatis has for dealing with tha= t > data, to strip it out into iBatis data structures, POJOs, or whatever iBa= tis > does internally. From there, you could then have the new iBatis 3.0 code > spit out whatever it wants, into a string, and give it back to the XSL. > > So, I would think the easiest way (again, without knowing iBatis internal= s) > would be to write this "ConfigurationWriter" as you say, partly with XSLT= . > I'm assuming this is some sort of iBatis abstraction/interface, or > something like that, that, well, writes configuration files, hehe? Or is > this a new concept that you came up with on the fly? > > I haven't had time to follow here, as I'm trying to wrap up some work > before I go on 6 months research and study leave, of which iBatis is > designated as part of my research. So, when is this 3.0 expected to be > ready do you think? > > Also, XSL isn't that bad (though I understand your initial pain, lol), > unless you don't have a good reference. ;) It's a bit annoying at the > beginning, because the syntax learning curve is a bit of a pain. But, on= ce > you're into it, you're into it for good. I recently did a huge amount of > work with XSL at my workplace. I fell in love, to say the least. And, a= s > you know, a lot of times it's easier to learn something when you have a > starting point, with a working project for example. So, if this XSL > ConfigurationWriter was written, you would probably not have a problem > understanding it. As I said, it's really the syntax that gets you. > > One last thing about XSLT, is it makes your DOMs pain go away, muhahahaha= ha > (http://en.wikipedia.org/wiki/Delayed_onset_muscle_soreness). Seriously > though, all that DOM code you have to work with, just disappears, and > believe me, you are probably having a lot more pain with that, but just > don't realize it. ;) I started to write straight DOM code with my last > project, and switched to XSLT within minutes of messing around, though I = did > have some XSLT experience previously. > > Okay, the rant is complete. Gotta hit the sack, I have a lot of work to = do > before September, when my leave starts. > > > > > Any and all ideas and implementations are welcome here though. I'm > > not sure I'll have time to write the ConfigurationWriter any time > > soon. > > > > Clinton > > > > On Tue, Aug 18, 2009 at 4:10 PM, Trenton D. > > Adams wrote: > > > Why not just use an XSL to convert it? > > > > > > I've attached one that I use now and then, to spit out full SQL from > > a bunch > > > of fragments, as well as output bean code. > > > > > > Trenton D. Adams > > > Systems Analyst/Web Software Engineer > > > Navy Penguins at your service! > > > Athabasca University > > > (780) 675-6195 > > > :wq! > > > > > > ----- "Nathan Maves" wrote: > > >> From: "Nathan Maves" > > >> To: user-java@ibatis.apache.org, "larry meadors" > > > > >> Sent: Tuesday, August 18, 2009 4:04:46 PM GMT -07:00 US/Canada > > Mountain > > >> Subject: Re: Request for input on porting iBatis XML from 2.x to > > 3.0 > > >> > > >> We actually already started the talks on how to automate this. We > > did > > >> this for the last major upgrade and it was a huge help. > > >> > > > Thanks again for your notes. > > >> > > >> > > >> On Tue, Aug 18, 2009 at 3:49 PM, Larry Meadors > > > > >> wrote: > > >> > > >> > > >> Thanks for sharing! > > >> > > > >> > You rock. > > >> > > > >> > Larry > > >> > > > >> > > > >> > > > >> > On Tue, Aug 18, 2009 at 3:20 PM, Joel > > >> > Barciauskas wrote: > > >> > > Hey everyone, > > >> > > > > >> > > > > >> > > > > >> > > I just posted the notes that I took as I worked on porting my > > 2.x XML > > >> > > mapping and configuration files to the wiki: > > >> > > > > >> > > > > > http://opensource.atlassian.com/confluence/oss/display/IBATIS/Porting+sql= MapConfig+and+sqlMap+XML+from+2.x+to+3.0 > > >> > > > > >> > > > > >> > > > > >> > > I canceled the port part-way through since I didn=92t think I=92= d > > be able > > >> > > to > > >> > > finish and test it in a reasonable amount of time for my > > current > > >> > > project, > > >> > > but I thought the notes that I took might be useful for > > bootstrapping > > >> > > some > > >> > > documentation, so I went ahead and created this page. If you > > are > > >> > > familiar > > >> > > with the 3.0 schema, please review it, as I am sure there are > > items > > >> > > that are > > >> > > incorrect. > > >> > > > > >> > > > > >> > > > > >> > > Hope someone finds this of value! > > >> > > > > >> > > > > >> > > > > >> > > __________________________________________________________ > > >> > > Joel Barciauskas | Technical Consultant > > >> > > Nexaweb Technologies | www.nexaweb.com > > >> > > 781.345.5428 o | 617.899.8273 m > > >> > > Skype=99: jbarciauskas > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > >> > > > >> > > --------------------------------------------------------------------- > > >> > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > > >> > For additional commands, e-mail: > > user-java-help@ibatis.apache.org > > >> > > > >> > > > > > > >> > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > > > For additional commands, e-mail: user-java-help@ibatis.apache.org > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > > For additional commands, e-mail: user-java-help@ibatis.apache.org > > __ > This communication is intended for the use of the recipient to whom it > is addressed, and may contain confidential, personal, and or privilege= d > information. Please contact us immediately if you are not the intended > recipient of this communication, and do not copy, distribute, or take > action relying on it. Any communications received in error, or > subsequent reply, should be deleted or destroyed. > --- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > For additional commands, e-mail: user-java-help@ibatis.apache.org > > --001517577440bb43c3047177b093 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hey, I'm glad you love it so much, that way I don't have to write i= t.=A0 :-)

Don't get me wrong, Java DOM code generally sucks too.= .. but I'll choose my evil, and it isn't XSLT.

Clinton
On Tue, Aug 18, 2009 at 11:02 PM, Trenton D. Ada= ms <trenta@ath= abascau.ca> wrote:
Hi Clinton,

----- "Clinton Begin" <clinton.begin@gmail.com> wrote:

> From: "Clinton Begin" <clinton.begin@gmail.com>
> To: user-java@ibatis.ap= ache.org, "Trenton D. Adams" <trenta@athabascau.ca>
> Sent: Tuesday, August 18, 2009 6:13:01 PM GMT -07:00 US/Canada Mountai= n
> Subject: Re: Request for input on porting iBatis XML= from 2.x to 3.0
>
> Thanks Trenton... That's exactly how iBATI= S 1 > 2 worked. =A0But then I
> swore I'd never write XSLT again. =A0:-) =A0That said, if you have= it,
> that is awesome.
>
> The approach we're looking at would be a ConfigurationWriter that<= br> > took
> an instance of Configuration and wrote out the XML files. =A0That way<= br> > you could more easily handle the edge cases that require logic that= 9;s
> difficult to implement in XSLT... like some of the dynamic SQL
> changes, and the type aliases that need to be rolled up into the
> configuration file, etc.

XSLT has functionality that allows you to call methods from the langu= age you are using (Java in our case *grin*). =A0In the case where there is = data inside of an XML element, that is not XML itself, you can just pass th= at to the Java code. =A0That's one of the benefits of XSL. =A0It allows= a mix of Java (or other languages you run it from) and XSL. =A0The XSL wou= ld then control the flow of conversion, but some Java code could run that d= oes other stuff. =A0Presumably (not knowing the internals of iBatis), you c= ould pass the element contents to existing methods that iBatis has for deal= ing with that data, to strip it out into iBatis data structures, POJOs, or = whatever iBatis does internally. =A0From there, you could then have the new= iBatis 3.0 code spit out whatever it wants, into a string, and give it bac= k to the XSL.

So, I would think the easiest way (again, without knowing iBatis internals)= would be to write this "ConfigurationWriter" as you say, partly = with XSLT. =A0I'm assuming this is some sort of iBatis abstraction/inte= rface, or something like that, that, well, writes configuration files, hehe= ? =A0Or is this a new concept that you came up with on the fly?

I haven't had time to follow here, as I'm trying to wrap up some wo= rk before I go on 6 months research and study leave, of which iBatis is des= ignated as part of my research. =A0So, when is this 3.0 expected to be read= y do you think?

Also, XSL isn't that bad (though I understand your initial pain, lol), = unless you don't have a good reference. ;) =A0It's a bit annoying a= t the beginning, because the syntax learning curve is a bit of a pain. =A0B= ut, once you're into it, you're into it for good. =A0I recently did= a huge amount of work with XSL at my workplace. =A0I fell in love, to say = the least. =A0And, as you know, a lot of times it's easier to learn som= ething when you have a starting point, with a working project for example. = =A0So, if this XSL ConfigurationWriter was written, you would probably not = have a problem understanding it. =A0As I said, it's really the syntax t= hat gets you.

One last thing about XSLT, is it makes your DOMs pain go away, muhahahahaha= (http://en.wikipedia.org/wiki/Delayed_onset_muscle_soreness<= /a>). =A0Seriously though, all that DOM code you have to work with, just di= sappears, and believe me, you are probably having a lot more pain with that= , but just don't realize it. ;) =A0I started to write straight DOM code= with my last project, and switched to XSLT within minutes of messing aroun= d, though I did have some XSLT experience previously.

Okay, the rant is complete. =A0Gotta hit the sack, I have a lot of work to = do before September, when my leave starts.

>
> Any and all ideas and implementations are welcome here though. =A0I= 9;m
> not sure I'll have time to write the ConfigurationWriter any time<= br> > soon.
>
> Clinton
>
> On Tue, Aug 18, 2009 at 4:10 PM, Trenton D.
> Adams<
trenta@athabascau.ca<= /a>> wrote:
> > Why not just use an XSL to convert it?
> >
> > I've attached one that I use now and then, to spit out full S= QL from
> a bunch
> > of fragments, as well as output bean code.
> >
> > Trenton D. Adams
> > Systems Analyst/Web Software Engineer
> > Navy Penguins at your service!
> > Athabasca University
> > (780) 675-6195
> > :wq!
> >
> > ----- "Nathan Maves" <
nathan.maves@gmail.com> wrote:
> >> From: "Nathan Maves" <nathan.maves@gmail.com>
> >> To: user-java@= ibatis.apache.org, "larry meadors"
> <larry.meadors@gmail.com= >
> >> Sent: Tuesday, August 18, 2009 4:04:46 PM GMT -07:00 US/Canad= a
> Mountain
> >> Subject: Re: Request for input on porting iBatis XML from 2.x= to
> 3.0
> >>
> >> We actually already started the talks on how to automate this= . =A0We
> did
> >> this for the last major upgrade and it was a huge help.
> >>
> > Thanks again for your notes.
> >>
> >>
> >> On Tue, Aug 18, 2009 at 3:49 PM, Larry Meadors
> <larry.meadors@gmail.com= >
> >> wrote:
> >>
> >>
> >> Thanks for sharing!
> >> >
> >> > You rock.
> >> >
> >> > Larry
> >> >
> >> >
> >> >
> >> > On Tue, Aug 18, 2009 at 3:20 PM, Joel
> >> > Barciauskas<JBarciauskas@nexaweb.com> wrote:
> >> > > Hey everyone,
> >> > >
> >> > >
> >> > >
> >> > > I just posted the notes that I took as I worked on = porting my
> 2.x XML
> >> > > mapping and configuration files to the wiki:
> >> > >
> >> > >
> h= ttp://opensource.atlassian.com/confluence/oss/display/IBATIS/Porting+sqlMap= Config+and+sqlMap+XML+from+2.x+to+3.0
> >> > >
> >> > >
> >> > >
> >> > > I canceled the port part-way through since I didn= =92t think I=92d
> be able
> >> > > to
> >> > > finish and test it in a reasonable amount of time f= or my
> current
> >> > > project,
> >> > > but I thought the notes that I took might be useful= for
> bootstrapping
> >> > > some
> >> > > documentation, so I went ahead and created this pag= e.=A0 If you
> are
> >> > > familiar
> >> > > with the 3.0 schema, please review it, as I am sure= there are
> items
> >> > > that are
> >> > > incorrect.
> >> > >
> >> > >
> >> > >
> >> > > Hope someone finds this of value!
> >> > >
> >> > >
> >> > >
> >> > > ___________________________________________________= _______
> >> > > Joel Barciauskas | Technical Consultant
> >> > > Nexaweb Technologies | www.nexaweb.com
> >> > > 781.345.5428 o | 617.899.8273 m
> >> > > Skype=99: jbarciauskas
> >> > >
> >> > >
> >> > >
> >> > >
> >> >
> >> >
> >>
> ---------------------------------------------------------------------<= br> > >> > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> >> > For additional commands, e-mail:
> user-java-help@iba= tis.apache.org
> >> >
> >> >
> >
> >>
> >
> >
> ---------------------------------------------------------------------<= br> > > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> > For additional commands, e-mail: user-java-help@ibatis.apache.org
> >
>
> ---------------------------------------------------------------------<= br> > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org

__
=A0 =A0This communication is intended for the use of the recipient to whom= it
=A0 =A0is addressed, and may contain confidential, personal, and or privil= eged
=A0 =A0information. Please contact us immediately if you are not the inten= ded
=A0 =A0recipient of this communication, and do not copy, distribute, or ta= ke
=A0 =A0action relying on it. Any communications received in error, or
=A0 =A0subsequent reply, should be deleted or destroyed.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


--001517577440bb43c3047177b093--