Java Reference
In-Depth Information
Self-Test Exercises
5. What is the purpose of a port in the context of a socket?
6. Consider a threaded server that is expected to have up to 100 clients connected
to it at one time. Why might this server require a large amount of resources such
as memory, disk space, or processor time?
19.3
JavaBeans
Insert tab A into slot B.
Common assembly instruction
JavaBeans
JavaBeans refers to a framework that facilitates software building by connecting
software components from diverse sources. Some of the components might be standard
existing pieces of software. Some might be designed for the particular application.
Typically, the various components were designed and coded by different teams. If the
components are all designed within the JavaBeans framework, it simplifies the process
of integrating the components and means that the components produced can more
easily be reused for future software projects. JavaBeans have been widely used. For
example, the AWT and Swing packages were built within the JavaBeans framework.
The Component Model
You are most likely to have heard the word component when shopping for a home
entertainment system. The individual pieces, such as a receiver/amplifier, DVD player,
speakers, and so forth, are called components . Connect the components to produce a
working system, but do not connect them in just any way. You must connect them
following the interface rules for each component. The speaker wire must connect to
the correct plug, and there better be a plug for it to connect to. You may think it is
obvious that a receiver/amplifier needs to have connections for speakers; it is obvious
if the receiver/amplifier design is going to be used to make many identical units for
use by many different people. However, if you are only making one receiver/amplifier
for one home entertainment system, you might just “open the box” and connect the
wire inside. Software systems, unfortunately, are often constructed using the “open the
box” approach. The component model says that components should always have well-
defined connections for other components—which in our case will be other software
components, not speakers—but the idea is the same.
 
 
Search WWH ::




Custom Search