Services and Components

A lot of discussions about Services vs. Components are currently taking place in the blog sphere.
The debate is especially difficult because terms like Component, Service or Widget have a lot of different meanings dependent of whom you ask.
Apart from that I think the phrase Services vs. Components is a bit misleading because this leads to an either-or kind of thinking which is not really helpful.

So please let me add a another kind of definition which uses a more historical approach:

In the very beginning we had Functions. These functions offered raw functionality which was not very organized and therefore often lead to messy code.

Later Objects were invented which gave us the opportunity to model concepts of the real world in our code. Much better but still messy because of tightly bound object systems and white box inheritance and reuse.

In order to solve this Components introduced the notion of explicit interfaces and encouraged black box reuse. Much better but still not open because of platform affinity or complexity, e.g. COM-components, Java-Beans, Corba-Servants.

Now Services add the platform neutral protocols which provide reachability from any platform that supports these protocols.

The main difference between components and services is not the design granularity, although it apparently doesn’t make much sense to create fine grained services. The main difference is openness and reachability.

Conclusion:
A service is a component which is reachable from any platform by using standard protocols.

If you have other definitions which elucidate the subject, please let me know.

Leave a Reply

Your email address will not be published. Required fields are marked *