+1 vote
in Software Engineering by

1 Answer

+1 vote
by
selected by
 
Best answer
The ‘provides’ interface defines the services provided by the component. It defines the methods that can be called by a user of the component. The ‘requires’ interface specifies what services must be provided by other components in the system if a component is to operate correctly. If these are not available then the component will not work.

Both provides and requires are needed in the component because the use of the component is completely independent of its implementation. If component interactions do not use the ‘provides’ or ‘requires’ interfaces then the coupling between the components is increased and as a result it will be harder to interchange one component for an equivalent component with the same interface.

A component should be independent – it should be possible to compose and deploy it without having to use other specific components. In situations where the component needs externally provides services, these should be explicitly set out in a ‘requires’ interface specification.

Related questions

Welcome to CPEN Talk
Solution-oriented students of computer engineering on one platform to get you that

ONE SOLUTION

Chuck Norris can install iTunes without installing Quicktime.
...