Talk:JavaBeans

message: What the hell kind of layman knows what POJO, serializable, constructors, and getter/setter methods are?  I think the wording could be improved.  —Preceding unsigned comment added by 128.146.248.165 (talk) 15:37, 19 February 2009 (UTC)
replies: text:  What the hell kind of layman looks up an article like this and doesn't at least know what a constructor is? 72.227.165.191 (talk) 04:09, 13 January 2010 (UTC)
replies: text: The article fails to say what a Bean is, which is the main thing an encyclopedia article should do. I am familiar with objects and even with constructors, but listing properties is not the same as defining. If an abstract definition becomes too complicated, it may be helpful to give a (basic) example to the use of beans. Rbakels (talk) 08:19, 18 May 2019 (UTC)
thread_title:  Layman's terms 

message: I think the relation to COM that hypothetically justifies there being a link to the article needs to be made explicit. I believe a link to component-based software engineering would be more relevant. --Guillaume (talk) 12:32, 18 January 2008 (UTC)
thread_title:  Link to COM 

message: The fact that event handling requires support classes, interfaces, and specific base classes, doesn't negate the fact that fundamentally a Java Bean is just a plain ol' object.  Nor does adding interfaces, base classes, and support classes to a new class without the Java Bean conventions make the class more than any other object.  128.114.57.91 19:26, 24 October 2006 (UTC)
thread_title:  POJOs 

message: JavaBeans be moved to JavaBeans ??? Is there something I am missing? --soUmyaSch 15:06, 7 May 2006 (UTC)
replies: text: JavaBeans should be moved to JavaBean, but it needs an admin as the redirect has a history. —Doug Bell talk•contrib 15:55, 8 May 2006 (UTC)
thread_title:  Move?? 

message: This page seriously needs expansion and elaboration.  As with most useless programming help pages, all it does is explain what is required for something to be considered a Java bean and how one is used - but never explains what one actually is! 68.55.218.175 16:17, 25 May 2006 (UTC)
replies: text: I fail to see what further explaination of "what one is" one could make past "what is required" and "how it is used". Besides, there is a description: "a reusable component that can be manipulated visually in a builder tool".capnmidnight 18:15, 8 July 2006 (UTC)

text: Java Beans *are* POJOs, with a standard naming convention. As for the why, it's so you can have a "resuable component that can be manipulated visually in a builder tool." Do you need elaboration on why someone would want a reusable component? How about elaboration on why someone would want to manipulate it visually in a builder tool? You're complaining about something being missing from the article when *it's not*. If you expected something more out of JavaBeans, I'm sorry, there just isn't that much to them. capnmidnight 22:05, 30 November 2006 (UTC)
replies: text: "[JavaBeans] are used to encapsulate many objects into a single object (the bean), so that the bean can be passed around rather than the individual objects.". Isn't that concept infinitely recursive ? i.e. What comes before the bean ? What comes after ? As a newcommer to JavaBeans a definately agree there is lack of context in this article. --Guillaume (talk) 13:43, 18 January 2008 (UTC)
replies: text:  "Isn't that concept infinitely recursive ?". Of course it is although strictly speaking, only functions deserve the "recursive" adjective. But how is that a problem? Classes can have fields whose type is a class, even the same type that's being defined. It doesn't bother anyone. Any implementation of the Composite pattern falls in your question and my counterexample (e.g. org.3wc.dom.Node). Yes it is, but it doesn't matter as the same applies to classes in object-oriented languages... Your questions apply there too; so why should there be a special lack in this article because there's no mention of what comes before or after? Anyway, I don't see any programmer in their right mind who would nest beans in beans in beans and so forth to the point that it would be a problem. I, for instance, never insert beans in beans. Amenel (talk) 13:12, 15 July 2010 (UTC)

text: Based on my initial research into Javaland, it would appear that there are those who are using the term POJO to mean the same thing as a Java Bean.  My example comes from the sample code in "Beginning Spring Frameworks 2", Wrox Press, 2008.  In chapter 2, the objects the authors describe as POJOs have all the conventions of Java Beans -- serializable, no-arg constructor, getter and setter methods.  Is there something that a Java Bean has that a POJO definitely does NOT?  Or are the two terms gradually merging into the same concept?  In other words, I agree with the first poster.  dabeamer42 14 July 2008  —Preceding comment was added at 21:12, 14 July 2008 (UTC)
replies: text:  A JavaBean is a POJO. But the converse is not true. Amenel (talk) 13:12, 15 July 2010 (UTC)

