> Hi
>
[quoted text clipped - 3 lines]
> - javabeans are not just about gui (as usually touted), its principles
> can be used in other software development as well.
Of course, javabeans have nothing in their spec that mentions gui, its a
totally generic concept.
> - a problem with ejb is that it is so much more complex than javabeans
> and that is the reason ejb are on its way out.
EJB3 addresses this, I think they are firmly *in*.
It's not that EJB's are complex, it is just that by neccessity they live in
a complex architecture. So their lifecycle takes some getting used to.
You can't compare the two, apples and pears. They solve different problems.
--
Mike W
tom fredriksen - 24 Mar 2006 23:42 GMT
> "tom fredriksen" <tom@nospam.org> wrote in message
>
[quoted text clipped - 4 lines]
> It's not that EJB's are complex, it is just that by neccessity they live in
> a complex architecture. So their lifecycle takes some getting used to.
Thats probably what they meant by ejb being more complex. They where
talking about a couple of problems with ejb, 1) the development
turnaround time and 2) ejb "bloat" the fact that the server starts up
with lots of stuff that the app dont need. So by using spring you only
use what you need, nothing more. And during development, there is no
slow turnaround except for just restarting your standalone app, which
presumably should be much faster than starting an applications server.
> You can't compare the two, apples and pears. They solve different problems.
By that, do you mean that they are solve different problems because ejb
for example has support for transactions and other server/enterprise
features while javabeans is more a client/desktop thing.
/tom
VisionSet - 25 Mar 2006 00:24 GMT
> > "tom fredriksen" <tom@nospam.org> wrote in message
> >
[quoted text clipped - 12 lines]
> slow turnaround except for just restarting your standalone app, which
> presumably should be much faster than starting an applications server.
I've only an awareness of Spring, but yes I think it is supposed to be a
lightweight approach.
Sometimes you need a heavyweight approach sometimes a lightweight. One
isn't better than the other just different.
The main thing with EJB framework is that it is designed to be *and is*
scalable. It has stood the test of time because of this one difficult to
achieve fact. It is probably the No1 technology for big distributed web
based apps. But if you don't need its capabilities don't use it.
You can get much of JEE's persistence elegance[1] by just using Hibernate.
> > You can't compare the two, apples and pears. They solve different problems.
>
> By that, do you mean that they are solve different problems because ejb
> for example has support for transactions and other server/enterprise
> features while javabeans is more a client/desktop thing.
JavaBeans are simply POJOs (plain olf java objects) that comply with a
specification such that introspection can be applied in a consistent manner.
And that is pretty much it. Though there is a supporting API that implements
an event mechanisim etc.
How you apply them to your app or not is up to you. Don't put them in some
box they don't need to go in!
EJB's on the other hand as you seem to be aware solves a narrower problem
set.
[1] elegance applied to Obj-Relational mapping? All things are relative ;-)
--
Mike W
Alex Hunsley - 25 Mar 2006 10:43 GMT
>>>"tom fredriksen" <tom@nospam.org> wrote in message
>>
[quoted text clipped - 25 lines]
> achieve fact. It is probably the No1 technology for big distributed web
> based apps. But if you don't need its capabilities don't use it.
I think one good guide to the applicability of EJBs is the question:
will your application need to be truly distributed - will components be
running on different servers? If yes, EJBs could a good choice. If no,
look at the other choices.
> You can get much of JEE's persistence elegance[1] by just using Hibernate.
Have you heard of Torque? An underexposed (IMHO) but really nice O/R
mapper...
http://db.apache.org/torque/
Less verbose than Hibernate, and all is driven by an XML definition of
your relations/info in the database (including generating the database
schema itself). Does actually seem quite elegant! :)
Thomas Hawtin - 25 Mar 2006 19:20 GMT
> Of course, javabeans have nothing in their spec that mentions gui, its a
> totally generic concept.
JavaBeans aren't all visual beans, but I think you'll be disappointed if
you think the spec does not mention GUI.
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/
> Hi
>
[quoted text clipped - 3 lines]
> - javabeans are not just about gui (as usually touted), its principles
> can be used in other software development as well.
Very true. They just happen to have been used, and in a well known way,
for reusable GUI components.
> - a problem with ejb is that it is so much more complex than javabeans
> and that is the reason ejb are on its way out.
They're a whole different kettle of fish.
http://jdj.sys-con.com/read/36515.htm
Don't just think a of EJBs as an extension of JavaBeans - it's not a
concept which is terribly helpful. EJBs are more complex (or there are
more surrounding issues to be aware of, at least). EJBs are appropriate
for some enterprise application setups/circumstances but aren't always a
great fit. Sometimes you encounter the idea that enterprise java
necessarily involves EJBs (which is not so).