Professional Documents
Culture Documents
com
www.android.jntuworld.com
www.jwjobs.net
JAVA BEANS
Introduction to JavaBeans:
The specification by Sun Microsystems defines JavaBeans as reusable software
components that can be manipulated visually in a builder tool. The JavaBeans
architecture is based on a component model which enables developers to create software
units called components. Components are self-contained, reusable software units that can
be visually assembled into composite components, applets, applications and servlets
using visual application builder tool. JavaBeans components are known as beans. Every
Java bean component should follow JavaBeans specification, which define the way by
which different components can communicate with each other, interact with a builder
tool, save/restore their configuration etc. In addition to this it also defines the
architecture of a single class in the software component. A Java Bean is a simple java
class, adhering to certain conventions about method naming constructors and behaviors.
The required conventions for JavaBeans are:
I t should have a no-argument constructor so that its object can be created
without knowing any thing about bean.
Its properties must be accessible using getter/setter and other methods (collectively
known as accessor/methods) following a standard naming convention. As the
name implies, getter method is used to obtain the value of a property, while setter
method is used to set the value of property.
Advantages of Java Beans:
Software component architecture provides standards mechanism to deal with software
building blocks. The following list enumerated some of the specific benefits that java
technology provides for a component developer.
Instead of reusing Java Classes (Write-Once-Run-Anywhere WORA) a bigger size
of code (component) is reused (Write-Once-Deploy-Anywhere WODA). Thereby
taking code reuse to a while new level.
The properties, events, and methods of a Bean that are exposed to an application
builder tool can be controlled.
The configuration settings of a bean can be saved in persistent storage and
restored at a later time.
A Bean may register to receive events from other Objects and can generate events
that are sent to other objects, thereby making it useful for Interactive applications.
Bean can be configured by using auxiliary software of users, choice.
Create and Configure an Instance of the OurButton Bean:
Follow these steps to create and configure an instance of the OurButton Bean and
connect it to the Molecule Bean:
www.jntuworld.com
www.jntuworld.com
www.android.jntuworld.com
www.jwjobs.net
www.jntuworld.com
www.jntuworld.com
www.android.jntuworld.com
www.jwjobs.net
www.jntuworld.com
www.jntuworld.com
www.android.jntuworld.com
www.jwjobs.net
www.jntuworld.com
www.jntuworld.com
www.android.jntuworld.com
www.jwjobs.net
www.jntuworld.com
www.jntuworld.com
www.android.jntuworld.com
www.jwjobs.net
www.jntuworld.com
www.jntuworld.com
www.android.jntuworld.com
www.jwjobs.net
www.jntuworld.com