Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / April 2007

Tip: Looking for answers? Try searching our database.

What's a JavaBean?

Thread view: 
pokaru - 02 Dec 2006 19:01 GMT
Obviously, I'm new to JavaBeans.  Could someone please break it down for me,
what they are, and what they're good for?

I hope it's true what they say, "There's no dumb question." :-D.

Thanks everyone.

- Peter
Lion-O - 03 Dec 2006 02:28 GMT
> Obviously, I'm new to JavaBeans.  Could someone please break it down for me,
> what they are, and what they're good for?

A JavaBean is basicly an independent Java class which conforms itself to some
specific implementation rules. For example; if you wish to set a value in a
javabean you'd be using a so called "setter". Its basicly a method which 'sets'
a value to a private variable in the bean. Getting such a value is done using a
'getter'.

And because all of those things are standards any program which needs to get,
for example, an "adress" variable out of a bean can know up front that it'd be
using "beanname.getAddress()" to get the value and "beanname.setAddress()" to
actually set it.

You can get more info on the subject here:
http://java.sun.com/products/javabeans/docs/index.html
http://java.sun.com/products/javabeans/docs/spec.html

Signature

Groetjes, Peter

.\\ PGP/GPG key: http://www.catslair.org/pubkey.asc

arad - 23 Jan 2007 12:41 GMT
pokaru أرسلت:
> Obviously, I'm new to JavaBeans.  Could someone please break it down for me,
> what they are, and what they're good for?
[quoted text clipped - 4 lines]
>
> - Peter

java beans is class that deal with data processing that's it !
if you have jsp page and you want to retreive the
data from Database such as Oracle or DB2 you can make java bean to
retreive data and you will use  jsp:useBean tag in the jsp page by this
way you separate the presentation from process data

 ofcourse the javabean class has some properities that you must follow
it when you create a bean like setter & getter methods and empty
constructor  .
Lion-O - 24 Jan 2007 09:29 GMT
> java beans is class that deal with data processing that's it !

Thats not entirely true. When I create a java program and setup an executable
jar for it its not that hard to add a line to my manifest file saying:
"Java-Bean = true" after which Java will consider it to be a java bean ;)

A javabean is not merely a class; taken as a whole its a platform-independent
component model. It may utilize the beans class, but thats not a requirement to
produce a javabean.

Signature

Groetjes, Peter

.\\ PGP/GPG key: http://www.catslair.org/pubkey.asc

mei - 11 Feb 2007 21:40 GMT
Sorry to interfere in this thread, but i've been confused by this post.
It seems to me that you distinguish java beans and beans.
So the beans are those classes that complies to the setters and getters
stuffs... So now, what are the javabean? In particular, in your example,
what happens exactly when you set "Java-Bean" property to true?
Thanks.

Lion-O a écrit :
>> java beans is class that deal with data processing that's it !
>
[quoted text clipped - 5 lines]
> component model. It may utilize the beans class, but thats not a requirement to
> produce a javabean.
Frank Fredstone - 02 Mar 2007 22:19 GMT
> Sorry to interfere in this thread, but i've been confused by this post.
> It seems to me that you distinguish java beans and beans.
[quoted text clipped - 3 lines]
> to true?
> Thanks.

Aside from indicating that the main class in the jar file is a java
bean, I'm not sure. Maybe that is how the environment that gives you
an interface (e.g. GUI) to bean customizers, determines which classes
to present as components.

I am also confused about javabeans. A javabean is not "a class with
getters and setters". A javabean is a java component that can be
designed to reveal information about itself, such as what component
properties are accessible.

A javabean component can be setup to be customizable in a property
editor.

What I don't understand though, is how a customized javabean is then used. In:

http://java.sun.com/docs/books/tutorial/javabeans/index.html

a lot is described, but not how a customized bean would be used from
an application.

In the tutorial the application making use of the component model is
the NetBeans IDE, where NetBeans presents a GUI to a property editor
and allows components to be associated with each other.

It would clear things up for me if I could see an example of a non-GUI
application making use of non-GUI components that have been customized
in a property editor.
levilista@gmail.com - 08 Apr 2007 17:59 GMT
I'm a newbie to beans too.
I second Frank's question:
A database query can be a component too. How does a graphical property
editor deal with it?

Frank Fredstone ?rta:

> > Sorry to interfere in this thread, but i've been confused by this post.
> > It seems to me that you distinguish java beans and beans.
[quoted text clipped - 31 lines]
> application making use of non-GUI components that have been customized
> in a property editor.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.