3.8. The Component-based Model

To write applications for an OSGi service framework is to develop bundles. The programming model is component-based, in contrast to the library-based model. Figure 3.12 illustrates the typical structures of the two models.

Figure 3.12. The library-based model (a) and the component-based model (b)

In a library-based model, we approach an application such as a word processor by designing and developing a collection of classes that are roughly divided into various functional modules or libraries (for example, print, format, utilities, and so on; see Figure 3.12a). Although the modules could be designed into components ...

Get Programming Open Service Gateways with Java Embedded Server™ Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.