2 Synthesis‎ > ‎Computing‎ > ‎Programming‎ > ‎

Java



Oracle: The Java Language Specification

Why Java Brans?

Java beans are software components, initially they were used when assembling user interfaces, in a visual editor that allowed you to drag and drop scroll bars and buttons into the place you wanted them, on the windows you needed, for the program you were creating.

However they have been taken beyond that and Java beans have become a convenient way to form other components that can then be easily assembled in visual editors or indeed other editors.

Beans are little more than Java classes that have an empty constructor, may be serialisable so as to create an instance of the bean dynamically that can be saved as part of a structure of beans.

Bean classes may send and save events and expose properties to their environment. To do so beans follow naming conventions so their properties can be automatically discovered.

Most beans provide information about themselves in a BeanInfo class that implements the BeanInfo interface which hold methods that describe the beans features in more detail along with extra packaging such as icons for display to the user.

TODO I still need to look at the difference between beans classes themselves, beans as instantiated as a component in another class and beans as instantiated.

Over all the idea of a software components that can be assembled graphically is nice. I guess the Eclipse IDE will help me to do that.






© Tom de Havas 2011. The information under this section is my own work unless otherwise stated, it may be reproduced without modification but must include this notice.


Subpages (2): JDK Spring
Comments