Reusable component
By: aathishankaran in Java Beans Tutorials on 2007-02-12
Reusable components are simply pre-built pieces of programming code designed to perform a specific function. While designing an application in a visual environment, controls can be quickly dropped into the design, and modified to fit the task at hand. Most of the controls you'll find are designed to handle such tasks as pushbuttons, menus, text labels, and so forth. As a developer, you only need to write code to "glue" them into your application, and develop the interactions between controls.
Recently, programmers have been searching for some way to create and reuse components in the Java language. Java holds great promise, but the early releases lacked any method for creating reusable controls, and thus caused extended development times for applications. Sun Microsystems, the creators of the Java language, have at last recognized this need, and have released the Java Beans Component Architecture. Java Beans are, quite simply, reusable controls written in Java, for Java application development.
Beans are "capsules" of code, each designed for a specific purpose. The advantage of Java Beans over standard programming controls is that Beans are independent. They are not specific to operating systems or development environments. A Bean created in one development environment can be easily copied and modified by another. This allows Java Beans greater flexibility in enterprise computing, as components are easily shared between developers.
Java Beans are best put to use by visual developers. In a visual design environment, an application interface is developed on a "form" or client window. A toolbox contains all the controls (Beans), which are dropped onto the form through simple drag and drop procedures. As the controls are dropped onto the form, the development environment grinds out the necessary code, when the interface is finished, the developer can set about creating the actual interactions between controls and the application as a whole. An exciting concept behind Beans springs from the fact that an application created in Java can be used as a Bean, which can be used to build other applications. As you can imagine, this circle of application to Bean and back can make developing large-scale applications much easier.
Some may wonder why anyone would use a Bean over a Java Class file. The strongest argument for a Bean over a Class is that Beans support introspection. That is, they allow the development environment to analyze the Bean, determine its properties and methods, and manipulate the Bean at design time instead of at run time.
Add Comment
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
- Your name, rating, website address, town, country, state and comment will be publicly displayed if entered.
- Aside from the data entered into these form fields, other stored data about your comment will include:
- Your IP address (not displayed)
- The time/date of your submission (displayed)
- Your email address will not be shared. It is collected for only two reasons:
- Administrative purposes, should a need to contact you arise.
- To inform you of new comments, should you subscribe to receive notifications.
- A cookie may be set on your computer. This is used to remember your inputs. It will expire by itself.
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
- Although the administrator will attempt to moderate comments, it is impossible for every comment to have been moderated at any given time.
- You acknowledge that all comments express the views and opinions of the original author and not those of the administrator.
- You agree not to post any material which is knowingly false, obscene, hateful, threatening, harassing or invasive of a person's privacy.
- The administrator has the right to edit, move or remove any comment for any reason and without notice.
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Most Viewed Articles (in Java Beans ) |
Latest Articles (in Java Beans) |
Comments