21.01.2022 Views

Sommerville-Software-Engineering-10ed

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

472 Chapter 16 ■ Component-based software engineering

Support services

Component

management

Concurrency

Transaction

management

Persistence

Resource

management

Security

Platform services

Figure 16.5 Middleware

services defined in a

component model

Addressing

Interface

definition

Exception

management

Component

communications

For components that are executable routines rather than external services, the

component model defines the services to be provided by the middleware that

supports the executing components. Weinreich and Sametinger use the analogy of an

operating system to explain component models. An operating system provides a set

of generic services that can be used by applications. A component model implementation

provides comparable shared services for components. Figure 16.5 shows some

of the services that may be provided by an implementation of a component model.

The services provided by a component model implementation fall into two

categories:

1. Platform services, which enable components to communicate and interoperate

in a distributed environment. These are the fundamental services that must be

available in all component-based systems.

2. Support services, which are common services that many different components

are likely to require. For example, many components require authentication to

ensure that the user of component services is authorized. It makes sense to

provide a standard set of middleware services for use by all components. This

reduces the costs of component development, and potential component incompatibilities

can be avoided.

Middleware implements the common component services and provides interfaces to

them. To make use of the services provided by a component model infrastructure, you

can think of the components as being deployed in a “container.” A container is an implementation

of the support services plus a definition of the interfaces that a component

must provide to integrate it with the container. Conceptually, when you add a component

to the container, the component can access the support services and the container

can access the component interfaces. When in use, the component interfaces themselves

are not accessed directly by other components. They are accessed through a container

interface that invokes code to access the interface of the embedded component.

Containers are large and complex and, when you deploy a component in a container,

you get access to all middleware services. However, simple components may

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!