What is a Java Bean?

T

Tavish Muldoon

Hello,


*** NAIVE QUESTION ALERT *****
What is a Java Bean? What is its equivalent in the .NET world?

Is it a web service?

I think it is an object that can be accessed by anyone - just the
functionality. Is that sort of correct.

I need some nice dumbed down analogies. Or some simple examples.

Thanks for your time and patience.

Tmuld.
 
T

Tor Iver Wilhelmsen

What is a Java Bean?

Basically a "data class" with a parameter-less constructor and private
variables used by setFoo()/getFoo() methods. For more advanced stuff,
have the class implement java.io.Serializable and look at the bean
event classes like PropertyChangeListener and VetoableChangeListener.
What is its equivalent in the .NET world?

A class with properties. Possibly decorated with [Serializable].
Is it a web service?

No. A JavaBean can be "published" as a web service, though. You may be
thinking of Enterprise JavaBeans which are different, and have more in
common with web services.
 
A

Alex Hunsley

Tavish said:
Hello,


*** NAIVE QUESTION ALERT *****
What is a Java Bean? What is its equivalent in the .NET world?

Is it a web service?

try googling for it - I'm sure there's some useful information to be had there...
alex
 
T

Thomas Fritsch

Tavish said:
Hello,


*** NAIVE QUESTION ALERT *****
What is a Java Bean? What is its equivalent in the .NET world?

Is it a web service?
No


I think it is an object that can be accessed by anyone - just the
functionality. Is that sort of correct.
Yes. And you can manipulate it with a visual GUI builder.
I need some nice dumbed down analogies. Or some simple examples.

Thanks for your time and patience.

Tmuld.
See
http://java.sun.com/developer/onlineTraining/Beans/Beans1/simple-definition.html
 
T

Tavish Muldoon

Being a old procedural programmer...a Java Bean is a function that can
be used enterprise wide?
 
M

Michael Borgwardt

Tavish said:
Being a old procedural programmer...a Java Bean is a function that can
be used enterprise wide?

Forget that "enterprise" marketing bullshit.

A Java Bean is a Class that follows certain simple conventions
(see Tor's posting for those), and there are a number of (quite
varied) systems that can do special thigs with such classes.

Years ago, Sun envisioned such "components" to be so powerful
and flexible that there would soon be a pre-written one for any
task one might want a program to perform, and there you'd
just use a GUI to hook some of them together and build complete
applications that way. But this has never really manifested.
System design is rarely simple enough that you could do it
that way.

It's rather embarassing that Sun is still hanging on to these
illusions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top