Java Reference
In-Depth Information
The JavaBeans Model
A component model specifies how components interact with one another. In the case
of JavaBeans, the software components (classes) are required to provide at least the
following interface services or abilities:
1 . Rules to Ensure Consistency in Writing Interfaces:
For example, the rules say, among other things, that the name of an accessor method
must begin with get and that the name of a mutator method must start with set .
This same rule has always been a style rule for us in this topic, but it was a “should
do.” In the JavaBeans framework, it becomes a “must do.” Of course, there are other
rules as well. This is just a sample rule.
2 . An Event Handling Model:
This is essentially the event-handling model we presented for the AWT and Swing.
(Remember the AWT and Swing were done within the JavaBeans framework.)
3 . Persistence:
This means that an object has an identity that extends beyond one session. For
example, a JFrame of the kind we have seen so far may be used; when you are
finished using it, it goes away. The next time you use it, it starts out completely
new, born again just as it started before. Persistence means the JFrame or other
component can retain information about its former use; its state is saved, for
example, in a database someplace.
4 . Introspection:
This is an enhancement of simple accessor and mutator methods. It includes facilities
to find out what access to a component is available as well as providing access.
5 . Builder Support:
These are primarily IDEs (Integrated Development Environments) designed to
connect JavaBean components to produce a final application. Some examples are the
open source NetBeans, the Eclipse Foundation's Eclipse, and JetBrain's IntelliJ IDEA.
event
handling
persistence
introspection
What Is a JavaBean?
A JavaBean (often called a JavaBean component or simply a Bean ) is a reusable software
component (Java class or classes) that satisfies the requirements of the JavaBeans
framework and that can be manipulated in an IDE designed for building applications out
of Beans.
What Are Enterprise JavaBeans?
The Enterprise JavaBean framework extends the JavaBeans framework to more readily
accommodate business applications.
 
Search WWH ::




Custom Search