text:  As to the "why", I can give an answer that reflects why I use JavaBeans in my code, whether professional or personal: just to avoid the hassle of ever growing lists of parameters in function signatures. This happens when the same parameters are passed along a chain of function calls, with or without additional parameters. Adding a new piece of information at one end of the chain requires changing all signatures until the point of consumption. Above a certain number of parameters, it's just a pain to change the signatures of all functions in the chain just so that the newly added piece of information can be passed along until it is consumed. By using a JavaBean, I just have to 1- add the field, initialized to either null or a suitable default value, and its setter/getter pair, 2- set it where it becomes available and 3- consume it where it has to be used: the set of changes and file modifications if lower. That's all... although not always feasible/sensible depending on the context. So the "reusable software components for Java that can be manipulated visually in a builder tool" definition was unknown to me (and never-experienced) until I read the article minutes ago. Amenel (talk) 13:23, 15 July 2010 (UTC)
thread_title:  Elaboration 

message: To my knowledge boolean properties are capitalized the same way as other types. Compare Sun's JavaBeans spec [] and the java.beans.Inspector.decapitalize(String) method. - leo  03 August 2012  — Preceding unsigned comment added by 80.218.115.95 (talk) 22:05, 2 August 2012 (UTC)
thread_title:  Naming convention 

message: Should serializable classes have a line like "private static final long serialVersionUID = 7526471155622776147L;"
I think I read that the serialVersionUID should be declared for serializable classes. Is this different for beans? Just a thought.
hi  —Preceding unsigned comment added by 203.197.25.11 (talk) 12:01, 6 September 2007 (UTC)
thread_title:  Serializable classes 

message: :What about a JavaBean makes it any more reusable than any other class or class hierarchy?  A naive reader might think that all classes can be manipulated in a builder tool, so the article should say what the limitations of a non-bean might be.  If merely adhering to the conventions makes it reusable  - then please say so - and mention the use cases where it is more reusable than any other class.  Might also help to say whether Enterprise JavaBeans are a subset of JavaBeans.  --Hroðulf (or Hrothulf) (Talk) 08:48, 4 October 2007 (UTC)
thread_title:  Reusability 

message: I like the example, but it would be nice to see a picture of the output. 138.162.8.58 (talk) 14:01, 20 May 2009 (UTC)
thread_title:  Picture 

message: I think that some of this page's writers were misinformed. First of all, the article should be on the technology, JavaBeans, not on the individual software components. Second of all, the components are called beans, not JavaBeans. So, if not referring to the component model, JavaBeans, this page should be called Bean (Java). Just my opinion.
--I'm Jake9 "Da' Pie!" 05:10, 17 November 2009 (UTC)
thread_title:  Needs a rewrite… 

message: "A Bean obtains all of the benefits of Java's "write once, run anywhere" paradigm."
Any code written in Java enjoys this benefit (on most OS's). This benefit is not specific to beans.  — Preceding unsigned comment added by 217.37.69.169 (talk) 15:53, 29 May 2012 (UTC)
replies: text: Yeah! Computer science – a world of boasting slogans, without any coherent terminology. I detest it too! Rursus dixit. (mbork3!) 09:15, 21 November 2012 (UTC)
thread_title:  The write once run anywhere advantage is too broad 

message: When were JavaBeans invented? Have there been any major modifications to the concept since then? RenniePet (talk) 02:25, 23 July 2013 (UTC)
thread_title:  History? 

message: The first sentence states "JavaBeans are classes that encapsulate many objects into a single object (the bean)." I believe this is a really bad thing to say for three reasons:
There is no need for multiple objects to be involved in a JavaBean. A perfectly good example (though of little use) is
import java.io.Serializable;
 
public class JBExample implements Serializable {
    public JBExample(){}
}
Also, though a class may "encapsulate many objects," it is usually the instances of classes one is more interested in. The encapsulation (or not) of objects directly in a class is irrelevant for being a bean.
Finally, if the actual intent was to speak of instances of a class: It is not only unnecessary to encapsulate many objects, it is also not sufficient to do so.  Java objects may well encapsulate many other objects, but they need not be an instance of a JavaBean class to do so.
 
Randallbsmith (talk) 19:02, 10 March 2016 (UTC)
thread_title:  Incorrect 

message: I kind of feel like the advantages/disadvantages sections should be rewritten in a way that is more neutral. I don't feel it is neutral to label something as an advantage or disadvantage because theoretically, an advantage to one person could be a disadvantage to another. Somebody deleted the Disadvantages section [], and I think that content should be reinstated in a more neutral way. CLCStudent (talk) 18:40, 24 August 2018 (UTC)
thread_title:  Advantages/Disadvantages sections