Service

(deprecated) For UtilityRegistration? and AdapterRegistration? see SiteManager API.

A service is an ApplicationFunctionalityComponent that provides fundamental functionality for a site or application. Services don't depend on some other components except those passed to their methods.

We can use a linguistic analogy to think about the differences between the different kinds of component. Services and utilities and content components are like nouns. They are "things". Adapters and views are like verbs that expect a direct object. They are about doing particular actions to the things.

A service is typically used by a wide range of components. Services provide critical centralzed functionality for a site or application. There should not be many services and they must be managed well.

If a service is missing or broken, the application will be broken. Application components should not try to tolerate missing or broken services.

An important responsability of service implementations is to provide the illusion that they are the only implementation. If a service impementation gets a request it can't handle itself, it should collaborate with services above it in the containment hierarchy, if any, or with the global Registry services to fullfil the request. Of course, a particular implementation might, as a matter of policy, override services above it and intentionally not collaborate.

A common use of services is to provide management and retrieval of specific component types, such as presentation components, adapters, and so on.

Services correspond to "tools" in the [CMF]?.

Services are very similar to utilities (see Utility). See DifferencesBetweenServicesAndUtilities.



( 98 subscribers )