-->

Thursday, October 2, 2014

Forms of JavaBeans

In the previous article, we have already learn about basic concept of java bean, today i am talking about java beans forms.
Java Beans can appear in two forms:
  1. Visual
  2. Non visual.
Visual is more common, as the majority of Java Beans are extensions of Swing or AWT components. Some Beans may be simple GUI elements such as a specialized button or slider. Others may be sophisticated visual software components such as a diagram component offering different ways to present the bounded data. They all have in common that they can be customized at design time in a builder tool.

Java Beans can also be non visual yet still be customizable using a builder-tool. They do not have to be derived from a specific class or interface, it is recommended that they implement the Serializable interface. In respect of the source code there is no real difference noticeable between a Java Bean and a “normal” Java class. Basically what differs the source code of a “normal” class from a Java Bean is that the latter adheres to the Java Beans API specification in terms of how it is developed. Only the strict adherence to this specification ensures that builder tools can assist a developer to work with Java Beans. For many solutions you can either develop a conventional Java class where you have to write your own code for setting its properties or you can build a Java Bean which allows you To set the properties through the builder tool. Eventually both methods result in code just that in the latter case the builder tool creates the code automatically in the background according to your selection.

Introduction of JavaBeans

A Java Bean is a software component that has been designed to be reusable in a variety of different environments. There is no restriction on the capability of a Bean. It may perform a simple function, such as checking spelling of a document, or a complex function, such as forecasting the performance of a stock portfolio. A Bean may be visible to an end user. One example of this is a button on a graphical user interface. A Mean may also be invisible to a user. Software to decode a stream of multimedia information in real time is an example of this type of building block. A Bean may be designed to work autonomously on a user’s workstation or to work in cooperation with a set of other distributed components. Software to generate a pie chart from a set of data points is an example of a Bean that can execute locally.

A Bean that provides real-time price information from a stock or commodities exchange would need to work in cooperation with other distributed software to obtain its data.

Java Beans components, or beans, are reusable software components that follow simple naming and design conventions so they present a standard interface to other beans, programs, and tools. In the next video tutorial i will learn about forms of java beans.
© Copyright 2013 Computer Programming | All Right Reserved