You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Jonathan Alvarsson <jo...@gmail.com> on 2007/08/09 14:57:14 UTC
What about those JavaBeans?
Hi I have been working a bit with Hibernate and want to get a look at
iBatis. I have read the first 80-90 pages of the "iBatis in action" book and
I am a bit confused.
JavaBeans?! Isn't that that horribly bloaty standard that everyone tells me
to avoid? What's it doing in what I thought was a lightweight and easy
framework?
I read that iBatis doesn't make any demands on the domain model. Then the
book says that I should use JavaBeans and mumbles something about a 114
pages specification and starts to tell me about the most basic stuffs about
JavaBeans and more or less hints that this will not be enough. I feel
somewhat confused now. Isn't this a demand on the domain model?
Please explain this because it just doesn't make sence to me...
--
// Jonathan
Re: What about those JavaBeans?
Posted by Hasse Schougaard <ha...@gmail.com>.
Hey Jonathan. I think you have confused 'JavaBeans' with 'Enterprise
JavaBeans', the latter being considered 'hefty' in todays world.
Cheers,
Hasse
Jonathan Alvarsson wrote:
> Hi I have been working a bit with Hibernate and want to get a look at
> iBatis. I have read the first 80-90 pages of the "iBatis in action"
> book and I am a bit confused.
>
> JavaBeans?! Isn't that that horribly bloaty standard that everyone
> tells me to avoid? What's it doing in what I thought was a lightweight
> and easy framework?
>
> I read that iBatis doesn't make any demands on the domain model. Then
> the book says that I should use JavaBeans and mumbles something about
> a 114 pages specification and starts to tell me about the most basic
> stuffs about JavaBeans and more or less hints that this will not be
> enough. I feel somewhat confused now. Isn't this a demand on the
> domain model?
>
> Please explain this because it just doesn't make sence to me...
>
> --
> // Jonathan
Re: What about those JavaBeans?
Posted by Jonathan Alvarsson <jo...@gmail.com>.
On 8/9/07, Larry Meadors <lm...@apache.org> wrote:
>
> OK, you lost me.
>
> Do you mean EJB is bloaty? If that is what you are talking about, then
> I'd agree - they are a bit bloaty (although I have heard v3 is much
> better). That said, EJB really has almost nothing to do with iBATIS.
> You can use iBATIS from within EJBs, but that's about as close as they
> come - iBATIS does not rely on EJB.
>
> Where does anything anywhere say that you have to use beans with
> iBATIS? You *can* use beans. You can also use Maps or fields directly.
Okey I thought so. I must have miss understod it.
In my opinion, it is a good practice to use beans, because it's a
> pretty common pattern used by nearly all Java applications, but it is
> by no means required.
>
> You should keep reading and do a little experimentation before
> complaining / criticizing. :-)
Oh I didn't mean to complain / criticize in that case I would have kept my
mouth shut and stayed with Hibernate. (No use in critizising how other
people do things) But I had a hunch that I had missunderstood something and
it is better to ask living people than to read on in a book with an
assumption that things are in a bad way. I just realised that the book is
written for those comming from the JDBC direction and not from the Hibernate
direction...
--
// Jonathan
Larry
>
>
> On 8/9/07, Jonathan Alvarsson <jo...@gmail.com> wrote:
> > Hi I have been working a bit with Hibernate and want to get a look at
> > iBatis. I have read the first 80-90 pages of the "iBatis in action" book
> and
> > I am a bit confused.
> >
> > JavaBeans?! Isn't that that horribly bloaty standard that everyone tells
> me
> > to avoid? What's it doing in what I thought was a lightweight and easy
> > framework?
> >
> > I read that iBatis doesn't make any demands on the domain model. Then
> the
> > book says that I should use JavaBeans and mumbles something about a 114
> > pages specification and starts to tell me about the most basic stuffs
> about
> > JavaBeans and more or less hints that this will not be enough. I feel
> > somewhat confused now. Isn't this a demand on the domain model?
> >
> > Please explain this because it just doesn't make sence to me...
> >
> > --
> > // Jonathan
>
Re: What about those JavaBeans?
Posted by Larry Meadors <lm...@apache.org>.
OK, you lost me.
Do you mean EJB is bloaty? If that is what you are talking about, then
I'd agree - they are a bit bloaty (although I have heard v3 is much
better). That said, EJB really has almost nothing to do with iBATIS.
You can use iBATIS from within EJBs, but that's about as close as they
come - iBATIS does not rely on EJB.
Where does anything anywhere say that you have to use beans with
iBATIS? You *can* use beans. You can also use Maps or fields directly.
In my opinion, it is a good practice to use beans, because it's a
pretty common pattern used by nearly all Java applications, but it is
by no means required.
You should keep reading and do a little experimentation before
complaining / criticizing. :-)
Larry
On 8/9/07, Jonathan Alvarsson <jo...@gmail.com> wrote:
> Hi I have been working a bit with Hibernate and want to get a look at
> iBatis. I have read the first 80-90 pages of the "iBatis in action" book and
> I am a bit confused.
>
> JavaBeans?! Isn't that that horribly bloaty standard that everyone tells me
> to avoid? What's it doing in what I thought was a lightweight and easy
> framework?
>
> I read that iBatis doesn't make any demands on the domain model. Then the
> book says that I should use JavaBeans and mumbles something about a 114
> pages specification and starts to tell me about the most basic stuffs about
> JavaBeans and more or less hints that this will not be enough. I feel
> somewhat confused now. Isn't this a demand on the domain model?
>
> Please explain this because it just doesn't make sence to me...
>
> --
> // Jonathan
Re: What about those JavaBeans?
Posted by Clinton Begin <cl...@gmail.com>.
> JavaBeans?! Isn't that that horribly bloaty standard that everyone tells me
> to avoid?
We support any class that Hibernate supports -- in other words,
everything except constructor injection. We will eventually support
constructor injection too though.
And yes, iBATIS supports JavaBeans properties. And yes JavaBeans is
an ugly, disgusting standard (your not alone in thinking that). But
with that complaint, you need to go post on Sun's message board, not
here.
Cheers,
Clinton
On 8/9/07, Jonathan Alvarsson <jo...@gmail.com> wrote:
> Hi I have been working a bit with Hibernate and want to get a look at
> iBatis. I have read the first 80-90 pages of the "iBatis in action" book and
> I am a bit confused.
>
> JavaBeans?! Isn't that that horribly bloaty standard that everyone tells me
> to avoid? What's it doing in what I thought was a lightweight and easy
> framework?
>
> I read that iBatis doesn't make any demands on the domain model. Then the
> book says that I should use JavaBeans and mumbles something about a 114
> pages specification and starts to tell me about the most basic stuffs about
> JavaBeans and more or less hints that this will not be enough. I feel
> somewhat confused now. Isn't this a demand on the domain model?
>
> Please explain this because it just doesn't make sence to me...
>
> --
> // Jonathan