Java Reference
In-Depth Information
Mastering modularity
This chapter covers
Understanding modularity and why it's desirable
■
Using metadata to describe OSGi bundles
(aka modules)
■
Explaining how bundle metadata is used to
manage code visibility
■
Illustrating how bundles are used to create an
application
■
In the previous chapter, we took a whistle-stop tour of the
OSG
i landscape. We
made a number of observations about how standard Java is broken with respect to
modularity and gave you examples where
OSG
i can help. We also introduced you to
some
OSG
i concepts, including the core layers of the
OSG
i framework: module, life-
cycle, and service.
In this chapter, we'll deal specifically with the module layer, because its features
are the initial attraction for most Java developers to
OSG
i. The module layer is the
foundation on which everything else rests in the
OSG
i world. We'll provide you with
a full understanding of what
OSG
i modularity is, why modularity is important in a
general sense, and how it can help you in designing, building, and maintaining
Java applications in the future.
24