JavaBeans from Square One
By Bruce Eckel
Java is invaluable for creating reusable pieces of code, and the most reusable unit of code is the class, which comprises a cohesive unit of characteristics and behaviors that can be reused, either via composition or through inheritance.
Inheritance and polymorphism are essential to object-oriented programming, but when you're putting together an application, what you really want is components that you can drop into your design like an electronic engineer places chips on a circuit board (or even, in the case of Java, onto a Web page). It seems, too, that there should be some way to accelerate this module-assembly style of programming.
Visual programming first became successful, very successful, with Microsoft's Visual Basic (VB), followed by Borland's Delphi (the primary inspiration for the JavaBeans design). The reason that visual programming tools have been so successful is that they dramatically speed up the process of building an application -- certainly the user interface -- but often other portions of the application as well. These programming tools represent components visually, which makes sense since they usually display some kind of visual component, like a button or text field. The visual representation is, in fact, often identical to the component's appearance in the running program. So part of visual programming involves dragging a component from a palette and dropping it onto a form -- the application-builder tool writes code as you do this -- and that code causes the component to be created in the running program.<>