AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What's a JavaBean?

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> JavaBeans
View previous topic :: View next topic  
Author Message
pokaru
Guest





PostPosted: Sun Dec 03, 2006 1:01 am    Post subject: What's a JavaBean? Reply with quote



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." Very Happy.

Thanks everyone.

- Peter
Back to top
Lion-O
Guest





PostPosted: Sun Dec 03, 2006 8:10 am    Post subject: Re: What's a JavaBean? Reply with quote



Quote:
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


--
Groetjes, Peter

..\\ PGP/GPG key: http://www.catslair.org/pubkey.asc
Back to top
arad
Guest





PostPosted: Tue Jan 23, 2007 6:41 pm    Post subject: Re: What's a JavaBean? Reply with quote



pokaru ÃÑÓáÊ:
Quote:
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." Very Happy.

Thanks everyone.

- 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 .
Back to top
Lion-O
Guest





PostPosted: Wed Jan 24, 2007 3:29 pm    Post subject: Re: What's a JavaBean? Reply with quote

Quote:
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.

--
Groetjes, Peter

..\\ PGP/GPG key: http://www.catslair.org/pubkey.asc
Back to top
mei
Guest





PostPosted: Mon Feb 12, 2007 3:40 am    Post subject: Re: What's a JavaBean? Reply with quote

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 :
Quote:
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.
Back to top
Frank Fredstone
Guest





PostPosted: Sat Mar 03, 2007 4:19 am    Post subject: Re: What's a JavaBean? Reply with quote

mei <mei (AT) you (DOT) fr> writes:

Quote:
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.

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.
Back to top
levilista@gmail.com
Guest





PostPosted: Sun Apr 08, 2007 9:59 pm    Post subject: Re: What's a JavaBean? Reply with quote

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:
Quote:
mei <mei (AT) you (DOT) fr> writes:

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.

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> JavaBeans All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.